Skip to main content

Module migration

Module migration 

Source

Modules§

sqlite_executor
SQLite forward migration execution and history recording.

Structs§

ColumnState
An owned column definition in a migration state.
DeferredForeignKey
A foreign key whose definition is resolved from the current schema state.
ForeignKeyState
An owned foreign-key definition in a migration state.
Migration
A declarative schema or SQL migration.
MigrationGraph
A validated migration dependency graph with deterministic replay order.
MigrationId
A stable migration name, scoped to an application.
MigrationPlanStep
One migration selected by the planner. SQL rendering and execution are deliberately separate from dependency planning.
ModelKey
Stable identity of a model independently from its SQL table name.
ModelState
A model and its current table definition in a historical project state.
PostgresOperationPlan
PostgresSchemaEditor
ProjectState
The fully owned schema produced by replaying migrations.
SchemaObjectState
SqliteOperationPlan
SQL and resulting historical state for one SQLite schema operation.
SqliteSchemaEditor
Renders declarative migration operations for SQLite. Operations that alter a table’s shape use SQLite’s reliable create-copy-drop-rename workflow.
TableState
An owned table definition in a migration state.

Enums§

MigrationError
Errors while validating or replaying migrations.
MigrationOperation
A migration state transition.
SchemaObjectKind
A named SQLite object which belongs to the migration state but is not an ORM model. Triggers and views are kept structurally so a fresh database can be recreated without embedding a whole-schema SQL baseline.
StateChange
A deterministic difference between historical and current model state. Field renames keep their physical SQL column when db_column preserves it.

Functions§

operations_from_changes
Converts a deterministic schema difference into forward migration operations, preserving the order chosen by ProjectState::diff.
pending_operation_migrations
Validates checksums and dependency history without accessing either backend.
render_migration_rust
Renders a self-contained Rust migration definition. The output deliberately calls Migration::new, so its checksum always describes the source that will be compiled and registered.