Adding a new column to a table is one of the most common database changes. It looks simple, but the impact can ripple across APIs, caches, and dependent services. Schema migrations that add columns must be planned to avoid downtime, race conditions, or incompatibility with older application versions.
Plan for forward compatibility. Introduce the new column with a default value or make it nullable, so existing writes continue without error. Roll out application changes before enforcing new constraints. This order prevents requests from hitting a schema the code doesn’t understand.
Index only when necessary. While a new index on a column can enhance query performance, it can also slow inserts and updates. On large datasets, build indexes concurrently if your database supports it, to avoid locking tables.