sqlite-utils 4.0, now with database schema migrations
Simon Willison · Simon Willison · 2026-07-07
Simon Willison releases sqlite-utils 4.0 with database schema migrations, nested transactions via db.atomic(), and compound foreign keys, crediting Claude Fable 5 with identifying 14 bugs and release blockers that substantially improved the final release quality.
Appears in
Extraction
Topics: sqlitepython-librariesdatabase-migrationsai-assisted-programmingopen-source-tooling
Claims
- sqlite-utils 4.0 introduces a schema migration system using Python migration files tracked via a _sqlite_migrations table, deliberately omitting rollback support in favor of simplicity.
- Claude Fable 5 identified 4 release blockers and 10 additional issues by writing 12 test scripts against a release candidate, compared to GPT-5.5 which wrote 5 scripts and found nothing significant.
- The upgrade guide and release notes for sqlite-utils 4.0 were written entirely by Claude Fable 5, Claude Opus 4.8, and GPT-5.5 and were reviewed for accuracy by Willison.
- The new db.atomic() context manager supports nested transactions using SQLite Savepoints, resolving long-standing confused transaction behavior in the library.
- Upserts now use SQLite's INSERT...ON CONFLICT...DO UPDATE SET syntax and automatically detect existing table primary keys, representing a breaking change that motivated the 4.0 version bump.
Key quotes
There's no doubt in my mind that sqlite-utils 4.0 is a significantly higher-quality release than if I had built it without the assistance of the latest frontier models.
Fable has really good taste in API design, and is relentlessly proactive if you give it a more open goal.
Fable 5 wrote 12 scripts, identified 4 release blockers and 10 additional issues in its report, and built a neat combined repro script.