Expand description
Forward-only SQL migrations for Sentinel ORM.
Two entry points:
Migrator::from_dir("migrations/")for the CLI and dev workflows.sntl_migrate::migrate!("./migrations")(re-exported fromsntl-macros) for compile-time embedding into a production binary.
See docs/migration-guide.md for the full user guide.
Re-exports§
pub use error::Error;pub use error::Result;pub use migration::Migration;pub use migration::TxMode;pub use migration::Version;pub use runner::MigrationReport;pub use runner::MigrationStatus;pub use runner::Migrator;pub use runner::RefreshConfig;pub use runner::State;
Modules§
- checksum
- diff
- Schema-diff scaffolding: compute structural changes between two
sntl_schema::Schemasnapshots and emit a SQL skeleton for review. - discover
- error
- macro_
support - Helpers consumed by the
sntl_migrate::migrate!()proc-macro. - migration
- refresh
- runner
- tracking
Macros§
- migrate
sntl_migrate::migrate!("./migrations")— embed amigrations/directory into the binary at compile time. Expands to a fully-populatedMigratorthat usesinclude_str!for eachup.sql/up.notx.sqlfile.
Constants§
- SNTL_
MIGRATE_ LOCK_ ID - The PostgreSQL advisory-lock ID used to serialise concurrent migrators. ASCII bytes “sntlmgrt” — chosen to be unlikely to collide with other tools.