Skip to main content

Crate ruprizzle_migrate

Crate ruprizzle_migrate 

Source
Expand description

Snapshot, diff, plan, apply.

Computes the difference between the target Schema and the schema stored in the database, emits up/down SQL, and applies migrations in order under advisory locking. The snapshot format is the serialized ruprizzle_core::ir::Schema, so this crate never defines a second description of a schema.

Re-exports§

pub use change::Change;
pub use change::ColumnAspect;
pub use diff::diff;
pub use drift::detect;
pub use error::Error;
pub use plan::down_sql;
pub use plan::plan;
pub use plan::up_sql;
pub use runner::Migration;
pub use runner::MigrationMeta;
pub use runner::Migrator;
pub use runner::Report;
pub use runner::Status;

Modules§

change
The Change taxonomy produced by crate::diff::diff.
diff
Schema diffing: turn two Schemas into a Vec<Change>.
drift
Lightweight drift detection: compare the live database against a snapshot.
error
Migration errors.
introspect
Database introspection for ruprizzle db pull.
plan
Turn a list of Changes into ordered, executable Stmts.
rename
Conservative heuristic rename suggestions.
runner
Migration directory scanning, checksum verification, and application.