Skip to content

Commit d4ece2d

Browse files
committed
add a comment
1 parent 98be3cb commit d4ece2d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/db/schema/internal/postgres/postgres.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ func (p *Postgres) RollbackRun(ctx context.Context) error {
208208
defer func() {
209209
p.tx = nil
210210
}()
211+
212+
// p.tx is set to nil after the commit so if p.tx == nil, we assume that the transaction has
213+
// already been committed and do nothing
211214
if p.tx == nil {
212215
return nil
213216
}

0 commit comments

Comments
 (0)