sqlite-utils 4.1.1 released, fixes foreign key cascade delete transaction bug
Decision Brief
sqlite-utils 4.1.1 primarily fixes a foreign key cascade edge case discovered by Claude Chat while testing version 4.1. When inside a transaction with PRAGMA foreign_keys enabled, table.transform() now raises TransactionError, preventing CASCADE, SET NULL, or SET DEFAULT actions triggered by deleting the old table from silently deleting or modifying referenced rows. Previously, since the pragma cannot be changed within a transaction, the operation could cause data loss without warning. Additionally, the release improves documentation: CLI and Python API docs now cross-reference each other, with CLI sections linking to corresponding Python API docs and vice versa. Developers using sqlite-utils should upgrade to 4.1.1 promptly, especially when performing table transformations with foreign key constraints in production, to avoid potential data integrity issues.
Sources
- Simon Willison:Blog
Hands-on notes on LLM tools, local models, and practical AI engineering.
- Simon Willison:Blog
留言
登入后即可留言,和其他 builder 交换实测心得。
还没有留言,抢头香。