Skip to main content

rust_ef/migration/
mod.rs

1//! Migration engine — model snapshot diffing, migration generation, and history tracking.
2//!
3//! Corresponds to EFCore's migration system. Implements full model diffing:
4//!   - Detect added/removed tables
5//!   - Detect added/removed/altered columns
6//!   - Generate Up/Down SQL with dialect-specific type mappings
7//!   - Maintain `__ef_migrations_history` tracking table
8
9mod ddl_expr;
10mod dialect;
11mod diff;
12mod engine;
13mod engine_ops;
14mod engine_sql;
15mod history;
16mod schema_change;
17mod snapshot;
18mod snapshot_io;
19mod types;
20
21pub use dialect::MigrationDialect;
22pub use engine::MigrationEngine;
23pub use history::{
24    create_migration_history_table_sql, validate_migration_id, MigrationHistoryEntry,
25    MigrationStore, MIGRATION_HISTORY_TABLE, PRODUCT_VERSION,
26};
27pub use snapshot::{build_registered_snapshot, save_registered_snapshot, write_snapshot};
28pub use snapshot_io::parse_model_snapshot_json;
29pub use types::{
30    Migration, ModelSnapshot, SnapshotCheck, SnapshotColumn, SnapshotEntityType,
31    SnapshotForeignKey, SnapshotIndex, SnapshotIndexColumn, SnapshotTableOptions,
32};