Skip to main content

Module planner

Module planner 

Source
Expand description

Developer: s4gor Github: https://github.com/s4gor

Migration planning

The planner takes a schema diff and creates an executable migration plan. The plan is a sequence of operations that will transform the current schema into the target schema.

§Design Rationale

Separating planning from execution allows:

  • Dry-run mode to show what would happen
  • Validation of plans before execution
  • Different planning strategies (safe ordering, dependency resolution)
  • Testing plans without executing them

Structs§

CheckConstraintDefinition
Check constraint definition
ColumnChanges
Column changes for modify operations
ColumnDefinition
Column definition for migration operations
DefaultChange
Default value change (old and new)
ForeignKeyDefinition
Foreign key definition
IndexDefinition
Index definition
MigrationPlan
A migration plan containing the sequence of operations to execute
MigrationStep
A single step in a migration plan
PrimaryKeyDefinition
Primary key definition
TypeChange
Type change (old and new)
UniqueConstraintDefinition
Unique constraint definition

Enums§

MigrationOperation
A single migration operation

Traits§

Planner
Trait for planning migrations