Skip to main content

ruprizzle_migrate/
lib.rs

1//! Snapshot, diff, plan, apply.
2//!
3//! Computes the difference between the target `Schema` and the schema stored in
4//! the database, emits up/down SQL, and applies migrations in order under
5//! advisory locking. The snapshot format is the serialized
6//! `ruprizzle_core::ir::Schema`, so this crate never defines a second
7//! description of a schema.
8
9#![forbid(unsafe_code)]
10#![warn(missing_docs, clippy::pedantic)]
11#![allow(
12    clippy::assigning_clones,
13    clippy::cast_possible_truncation,
14    clippy::cast_possible_wrap,
15    clippy::default_trait_access,
16    clippy::large_enum_variant,
17    clippy::missing_errors_doc,
18    clippy::must_use_candidate,
19    clippy::uninlined_format_args,
20    clippy::unnecessary_map_or,
21    clippy::unused_self
22)]
23
24pub mod change;
25pub mod diff;
26pub mod drift;
27pub mod error;
28pub mod introspect;
29pub mod plan;
30pub mod rename;
31pub mod runner;
32
33pub use change::{Change, ColumnAspect};
34pub use diff::diff;
35pub use drift::detect;
36pub use error::Error;
37pub use plan::{down_sql, plan, up_sql};
38pub use runner::{Migration, MigrationMeta, Migrator, Report, Status};