Simon Willison
Read post

sqlite-utils 4.0, now with database schema migrations

sqlite-utils 4.0 has been released, marking the first major version bump since 3.0 in 2020. The headline feature is database schema migrations via a new `Migrations` class, allowing structured, tracked schema evolution for SQLite databases using Python functions. Other major additions include nested transaction support via `db.atomic()` (backed by SQLite savepoints) and compound foreign key support. Several breaking changes are included: `db.query()` now rejects non-SELECT statements, CSV imports detect column types by default, and upserts use native `INSERT ... ON CONFLICT` syntax. The migrations feature was previously a separate beta package called sqlite-migrate, now promoted into the core library. Claude Fable 5 played a significant role in the release, identifying 10 bugs (4 release blockers) through agentic code review, and helping implement compound foreign key creation. The upgrade guide and release notes were written by AI models and reviewed by the author.

    #python#claude#sqlite
Jul 07•10m read time•From simonwillison.net
Post cover image
347 Impressions
Simon Willison's image
Simon Willison

Simon Willison's blog offers a mix of technical tutorials, data analysis projects, and reflections o...

215 Followers

•

1.4K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard