ContextArticle
sqlite-utils 4.2 adds lots of improvements to the table.transform() feature, which supports complex alter table operations by creating a fresh table, copying across the data, and then dropping and replacing the old one.
The release announcement highlights table.transform() as the main focus: it now supports complex ALTER TABLE operations by rebuilding a fresh table, copying data, then dropping and replacing the old one. ✦ AI generated
Simon Willison · Simon Willison's Weblog · 2026-08-13 · original ↗
Lots of improvements in this one relating to the table.transform() feature, which adds support for complex alter table operations by creating a fresh table, copying across the data and then dropping and replacing the old one.
Read full article ↗excerpt · fair-use quotation
Around this claim
This moment responds to
extends → In sqlite-utils 4.2, transform() preserves a much larger array of edge-case schema definitions, including check constraints, unique constraints, and even comments describing the columns.Simon Willison · Simon Willison's Weblogexplains mechanism → table.transform()/table.transform_sql() and the sqlite-utils transform CLI command now accept strict=True/False or --strict/--no-strict to change a table's SQLite strict mode, since transform already copies data into a new table and can therefore switch strictness in either direction.Simon Willison · Simon Willison's Weblogexplains mechanism → table.transform() implements the SQLite-documentation-recommended pattern for altering tables beyond what ALTER TABLE supports: create a new temp table with the new schema, copy the data across, then drop the old table and rename the new one into place.Simon Willison · Simon Willison's Weblog