A single database change can decide the speed of your next release. You need a new column. You need it now.
Adding a new column to a live table sounds simple, but small mistakes here have taken down production systems. The database will lock. Queries will stall. Memory will spike. If you approach it without a plan, you will lose uptime.
The first step is knowing your database engine’s behavior. In PostgreSQL, adding a nullable column with no default is instant. Adding a column with a default writes to every row and can block for minutes or hours. MySQL behaves differently depending on storage engine and version. Reading the docs is not enough—test it on real data in staging.
For zero-downtime migrations, create the new column without defaults. Backfill it in small, controlled batches, using indexed queries to avoid full table scans. Monitor slow queries while this runs. Add the default and constraints only after backfill completes.