Skip to main content

compute_migration

Function compute_migration 

Source
pub fn compute_migration(
    old_schema: &SymbolTable,
    new_schema: &SymbolTable,
    config: &MigrationConfig,
) -> Result<SchemaMigrationPlan, MigrationError>
Expand description

Compute the full migration plan needed to go from old_schema to new_schema.

Steps:

  1. Build snapshots of both schemas.
  2. Detect predicate additions, removals, and arity changes.
  3. Detect domain additions and removals.
  4. Detect variable/rule additions and removals.
  5. Optionally resolve renames by similarity.
  6. Synthesise SchemaMigrationSteps.
  7. Enforce allow_breaking_changes policy.