fixed the SetupMigrator
Dieser Commit ist enthalten in:
Ursprung
8d9b870820
Commit
2326ceb32e
|
@ -188,7 +188,7 @@ func SetupMigrator(prefix string, connection *pgx.Conn, migrations fs.FS) (mig *
|
|||
mig, err = migrate.NewMigratorEx(
|
||||
context.TODO(),
|
||||
connection,
|
||||
"version",
|
||||
prefix+"version",
|
||||
&migrate.MigratorOptions{
|
||||
DisableTx: false,
|
||||
},
|
||||
|
@ -197,12 +197,13 @@ func SetupMigrator(prefix string, connection *pgx.Conn, migrations fs.FS) (mig *
|
|||
log.Error().Err(err).Msg("Error while creating the migrator")
|
||||
return
|
||||
}
|
||||
mig.OnStart = logmigrations
|
||||
mig.Data["prefix"] = prefix
|
||||
err = mig.LoadMigrations(migrations)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Error while loading migrations")
|
||||
return
|
||||
}
|
||||
mig.OnStart = logmigrations
|
||||
mig.Data["prefix"] = prefix
|
||||
log.Trace().Interface("migrations", mig.Migrations).Interface("data", mig.Data).Err(err).Send()
|
||||
return
|
||||
}
|
||||
|
|
Laden…
In neuem Issue referenzieren