Expand description
Migration engine ?model snapshot diffing, migration generation, and history tracking.
Corresponds to EFCore’s migration system. Implements full model diffing:
- Detect added/removed tables
- Detect added/removed/altered columns
- Generate Up/Down SQL with dialect-specific type mappings
- Maintain
__ef_migrations_historytracking table
Structs§
- Migration
- Represents a single migration with up/down SQL scripts.
- Migration
Engine - The migration engine ?compares old and new model snapshots to generate migration SQL.
- Migration
History Entry - Represents a record in the migration history table.
Table name:
__ef_migrations_historyCorresponds to EFCore’s__EFMigrationsHistory. - Migration
Store - Reads and writes migration scripts on disk.
- Model
Snapshot - A snapshot of the entity model at a point in time.
Corresponds to EFCore’s
ModelSnapshot. - Snapshot
Column - Serialized form of PropertyMeta for snapshot storage.
- Snapshot
Entity Type - Serialized form of EntityTypeMeta for snapshot storage.
Enums§
- Migration
Dialect - Specifies the database SQL dialect for migration generation.
Constants§
- MIGRATION_
HISTORY_ TABLE - Table name for migration history.
- PRODUCT_
VERSION - Product version recorded in migration history.
Functions§
- create_
migration_ history_ table_ sql - SQL to create the migration history table.
- parse_
model_ snapshot_ json - Parses a model snapshot JSON file (same format as
MigrationStore::save_snapshot).