Skip to main content

sntl_migrate/
lib.rs

1//! Forward-only SQL migrations for Sentinel ORM.
2//!
3//! Two entry points:
4//! - `Migrator::from_dir("migrations/")` for the CLI and dev workflows.
5//! - `sntl_migrate::migrate!("./migrations")` (re-exported from `sntl-macros`)
6//!   for compile-time embedding into a production binary.
7//!
8//! See `docs/migration-guide.md` for the full user guide.
9
10pub mod checksum;
11pub mod diff;
12pub mod discover;
13pub mod error;
14pub mod macro_support;
15pub mod migration;
16pub mod refresh;
17pub mod runner;
18pub mod tracking;
19
20pub use error::{Error, Result};
21pub use migration::{Migration, TxMode, Version};
22pub use runner::{MigrationReport, MigrationStatus, Migrator, RefreshConfig, State};
23pub use sntl_macros::migrate;
24
25/// The PostgreSQL advisory-lock ID used to serialise concurrent migrators.
26/// ASCII bytes "sntlmgrt" — chosen to be unlikely to collide with other tools.
27pub const SNTL_MIGRATE_LOCK_ID: i64 = 0x736e_746c_6d67_7274_i64;