Skip to main content

Crate sql_orm_migrate

Crate sql_orm_migrate 

Source
Expand description

Migration support foundations.

Structs§

AddColumn
Add a new column to an existing table.
AddForeignKey
Add a foreign key to an existing table.
AlterColumn
Alter an existing column by comparing the previous and desired snapshots.
ColumnSnapshot
Snapshot of a table column, aligned with the code-first metadata already defined in sql-orm-core.
CreateIndex
Create a missing index on an existing table.
CreateSchema
Create a missing SQL Server schema.
CreateTable
Create a table from its full snapshot.
DropColumn
Drop an existing column from a table.
DropForeignKey
Drop a foreign key from an existing table.
DropIndex
Drop an index from an existing table.
DropSchema
Drop a SQL Server schema that no longer exists in the model.
DropTable
Drop a table by schema and name.
ForeignKeySnapshot
Snapshot of a foreign key, including referenced target and referential actions.
IndexColumnSnapshot
Snapshot of a column inside an index definition.
IndexSnapshot
Snapshot of an index, including the participating columns and sort order.
MigrationEngine
Placeholder migration engine marker.
MigrationEntry
MigrationScaffold
ModelSnapshot
Serializable model snapshot shape used by future migration history artifacts.
RenameColumn
Rename an existing column in a table without recreating it.
RenameTable
Rename an existing table inside the same schema without recreating it.
SchemaSnapshot
Snapshot of a SQL Server schema and the tables currently modeled inside it.
TableSnapshot
Snapshot of a SQL Server table with the minimum structural information needed for the first migration diff passes.

Enums§

MigrationOperation
Ordered migration operations emitted by the diff engine.

Constants§

CRATE_IDENTITY

Functions§

build_database_downgrade_script
build_database_update_script
create_migration_scaffold
create_migration_scaffold_with_snapshot
diff_column_operations
Computes additive/removal/basic-alteration column operations for tables present in both snapshots. Table creation/deletion remains the responsibility of diff_schema_and_table_operations.
diff_relational_operations
Computes additive/removal operations for indexes and foreign keys in tables present in both snapshots. Table creation/deletion remains the responsibility of diff_schema_and_table_operations.
diff_schema_and_table_operations
Computes the minimum stage-7 diff for schema and table creation/deletion.
latest_migration
list_migrations
read_latest_model_snapshot
read_model_snapshot
write_migration_down_sql
write_migration_up_sql
write_model_snapshot