migrations weren't working
This commit is contained in:
@@ -24,7 +24,7 @@ func NewPgMigrator() (Migrator, error) {
|
||||
cfg := config.GetInstance()
|
||||
|
||||
str := "postgres://" + cfg.PgCfg.User + ":" + cfg.PgCfg.Pass + "@" +
|
||||
cfg.PgCfg.Host + ":" + cfg.PgCfg.Port + "/" + cfg.PgCfg.DB + "?sslmod=disable"
|
||||
cfg.PgCfg.Host + ":" + cfg.PgCfg.Port + "/" + cfg.PgCfg.DB + "?sslmode=disable"
|
||||
|
||||
m, err := mig.New(cfg.MigrationsPath, str)
|
||||
if err != nil {
|
||||
@@ -46,6 +46,8 @@ func (a PgMigrator) Goto(id uint) error {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Println("migrated to", id)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SELECT * FROM expenses;
|
||||
@@ -0,0 +1 @@
|
||||
SELECT * FROM expenses;
|
||||
Reference in New Issue
Block a user