diff --git a/go/pkg/pwdb/migrations.go b/go/pkg/pwdb/migrations.go index 227a96cbd..156d0c6f5 100644 --- a/go/pkg/pwdb/migrations.go +++ b/go/pkg/pwdb/migrations.go @@ -8,7 +8,9 @@ import ( ) func migrate(db *gorm.DB, sfn *snowflake.Node, opts Opts) error { - m := gormigrate.New(db, gormigrate.DefaultOptions, []*gormigrate.Migration{}) + migrateOpts := gormigrate.DefaultOptions + migrateOpts.UseTransaction = true + m := gormigrate.New(db, migrateOpts, []*gormigrate.Migration{}) // only called on fresh database m.InitSchema(func(tx *gorm.DB) error {