sqlite-utils 4.1.1
Simon Willison · Simon Willison · 2026-07-12
Simon Willison releases sqlite-utils 4.1.1 with a safety fix that prevents silent data loss when transforming tables with CASCADE foreign keys inside an open transaction.
Appears in
Extraction
Topics: sqlitepython-librariesdatabase-toolingopen-source-release
Claims
- Transforming a table with table.transform() while a transaction is open and PRAGMA foreign_keys is enabled could silently delete or modify referencing rows via CASCADE, SET NULL, or SET DEFAULT actions.
- sqlite-utils 4.1.1 fixes this by raising a TransactionError in that scenario rather than proceeding silently.
- The edge case was discovered by Claude while it was experimenting with the 4.1 release to answer a user question about ON DELETE behavior.
- CLI and Python API documentation now cross-reference each other for easier navigation between the two interfaces.
Key quotes
table.transform() now raises a TransactionError if called while a transaction is open with PRAGMA foreign_keys enabled and the table is referenced by foreign keys with destructive ON DELETE actions - CASCADE, SET NULL or SET DEFAULT.
Mainly a fix for an edge case that regular Claude chat spotted while experimenting with the 4.1 release to answer a question about ON DELETE.