Skip to main content

appstruct_migrate/
lib.rs

1//! Database schema diffing, risk classification, and PostgreSQL migration execution.
2
3mod diff;
4mod introspection;
5mod lint;
6mod runner;
7mod sql;
8
9pub use appstruct_schema::{
10    ColumnSchema, DatabaseSchema, DatabaseType, ForeignKeySchema, IndexSchema, SCHEMA_VERSION,
11    SeedSchema, SeedValueSchema, TableSchema, UniqueConstraintSchema, extract, from_json, to_json,
12};
13pub use diff::{
14    ChangeRisk, ExecutionRisk, MigrationPlan, PlannedChange, SchemaChange, SchemaRisk, diff,
15};
16pub use introspection::{
17    IntrospectedColumn, IntrospectedForeignKey, IntrospectedIndex, IntrospectedSchema,
18    IntrospectedTable, inspect_database_schema,
19};
20pub use lint::{LintSeverity, MigrationLint, lint_plan};
21pub use runner::{
22    ApplyReport, BaselineStatus, DriftStatus, MigrationError, MigrationStatus, apply_project,
23    baseline_project, connect_database, inspect_baseline, inspect_schema_structure,
24    stamp_schema_checksum, status_project,
25};
26pub use sql::{initial_migration, migration_sql};