Adding a new column in a production database sounds simple, but in practice it touches performance, availability, and deployment timelines. It can block releases, trigger downtime, or cause silent failures if the migration is wrong. Done right, it can deliver new features without risk. Done wrong, it can burn entire sprints.
The core steps are clear. First, define the new column in the schema with explicit data types and constraints. Avoid ambiguous defaults. Decide if the column is nullable. A non-nullable column with no default will force table rewrites and lock rows, which can crush performance. For massive tables, splitting the migration into multiple deploys keeps writes safe.
Second, plan the rollout. Add the new column with a null default in one migration. Populate it in batches, using short transactions to reduce lock contention. Only after the data backfill is complete should you add constraints or make it non-nullable. This multi-step approach avoids long-running locks on hot paths.