From 70cdd3823c61a884cf1324428280ac5f2f72a4cb Mon Sep 17 00:00:00 2001 From: Damian Debkowski Date: Thu, 13 Mar 2025 17:18:05 -0700 Subject: [PATCH] fix(db): return expected rows err for migration logs (#5597) --- internal/db/schema/internal/postgres/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/schema/internal/postgres/postgres.go b/internal/db/schema/internal/postgres/postgres.go index b3181eab6..2c42b4cc5 100644 --- a/internal/db/schema/internal/postgres/postgres.go +++ b/internal/db/schema/internal/postgres/postgres.go @@ -475,7 +475,7 @@ func (p *Postgres) GetMigrationLog(ctx context.Context, opt ...log.Option) ([]*l entries = append(entries, e) } if rows.Err() != nil { - return nil, errors.Wrap(ctx, err, op) + return nil, errors.Wrap(ctx, rows.Err(), op) } opts := log.GetOpts(opt...) if opts.WithDeleteLog {