Adding a new column is the most common schema change, but it can still break production if handled badly. Downtime, locked tables, slow queries—these risks surface fast when data volume is high.
The safest path starts with defining the column in a way that matches future queries. Pick the correct data type at the start. Avoid nullable columns if the data will always exist. Set sensible defaults to keep inserts and updates lean.
When altering large tables, use an online migration strategy. In PostgreSQL, ALTER TABLE ADD COLUMN can still lock writes depending on the change. MySQL offers ALGORITHM=INPLACE for certain column adds. For systems with heavy write loads, break the process into steps—first create the column, then backfill in batches, and finally add constraints or indexes once data is stable.
Index choices matter. Adding an index at creation can save later effort, but indexes slow writes. On read-heavy workloads with frequent filters on the new column, create the index after the backfill to avoid extended migration time.