Skip to content

Commit

Permalink
Setting context on go migrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
diogogmt committed May 21, 2020
1 parent 7d3a1bd commit 87fc0d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (m *Migration) run(ctx context.Context, db *sql.DB, direction bool) error {
if !m.Registered {
return errors.Errorf("ERROR %v: failed to run Go migration: Go functions must be registered and built into a custom binary (see https://github.com/pressly/goose/tree/master/examples/go-migrations)", m.Source)
}
tx, err := db.Begin()
tx, err := db.BeginTx(ctx, nil)
if err != nil {
return errors.Wrap(err, "ERROR failed to begin transaction")
}
Expand Down

0 comments on commit 87fc0d1

Please sign in to comment.