safe_migrate/lib.rs
1//! PostgreSQL migration safety analysis backed by a synchronized catalog baseline.
2//!
3//! Supported integrations use the [`api`] module. Parser, schema-state, and
4//! rule-engine implementation details are intentionally private.
5#![warn(missing_docs)]
6#![deny(unreachable_pub)]
7
8/// Supported Rust API for configuration, synchronization, and analysis.
9pub mod api;
10
11// Lets crate-internal regression modules retain their historical fully
12// qualified paths while compiling inside this crate's privacy boundary.
13#[cfg(test)]
14extern crate self as safe_migrate;
15
16#[cfg(test)]
17#[path = "../tests/common/mod.rs"]
18mod common;
19
20// The analyzer and catalog model are deliberately private. The supported
21// contract is `safe_migrate::api`; keeping this crate-private prevents callers
22// from coupling to mutable state-machine implementation details.
23pub(crate) mod _internal {
24 pub(crate) mod analysis;
25 pub(crate) mod ast;
26 pub(crate) mod db;
27 pub(crate) mod engine;
28 pub(crate) mod model;
29 pub(crate) mod report;
30 pub(crate) mod rules;
31 pub(crate) mod sync;
32
33 #[cfg(test)]
34 pub(crate) mod sync_tests;
35 #[cfg(test)]
36 pub(crate) mod test_support;
37}
38
39#[cfg(test)]
40#[path = "internal_tests.rs"]
41mod internal_tests;