pub fn diff(
from: &ProjectState,
to: &ProjectState,
) -> Result<Vec<Operation>, MigrationError>Expand description
Operations that turn from into to, in a deterministic order:
- Delete constraints, indexes, fields
- Delete models (reverse FK dependency order)
- Rename fields
- Create models (topological by FK dependencies; cyclic FKs are
deferred as
Operation::AddField) - Add / alter fields
- Create indexes and constraints