Skip to content

Roll back output columns when conversion fails - #994

Open
0xeriiic wants to merge 1 commit into
simonw:mainfrom
0xeriiic:fix-convert-schema-rollback
Open

0xeriiic wants to merge 1 commit into
simonw:mainfrom
0xeriiic:fix-convert-schema-rollback

Conversation

@0xeriiic

@0xeriiic 0xeriiic commented Dec 4, 2026

Copy link
Copy Markdown

Fixes #993

Add any output columns inside the transaction that writes the converted rows. If a callback or constraint fails, both the schema changes and the row updates roll back. The single-output path creates its column before evaluating the filter so existing filters that refer to that column continue to work.

Two new regression tests cover a failing callback in convert(output=...) and a CHECK constraint failure in convert(multi=True). The conversion and update modules passed 38 tests in each SQLite connection mode exercised by the test harness.

OpenAI Codex assisted with reproducing the bug, writing the change and regression tests, and preparing this draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed Table.convert() leaves newly created columns behind

1 participant