Skip to main content

Module diff

Module diff 

Source
Expand description

Schema diffing: old snapshot + new structs → one migration file.

SQLite only supports ADD COLUMN, DROP COLUMN and RENAME COLUMN directly — and even those with restrictions. Anything else (type change, adding NOT NULL/UNIQUE, changing a default, FK or CHECK) is emitted as the standard rebuild dance: create the new shape under a temporary name, copy the rows across, drop the old table, rename.

Structs§

Migration

Functions§

diff_schemas
Diff two schemas. Returns None when they are identical.