Pattern 92 / SCHEMA

Expand-Contract Migration

Use this when Changing schemas while old and new code overlap.

Pressure
Changing schemas while old and new code overlap
Mechanism
Expand schema, dual-write/read compatibly, migrate data, then contract old fields later
Toll
Takes multiple deployments and careful observability
Architecture plate92
Diagram for Expand-Contract Migration
Executive brief

Expand-Contract Migration fits when Changing schemas while old and new code overlap. Mechanism: Expand schema, dual-write/read compatibly, migrate data, then contract old fields later. Use it for Zero-downtime database migrations. The toll: Takes multiple deployments and careful observability.

Use when

Zero-downtime database migrations.

Example

Use expand-contract migration when zero-downtime database migrations..

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Data Evolution

91Schema Versioning93Tombstone
โ† 9193 โ†’