Compare commits

...

2 Commits

Author SHA1 Message Date
genofire 2aee702fc6 database: migration in transaction 2022-06-06 01:56:24 +02:00
genofire 843a985be7 web: gofmt 2022-06-06 01:55:57 +02:00
3 changed files with 14 additions and 8 deletions

View File

@ -28,7 +28,13 @@ func (config *Database) setupMigrator(testdata bool) (*gormigrate.Gormigrate, er
return nil, ErrNothingToMigrate
}
return gormigrate.New(config.DB, gormigrate.DefaultOptions, migrations), nil
return gormigrate.New(config.DB, &gormigrate.Options{
TableName: "migrations",
IDColumnName: "id",
IDColumnSize: 255,
UseTransaction: true,
ValidateUnknownMigrations: false,
}, migrations), nil
}