Adding a new column in a database sounds simple. It rarely is. Schema changes are dangerous under load. A careless ALTER TABLE can lock rows, slow writes, and choke services. Even in systems built for scale, the wrong approach to adding columns can cascade into outages.
The safest method depends on the database engine, the table size, and the traffic pattern. In PostgreSQL, adding a column with a default value forces a table rewrite. Avoid that in high-traffic tables. Add the column as nullable, backfill in batches, then set the default and constraints in a separate step. In MySQL, ALTER TABLE can trigger a full table rebuild unless you use ALGORITHM=INPLACE with supported operations. Always check the execution plan before committing the change.
Schema migrations should be repeatable and reversible. Keep them in version control. Apply them in staging with production volumes. Monitor query performance before and after the change. The new column is not just a schema modification—it is a contract update. Applications reading or writing this column must handle it gracefully, even before the data is fully populated.