jargon

Comparison

Expand and contractvsSchema migration

Expand and contract

you add the new column, write to both, backfill, switch reads, and only remove the old one in a later deploy.

The multi-step pattern for making a breaking change safely: expand the schema or contract additively, migrate over, then contract by removing the old form once nothing uses it. Each step is independently deployable and reversible. It takes three deploys instead of one, which is the price of never having a window where old and new code cannot coexist.

Full entry →

Schema migration

you have to change the shape of a table that is being read and written right now, without stopping either.

A versioned change to the database structure, applied in order and tracked alongside the code. The hard part is not the DDL but the overlap: old and new application versions run simultaneously during a deploy, so every migration must be compatible with both. A migration that takes a lock on a large table can be indistinguishable from an outage.

Full entry →

Related comparisons