From f44e2c1df68b52ffd8d6bd3156dce4a89d516c2b Mon Sep 17 00:00:00 2001 From: Sorawis Nilparuk Date: Wed, 9 Jul 2025 09:59:12 -0700 Subject: [PATCH] return nil when no transaction is opened --- 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 7351981d31..c3e6df1af6 100644 --- a/internal/db/schema/internal/postgres/postgres.go +++ b/internal/db/schema/internal/postgres/postgres.go @@ -209,7 +209,7 @@ func (p *Postgres) RollbackRun(ctx context.Context) error { p.tx = nil }() if p.tx == nil { - return errors.New(ctx, errors.MigrationIntegrity, op, "no pending transaction") + return nil } if err := p.tx.Rollback(); err != nil { if errors.Is(err, sql.ErrTxDone) {