sqlite-utils 4.0rc1 adds migrations and nested transactions
Simon Willison released the first sqlite-utils 4.0 release candidate with a built-in migrations system and nested transactions. The RC adds minor backward incompatibilities while expanding SQLite workflow automation for scripts and apps.

TL;DR
- Simon Willison's first release candidate for sqlite-utils v4 adds a built-in migrations system and nested transactions, according to the release announcement and the detailed release writeup.
- The new migrations feature folds Willison's earlier sqlite-migrate package into sqlite-utils, with a lightly modified port rather than a brand-new implementation, per the detailed release writeup.
- The release candidate introduces minor backward incompatible changes, which is why Willison framed the v4 bump as a release candidate first in the detailed release writeup.
- The migration flow is aimed at both Python and CLI workflows, with migration functions defined in code and then applied against a database, as shown in the detailed release writeup.
[srC:0|the detailed release writeup]
You can get the high-level ship note from the release announcement, the fuller breakdown from the detailed release writeup, and the separate release entry from the release post if you just want the version pointer.
Migrations
sqlite-utils 4.0rc1 adds migrations and nested transactions
sqlite-utils is my combined Python library and CLI tool for working with SQLite databases. It provides an extensive set of higher-level operations on top of Python's default sqlite3 package, including support for complex table transformations, automatic table creation from JSON data and a whole lot more. I released sqlite-utils 4.0rc1, the first release candidate for sqlite-utils v4. The major version bump indicates some (minor) backwards incompatible changes, so I'm interested in having people try this out before I commit to a stable release. New feature: migrations There are two significant new features in this RC compared to the previous 4.0 alphas. The first is support for database migrations. This isn't a completely new implementation - it's a slightly modified port of the sqlite-migrate package I released a few years ago. I think that package has proved itself over time, so I'm now ready to bundle it with sqlite-utils directly. Here's what a set of migrations in a migrations.py file looks like: from sqlite_utils import Database, Migrations migrations = Migrations("creatures") @migrations() def create_table(db): db["creatures"].create( {"id": int, "name": str, "species": str}, pk="id", ) @migrations() def add_weight(db): db["creatures"].add_column("weight", float) This defines a set of two migrations, one creating the creatures table and another adding a column to it. You can then run those migrations either using Python: db = Database("creatures.db") migrations.apply(db
The biggest new subsystem in 4.0rc1 is migrations. Willison wrote that sqlite-utils now ships a migration system directly, using a slightly modified port of sqlite-migrate, a package he had maintained separately before the detailed release writeup.
The example in the detailed release writeup defines migrations as Python functions decorated under a Migrations("creatures") registry, then applies them against a database in sequence. The sample flow creates a table first, then adds a weight column as a second migration.
That matters because sqlite-utils has mostly been a higher-level SQLite toolkit for table creation, JSON import, and schema transforms. Version 4 pulls schema evolution into the same toolchain the detailed release writeup.
Nested transactions
The other headline addition is nested transaction support, which Willison called out alongside migrations in the release announcement. The detailed post positions it as one of the two significant RC features added since the earlier 4.0 alphas the detailed release writeup.
The post excerpt in the evidence does not spell out the implementation details, but it does establish the feature as part of the core v4 jump rather than a minor patch item the detailed release writeup.
Release candidate status
sqlite-utils 4.0rc1
Release: sqlite-utils 4.0rc1 See sqlite-utils 4.0rc1 adds migrations and nested transactions. Tags: sqlite-utils
Willison described the incompatibilities as minor, but still said the major version bump warranted an RC so people could try it before a stable v4 release the detailed release writeup. That makes this less of a quiet feature drop and more of a test window for existing sqlite-utils users.
The evidence also shows this was shipped as 4.0rc1, not final 4.0, with the short release entry in the release post pointing readers back to the full announcement. That split gives the release a simple version marker and a longer migration-focused rationale.