Adding a new column sounds simple. It can be, if you know the risks. Schema migrations touch production data. The wrong change, made the wrong way, can lock rows, block queries, or take your service down.
Start with design. Decide on name, type, nullability, and defaults. Avoid implicit conversions when backfilling values. If this column will be indexed, measure the cost before you create the index. For large datasets, plan for staged rollout—add the new column first, then populate in batches, then add constraints or indexes.
For relational databases like PostgreSQL or MySQL, the ALTER TABLE command is the direct path. But direct can be dangerous at scale. Schema migrations should be atomic for small tables, online for large ones. Use tools that create the column without locking the entire table—PostgreSQL’s ADD COLUMN is fast for empty columns but expensive if you set a default. MySQL supports ALGORITHM=INPLACE to reduce downtime.