Skip to content

Commit

Permalink
fix: wrap error in DownContext
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenafamo committed Oct 31, 2023
1 parent 497acb4 commit c1c3be1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion down.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func DownContext(ctx context.Context, db *sql.DB, dir string, opts ...OptionsFun
}
current, err := migrations.Current(currentVersion)
if err != nil {
return fmt.Errorf("no migration %v", currentVersion)
return fmt.Errorf("migration %v: %w", currentVersion, err)
}
return current.DownContext(ctx, db)
}
Expand Down

0 comments on commit c1c3be1

Please sign in to comment.