Adding a new column sounds simple. In production, it can be the most dangerous change to your database. Done wrong, it locks tables, stalls queries, and hurts performance. Done right, it rolls out without users noticing.
When you add a new column, the first step is to understand the impact on storage. In relational databases, adding a nullable column is fast in some engines but slow in others. For example, PostgreSQL can add a nullable column with a constant default instantly. MySQL may rewrite the entire table. Always check the exact behavior for your database version.
Next, plan for writes and reads during the migration. If the application expects the new column right away, you need to deploy in phases. Add the column first. Backfill it in small batches to avoid load spikes. Then update the code to use it.
Indexing a new column should be a separate operation. Creating an index can be more expensive than adding the column itself. Schedule it during off-peak hours or use online index creation where available.