Simon WillisonTuesday · June 23, 2026FREE

sqlite-utils 4.0rc1 adds migrations and nested transactions

sqlitepythondatabasemigrationstransactions

sqlite-utils 4.0rc1 is the first release candidate for sqlite-utils v4, a Python library and CLI tool for SQLite databases. This major version update introduces two significant new features: database migrations and nested transactions. The migrations feature, a modified port of the sqlite-migrate package, allows for defining and applying schema changes, such as creating tables and adding columns, through Python code or a command-line interface. The system is designed to be small and does not include reverse migrations. The second new feature is the db.atomic() API, which provides an abstraction for SQLite's savepoint-based nested transactions, borrowing terminology from Django and Peewee. This release candidate also includes several backwards incompatible changes. These include upsert operations now using SQLite's INSERT ... ON CONFLICT SET syntax for versions later than 3.23.1, dropping support for Python 3.8 while adding support for Python 3.13, and moving sqlite-utils tui to a separate plugin. Additionally, the db.table(table_name) method now exclusively works with tables, requiring db.view(view_name) for SQL views, and the default floating point column type has been changed from FLOAT to REAL. The project now uses pyproject.toml for packaging.

// why it matters

Developers using sqlite-utils gain new capabilities for managing database schema changes and handling complex transaction logic.

Sources

Primary · Simon Willison
▸ Read original at simonwillison.net

Like this? Get the next digest.

sqlite-utils 4.0rc1 adds migrations and nested transactions — aigest.dev