Skip to content

Commit

Permalink
fix: Set explicit transaction mode on Go register
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed Nov 9, 2023
1 parent 04e12b8 commit 3fade11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions register.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand Down

0 comments on commit 3fade11

Please sign in to comment.