Skip to main content

appstruct_migrate/
lib.rs

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