The migration stalled. Production was live, but the schema needed a new column fast.
Adding a new column sounds simple. It isn’t—if you care about zero downtime, data safety, and performance. Getting it wrong can lock tables, delay writes, and cause outages. In high-traffic systems, you must treat every schema change as a live operation on a critical path.
A new column in SQL needs more than an ALTER TABLE statement. You must choose the right migration approach based on table size, database engine, and index strategy.
For small tables, a direct ALTER TABLE ADD COLUMN is fine. For large or heavily-used tables, you may need an online schema change tool like pt-online-schema-change for MySQL, or ALTER TABLE ... ADD COLUMN ... NULL followed by batched updates for Postgres. Always consider default values—adding a non-null column with a default forces a full table rewrite in many databases.