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.
|
// SetupMigrator sets up the migrator to migrate the database.
|
||||||
func SetupMigrator(prefix string, connection *pgx.Conn, migrations fs.FS) (mig *migrate.Migrator, err error) {
|
func SetupMigrator(prefix string, connection *pgx.Conn, migrations fs.FS) (mig *migrate.Migrator, err error) {
|
||||||
migfs := &iofsMigratorFS{fsys: migrations}
|
|
||||||
mig, err = migrate.NewMigratorEx(
|
mig, err = migrate.NewMigratorEx(
|
||||||
context.TODO(),
|
context.TODO(),
|
||||||
connection,
|
connection,
|
||||||
"version",
|
"version",
|
||||||
&migrate.MigratorOptions{
|
&migrate.MigratorOptions{
|
||||||
DisableTx: false,
|
DisableTx: false,
|
||||||
MigratorFS: migfs,
|
MigratorFS: &iofsMigratorFS{fsys: migrations},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Laden…
In neuem Issue referenzieren