Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed May 18, 2023
1 parent 53bf7a1 commit e4f61d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ func (p *Provider) runIndividually(
// Run the migration outside of a transaction.
switch {
case m.IsGo():
// Note, we're using *sql.DB instead of *sql.Conn because it's the contract of the
// GoMigrationNoTx function. This may be a deadlock scenario if the caller sets max open
// connections to 1. See the comment in runMigrations for more details.
if err := m.RunNoTx(ctx, p.db, direction); err != nil {
return err
}
Expand Down

0 comments on commit e4f61d3

Please sign in to comment.