Adding a new column is one of the most common schema changes in production databases. It looks simple, but the wrong approach can trigger downtime, lock writes, or cause inconsistent data. In high-traffic systems, even a short lock can ripple into failures or lost revenue.
Before adding a new column, confirm the exact data type, default value, nullability, and whether it must be indexed. Choose the smallest possible type to reduce storage and I/O. Avoid adding indexes at the same time as the column if possible; create them in a separate step to limit locking.
In relational databases like PostgreSQL or MySQL, some operations are metadata-only and near-instant. Others rewrite the entire table. Understand the difference. For PostgreSQL, adding a nullable column with no default is fast. Adding a column with a non-null default rewrites the table. In MySQL, the storage engine decides the cost. Always test migration behavior against a realistic dataset.