ATRIUMsearch → argument graph
MechanismArticle

Because PRAGMA foreign_keys cannot be changed inside an open transaction, dropping the old table as part of table.transform() could previously fire destructive ON DELETE actions and silently delete or modify rows that referenced that table.

The bug arose because the foreign_keys pragma can't be toggled mid-transaction, so the table drop inside transform() could unintentionally cascade-delete or modify referencing rows. ✦ AI generated

Simon Willison · Simon Willison's Weblog · 2026-07-12 · original ↗

The pragma cannot be changed inside a transaction, so previously dropping the old table as part of the transform could fire those actions and silently delete or modify referencing rows.

Read full article ↗excerpt · fair-use quotation

Around this claim