fix: wrap error in DownContext (#629)

pull/632/head
Stephen Afam-Osemene 2023-10-31 13:09:33 +01:00 committed by GitHub
parent 497acb407f
commit 8e088eb65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}