How the journal mode is chosen. WAL needs working shared-memory locking, which network
filesystems often lack and which SQLite will silently downgrade; the default therefore
verifies the mode that took effect and falls back to a rollback journal.
Environment kill-switch (wal | delete | truncate) for a misclassified mount in the
field. An app’s own variable (DbOptions::journal_env) is checked first.
Idempotent ALTER TABLE .. ADD COLUMN (SQLite has no IF NOT EXISTS for columns).
table, column and decl must be literals from the app, never user input.
True if table has column, including STORED/VIRTUAL generated columns (table_xinfo;
table_info omits them, which made MailRight re-run an ALTER on every open).
Revert to target by replaying each step’s down, highest first, one transaction per step.
Refuses before touching anything unless every step in the range has a down.