A schema change can be trivial or catastrophic. Adding a new column should be fast, safe, and reversible. But in high-traffic systems, a naive approach can lock tables, slow queries, or cause outages. Engineers must plan each step with precision.
A new column in SQL is more than ALTER TABLE. You have to consider data type selection, nullability, defaults, and indexing. Adding a column with a default value in one statement will rewrite the entire table on some databases. This can take hours on large datasets. Better: add the column as nullable first, backfill in small batches, then apply a default constraint.
PostgreSQL handles new columns with ALTER TABLE ... ADD COLUMN. If you set a default, it rewrites only older versions prior to 11; in newer versions, the default is a metadata-only change. MySQL’s behavior depends on the storage engine and version, and may still require table reconstruction. Always check the execution plan before running changes in production.