Skip to main content

Module migrate

Module migrate 

Source
Expand description

Schema migration runner — 4.0 → current chain.

Each step is atomic: BEGIN IMMEDIATE … COMMIT. Any failure rolls back the entire step and returns an error — no half-migrated state.

Functions§

run_migrations
Run all pending migrations on db_path. Idempotent if already at target. Returns the list of migration steps executed.
target_version
The schema version this binary migrates to (single source of truth for callers that want to report it, e.g. the CLI migrate “nothing to do” message).