Freeze
Goal
A command analogous to pip freeze (working title mitch freeze) records the migrations a deployment has applied, in their exact order, so that another deployment can be migrated in the same order. Example: production follows staging step by step.
Why
The DAG only orders migrations that depend on each other; independent ones run in a tie-break order (creation time, then ID). Sometimes the order matters without a dependency, for example two migrations that both add values to the same enum with ALTER TYPE ... ADD VALUE, where the value order changes comparisons.
Already settled
- Order among independent migrations is a tie-break, not a guarantee: ADR
project/migrations-form-a-dag. - Ordering constraints (
after) can fix an order without requiring the other migration: ADRproject/ordering-constraints-do-not-require(specced in issue #2). - The audit table numbers every apply and revert sequentially, so each deployment already knows its exact history.