From c1c3be1549b51c858f530669236a7d99741f8c51 Mon Sep 17 00:00:00 2001 From: Stephen Afam-Osemene Date: Tue, 31 Oct 2023 09:05:49 +0000 Subject: [PATCH] fix: wrap error in DownContext --- down.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/down.go b/down.go index bd63804a7..7d6c21d51 100644 --- a/down.go +++ b/down.go @@ -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) }