Problem: Schema or data cutover must not race with writers, and verification must stay under application control.
Approach:
- Register a migration with
migration.Coordinator(source/target, optional resource IDs, owner, fence). - Advance phases: planned → validated → preparing → copying → verifying → cutover → completed (or paused / failed / compensating).
- Supply
VerifyStepsand optionalCutoverhooks — ShiftLock never executes arbitrary SQL. - Use dry-run to walk validation/copy/verify while skipping cutover mutation.
- Pause/resume via checkpoints; lockdown and ownership/fencing hooks block unsafe advances.
CLI: shiftlock migrations list|start|pause (-dry-run or -confirm required for start).
See also: migration, resource/database/postgres, workflow compensation, docs/audits/phase-7-audit.md.