The migration script was minutes from production when the request dropped: add a new column. Not later. Now. No downtime. No broken queries.
Adding a new column in a live database sounds trivial until you face the scale and constraints that turn it into an operation. Done wrong, it locks tables, stalls writes, or corrupts your schema. Done right, it ships without anyone noticing—except the metrics.
First, choose the right migration type for your database engine. Some systems support instant column addition if you avoid default values and NULL-to-NOT NULL constraints. Others require a full table rewrite. Know the behavior before running ALTER TABLE.
Second, plan schema changes as two-phase deployments. Add the new column in one release with a safe default strategy, then backfill data asynchronously. Only after backfill should you enforce constraints or change nullability. This prevents load spikes and outages.