Re:SQLite in Production: Optimizing WAL Mode, Concurrency, a...
by runlaszlorun on Wednesday July 29, 2026 @08:32AM
(#49096644)
I'd def recommend simonw's CLI and Python lib for anyone doing SQLite stuff, there's all kinds of stuff there.
For alter table it offers a "transform" command which implements the pattern of creating a new table with your desired scheme, copying data to it from the old table, then renaming the tables (all in a transaction): https://sqlite-utils.datasette.io/en/stable/cli.html#transfo...
And for migrations there's a new-in-v4 "migrate" command which lets you create and execute an ordered sequence of migrations: https://sqlite-utils.datasette.io/en/stable/cli.html#running... Migrations files look like this: https://sqlite-utils.datasette.io/en/stable/migrations.html#...