Expand description
Schema migration runner for mempill-sqlite.
Applies versioned DDL to a rusqlite Connection in a deterministic, idempotent manner.
Schema version is tracked via SQLite’s built-in user_version PRAGMA.
§Intended PRAGMA environment (applied at connection open in connection.rs)
PRAGMA journal_mode=WAL;— write-ahead log for concurrent reads during writesPRAGMA synchronous=FULL;— full durability (mandatory; WAL+NORMAL can lose writes on power loss)PRAGMA foreign_keys=ON;— enforce FK constraints defined in DDL
Enums§
- Migration
Error - Migration error wrapper.
Constants§
- CURRENT_
SCHEMA_ VERSION - The target schema version this runner brings the database to. Increment this constant (and add a new migration step) for every future DDL change.
Functions§
- apply_
migrations - Apply all pending migrations to
connup toCURRENT_SCHEMA_VERSION.