Skip to content
Mermaid templates

Database migration rehearsal and rollback gate

Separates reversible routing from later schema retirement and requires backfill reconciliation. Original worked design example; adapt responsibilities, thresholds and assumptions to your system.

Template previewMermaid
Rendering…

What this template contains

Diagram type
Flowchart
Source
18 lines

Make it your own.

flowchart TD
P[Proposed migration] --> B[Verify restorable backup]
B --> R[Rehearse on representative copy]
R --> V{Data and performance checks pass?}
V -->|No| E[Revise migration]
E --> R
V -->|Yes| C[Confirm compatible application versions]
C --> W[Schedule controlled change window]
W --> A[Apply additive schema changes]
A --> D[Backfill in bounded batches]
D --> K{Reconciliation matches?}
K -->|No| S[Stop writes to new path and investigate]
K -->|Yes| T[Switch reads with observation]
T --> O{Service healthy?}
O -->|No| F[Revert routing to compatible old path]
O -->|Yes| Z[Retire old schema after agreed window]
S --> E
F --> E