Hasty Briefsbeta

Bilingual

SQLite-utils 4.0, now with database schema migrations

6 hours ago
  • #python-library
  • #sqlite
  • #database-migrations
  • sqlite-utils 4.0 introduces database schema migrations, nested transactions via db.atomic(), and support for compound foreign keys.
  • Migrations allow defining sequential changes to SQLite databases with tracking via a _sqlite_migrations table, using Python files and the table.transform() method.
  • Key breaking changes include upserts using SQLite's ON CONFLICT syntax, db.query() now requiring db.execute() for writes, and CSV imports detecting column types by default.
  • The release integrates the previously separate sqlite-migrate package, making migrations a core feature of the sqlite-utils/Datasette/LLM ecosystem.
  • Claude Fable 5 significantly assisted in identifying bugs and improving API design, contributing to a higher-quality release with comprehensive documentation generated by AI models.