Skip to main content

MIGRATION_SQL

Constant MIGRATION_SQL 

Source
pub const MIGRATION_SQL: &[(&str, &str)];
Expand description

Additive migrations for pre-existing databases. Each entry is (sql, column) where column is checked via PRAGMA table_info before running, so each migration is idempotent — it runs only when the column is actually missing. This never crashes on “duplicate column” even if _meta.schema_version lags behind reality (e.g. a DB upgraded by an earlier build that added the column without bumping the version).