Adding a new column sounds simple. It is not. Done wrong, it can lock a table, block writes, and stall production traffic. Done right, it is invisible to the end user and safe for the database.
A new column changes schema, storage, and queries. Before running ALTER TABLE, you must know the table size, engine, indexes, and replication lag. On large datasets, schema changes can take minutes or hours. Without precautions, they can cascade into downtime.
Use online schema change tools when adding a new column to production. They build a shadow table, copy data, and swap in the new schema with minimal locks. This design keeps queries flowing while the column is inserted in the background. Test with a replica first. Measure query plans before and after.
Decide if the new column should allow NULL values. Adding a NOT NULL column without a default forces a full table rewrite. For high-traffic systems, always start with NULL allowed, backfill in batches, then enforce constraints. Avoid triggers for backfill; they add load and complexity.