Add columns, change types, split tables — without downtime.
Online Schema Migrations: add columns, change types, split tables
shape data so reads and writes stay honest
Dual-write requires careful invariants.
Online migrations work in stages: write code that handles old + new schema, change schema, backfill, switch reads, drop old. Done right, no downtime.
Renames are particularly risky; prefer add+backfill+switch.
Big-table migrations need shadow tables and chunked backfills (gh-ost, pt-osc).
ALTER TABLE on Postgres mostly online for adding nullable columns; type changes are not.
Rename column with billions of rows.