migrations weren't working

This commit is contained in:
2025-09-09 12:07:47 +01:00
parent 7b4a098b99
commit 2216801e89
3 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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;