The table was live in production when the request came in: add a new column without downtime. No staging delay. No broken queries. No errors in the logs.
A new column sounds simple. In practice, it can crash services, lock writes, or bloat migrations if done carelessly. The key is control over schema changes at scale. On large datasets, a naive ALTER TABLE ADD COLUMN can block traffic for minutes or hours. Worse, it can trigger full table rewrites.
Modern databases handle new column operations differently. PostgreSQL can add a nullable column with a default in near-constant time if defined correctly. MySQL needs careful configuration of ALGORITHM=INSTANT to avoid table rebuilds. In distributed systems like CockroachDB, schema changes run under transactional metadata updates, but still require monitoring to prevent unexpected load spikes.
The process begins with knowing the exact type and constraints. Adding a new column with NOT NULL requires backfilling existing rows. This can be done in batches with write amplification in mind. Avoid triggers or implicit conversions during the migration. Keep changes atomic but reversible.