Adding a new column is one of the most common changes in database work, yet it is also one of the most dangerous when done without planning. An unplanned ALTER TABLE on a large production dataset can lock reads, spike CPU, and slow every request. The goal is speed, safety, and zero downtime.
First, decide if the new column is mandatory for existing rows. If it needs a default value, set it at the application level before altering the table. This avoids database-wide rewrites during the migration. If the column can be nullable, create it as NULL first; populate it in small background batches to keep load low.
Use schema migration tools to version and apply the change. Tie migration scripts to your deployment pipeline so code and schema changes ship together. Run the migration in staging with real-size data to measure impact. Monitor query plans after release—the optimizer may change behavior with the new column in place.