sqlite-utils 4.1.1 fixes a TransactionError edge case when transforming tables with foreign keys and improves documentation cross-references between CLI and Python API.
# Release: sqlite-utils 4.1.1
Source: [https://simonwillison.net/2026/Jul/12/sqlite-utils/](https://simonwillison.net/2026/Jul/12/sqlite-utils/)
Mainly a fix for an edge case that regular Claude chat spotted while[experimenting with the 4\.1 release](https://claude.ai/share/564b187d-d126-47ea-9b59-07c16ade0b70)to answer a question about ON DELETE\.
> - `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`\. 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\. See[Foreign keys and transactions](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform-foreign-keys-transactions)for details and workarounds\. \([\#794](https://github.com/simonw/sqlite-utils/issues/794)\) - The[CLI](https://sqlite-utils.datasette.io/en/stable/cli.html)and[Python API](https://sqlite-utils.datasette.io/en/stable/python-api.html)documentation now cross\-reference each other: CLI sections link to the equivalent Python API functionality and Python API sections link back to the corresponding CLI command\. \([\#791](https://github.com/simonw/sqlite-utils/issues/791)\)
sqlite-utils 4.1 introduces minor features including --code for Python code blocks, --type for column type overrides, and strict mode support, continuing its evolution as a SQLite CLI utility.
sqlite-utils 4.0rc1 is a release candidate that adds built-in database migrations (ported from sqlite-migrate) and nested transactions via db.atomic(), along with minor backwards-incompatible changes.