mirror of https://github.com/pressly/goose.git
fix: Set explicit transaction mode on Go register
parent
04e12b88f4
commit
3fade11d08
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue