Expand description
Schema-migration application.
RFC-v0.7 Wave 0, Q12. Migrations are applied out-of-band by
the operator via a future sqlx migrate run CLI entry (or this
apply_migrations function in tests). The ff-server binary does
NOT auto-apply on backend connect; at boot it runs a
schema-version check (crate::version::check_schema_version)
and refuses to start on mismatch per Q12’s branch rules. The
rationale lives in the adjudication block in
rfcs/drafts/v0.7-migration-master.md §Q12:
- Auto-apply across N replicas races on the sqlx advisory lock and stalls rolling deploys.
- Auto-apply fights peer-team-boundaries — cairn’s SRE owns DDL timing.
Enums§
- Migration
Error - Migration application failure. Thin newtype over
sqlx::migrate::MigrateErrorso we can attach crate-local context in later waves (e.g. DDL-lock-timeout hint, destructive-migration guard) without breaking the public fn signature.
Functions§
- apply_
migrations - Apply all pending migrations bundled in this crate’s
migrations/directory.