sqlite-utils 4.0rc1 adds migrations and nested transactions

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

SQLite-utils users get schema migrations and nested transactions in a 4.0 release candidate with several breaking changes, so anyone upgrading should test now before the stable version ships.

Read this as

sqlite-utils is a free, open-source tool for working with SQLite, a popular lightweight database. Its author, Simon Willison, released a test version, 4.0rc1, of a major update. It adds 'migrations', a safe way to change a database's structure over time, and simpler handling of transactions, where groups of database changes either all succeed or all fail. It only affects people who build software using this specific tool.

Simon Willison shipped 4.0rc1 of sqlite-utils, the first release candidate of a major update to his widely used open-source SQLite library and command-line tool. Two headline additions are database migrations and nested transactions via db.atomic(). The version bump brings breaking changes, including type detection now defaulting on CSV imports and a new upsert implementation, so teams using sqlite-utils should test against the RC before the stable 4.0 release. It is free, and feedback goes through GitHub or Discord.

sqlite-utils 4.0rc1 bundles the sqlite-migrate package as a Migrations API (no reverse migrations; fix-forward by deploying new migrations), usable via Python's migrations.apply(db) or the CLI 'sqlite-utils migrate'. A new db.atomic() context manager implements nested transactions using SQLite savepoints, borrowed from Django/Peewee terminology; Willison flags it as less tested. Breaking changes include upserts using INSERT ... ON CONFLICT SET (opt-out via use_old_upsert=True), dropping Python 3.8, default type detection for CSV/TSV inserts, REAL replacing FLOAT, and db.view() replacing db.table() for views.

Read the original

This summary exists to save you time, not to replace the source.

Also covered by 1 other source

Same story, reported independently. Useful for a second read.

Key terms

sqlite-utils SQLite sqlite-migrate LLM Django Peewee

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading