sqlite-utils 4.0 Released: Introduces DB Schema Migrations and Major Updates
Simon Willison · rss · 2026-07-08
Simon Willison announced the release of sqlite-utils 4.0, the library's first major version update since 2020. The new version introduces several important features and fixes some backward compatibility issues.
Core New Features
- Database Schema Migrations: Provides a structured mechanism to evolve a project's database schema, supporting migration steps defined via Python files and automatically tracking application state.
- Nested Transaction Support: Added the db.atomic() method, utilizing SQLite Savepoints to implement nested transactions, making the migration system safer and more reliable.
- Composite Foreign Key Support: Comprehensive support for the creation, conversion, and introspection of composite foreign keys.
Other Improvements
- Upserts operations now use the INSERT ... ON CONFLICT ... DO UPDATE SET syntax and automatically detect primary keys.
- CSV/TSV imports now automatically detect column types by default.
The author detailed code examples for the migration feature in the post and shared design philosophies (like dropping rollback functionality to maintain minimalism). Additionally, he mentioned using AI coding agents to review issues and assist in generating API designs when developing complex features like composite foreign keys.
More from coding & agent
- HeyGen adds a media-sourcing skill for coding agents with 75k images and 10k tracks — HeyGen · 2026-07-22
- Agent search bottlenecks are now about variance, not raw latency — rohanpaul_ai · 2026-07-22
- LangSmith adds tracing for Pipecat, LiveKit, OpenAI Realtime, and Gemini Live — LangChain · 2026-07-22
- An MCP server signs every AI agent tool call into a verifiable Merkle chain — Funky_Chicken_22 · 2026-07-22
- Annotated transcript of a Claude Code team interview is now available — trq212 · 2026-07-22
- Claude Code skill uses 10 Markdown rules to make outputs ADHD-friendly — alex_verem · 2026-07-22