A new column seems simple. One line in a migration file, a quick run of the script, maybe a commit message with “add new column to users table.” But under production load, schema changes are high-risk moves that can crash services, lock rows, and block deployments.
Adding a new column in SQL is not just ALTER TABLE ... ADD COLUMN. In PostgreSQL, certain column types will rewrite the table on disk if you set a default value without NULL. MySQL handles defaults differently, but large tables still lock during the change unless you use online DDL. In high-traffic systems, even milliseconds of lock time can cascade into request failures.
When adding a new column, plan for zero downtime. Avoid defaults in the first migration. Add the column as nullable, backfill values in small batches, then alter it to set the default once the table is populated. For PostgreSQL, tools like pg_repack or pg_online_schema_change help. For MySQL, pt-online-schema-change can keep operations live. Always test migrations against a production-like dataset to expose performance issues before they appear at 2:03 a.m.