cleaned the code a bit up
Dieser Commit ist enthalten in:
Ursprung
d38cf41d23
Commit
1f800c0089
|
@ -104,14 +104,13 @@ func logmigrations(version int32, name string, dir string, sql string) {
|
|||
|
||||
// SetupMigrator sets up the migrator to migrate the database.
|
||||
func SetupMigrator(prefix string, connection *pgx.Conn, migrations fs.FS) (mig *migrate.Migrator, err error) {
|
||||
migfs := &iofsMigratorFS{fsys: migrations}
|
||||
mig, err = migrate.NewMigratorEx(
|
||||
context.TODO(),
|
||||
connection,
|
||||
"version",
|
||||
&migrate.MigratorOptions{
|
||||
DisableTx: false,
|
||||
MigratorFS: migfs,
|
||||
MigratorFS: &iofsMigratorFS{fsys: migrations},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
|
Laden…
In neuem Issue referenzieren