Expand description
Purpose: Provide the public migration API surface and top-level orchestration.
Responsibilities:
- Declare migration companion modules.
- Re-export migration data models and context types.
- Check, apply, and list migrations without owning leaf migration logic.
Scope:
- Top-level orchestration only; type definitions live in
types.rs, history persistence lives inhistory.rs, and leaf migration behavior lives inconfig_migrations/andfile_migrations/.
Usage:
- Import migration helpers through
crate::migration. - Internal modules may use the re-exported types or sibling companion modules.
Invariants/Assumptions:
- Re-exports preserve existing caller imports.
- Migrations remain idempotent and registry-driven.
- Migration history is saved immediately after each successful apply.
Modules§
- config_
migrations - Purpose: Directory-backed facade for config migration helpers.
- file_
migrations - Purpose: Directory-backed facade for file migration helpers.
- history
- Migration history persistence for tracking applied migrations.
- registry
- Migration registry containing all defined migrations.
Structs§
- Migration
- A single migration definition.
- Migration
Context - Context for migration operations.
- Migration
Status - Status of a migration for display.
Enums§
- Migration
Check Result - Result of checking migration status.
- Migration
Type - Types of migrations supported.
Functions§
- apply_
all_ migrations - Apply all pending migrations.
- apply_
migration - Apply a single migration.
- check_
migrations - Check for pending migrations without applying them.
- list_
migrations - List all migrations with their status.