DevOps & CI/CD

Zero-Downtime Database Schema Migration

DevOps & CI/CD diagram · made in Skemio

Flowchart showing database migration steps: adding nullable column, dual-writing, backfilling records, verifying parity, and dropping legacy column.
Flowchart showing database migration steps: adding nullable column, dual-writing, backfilling records, verifying parity, and dropping legacy column.

What it shows

  • The Expand phase adds new columns as nullable without touching old ones.
  • Apps dual-write to both columns while asynchronous jobs backfill data.
  • The Contract phase removes obsolete columns only after full deprecation.

The takeaway

Expand and contract decouples schema changes from code releases, guaranteeing zero downtime.

More devops & ci/cd diagrams