fix: Set explicit transaction mode on Go register

pull/637/head
Mike Fridman 2023-11-09 09:45:12 -05:00
parent 04e12b88f4
commit 3fade11d08
No known key found for this signature in database
1 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ func AddNamedMigrationContext(filename string, up, down GoMigrationContext) {
if err := register(
filename,
true,
&GoFunc{RunTx: up},
&GoFunc{RunTx: down},
&GoFunc{RunTx: up, Mode: TransactionEnabled},
&GoFunc{RunTx: down, Mode: TransactionEnabled},
); err != nil {
panic(err)
}
@ -44,8 +44,8 @@ func AddNamedMigrationNoTxContext(filename string, up, down GoMigrationNoTxConte
if err := register(
filename,
false,
&GoFunc{RunDB: up},
&GoFunc{RunDB: down},
&GoFunc{RunDB: up, Mode: TransactionDisabled},
&GoFunc{RunDB: down, Mode: TransactionDisabled},
); err != nil {
panic(err)
}