Skip to content

Commit

Permalink
Fix ctx not being used in transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
markuswustenberg committed Jun 16, 2021
1 parent e152045 commit ba1cdcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (m *Migrator) getCurrentVersion(ctx context.Context) (string, error) {
}

func (m *Migrator) inTransaction(ctx context.Context, callback func(tx *sql.Tx) error) error {
tx, err := m.DB.Begin()
tx, err := m.DB.BeginTx(ctx, nil)
if err != nil {
return errors.New("error beginning transaction: " + err.Error())
}
Expand Down

0 comments on commit ba1cdcd

Please sign in to comment.