Half a feature, used carefully
SQLite's ALTER TABLE is intentionally limited compared to Postgres. The supported operations:
ALTER TABLE t RENAME TO new_nameALTER TABLE t RENAME COLUMN old_name TO new_name(3.25+)ALTER TABLE t ADD COLUMN c TYPE [constraints]ALTER TABLE t DROP COLUMN c(3.35+)
That's it. You cannot change a column's type, you cannot add a constraint to an existing column, you cannot reorder columns. For those, the canonical pattern is the CTAS dance: create a new table with the new shape, copy the data over, drop the old, rename.
Warning:
ADD COLUMN with a default expression that is non-constant (e.g., DEFAULT (random())) is rejected. The default must be a literal or a constant expression. Workaround: ADD with NULL default, then UPDATE to populate.