Adding a new column sounds simple, but the wrong approach can lock tables, block writes, and take down production. At scale, schema changes are as critical as code deploys. A single ALTER TABLE on a high-traffic system can saturate I/O and trigger timeouts across services.
The process starts with defining the column’s name, data type, and defaults. Choose types that match storage needs and query patterns. Avoid wide types on frequently accessed tables. If you set a default value, know that backfilling it across millions of rows can be expensive. For zero-downtime changes, create the new column as nullable, deploy application code that writes to it, backfill in controlled batches, and then enforce constraints in a later migration.
Indexes deserve special care. Adding them along with the new column can multiply the migration cost. Often, it’s safer to stagger these steps: create the column, backfill, verify, then add indexing once the data is in place.