The database migration failed halfway through. Now nothing loads, and the logs are a mess. All because you forgot to add one new column.
A new column sounds simple. In reality, it’s a change that can break production, slow queries, or trigger a costly rollback. Schema evolution is where discipline matters. You need the right workflow to add or modify columns without downtime or data loss.
Start by designing the new column with clear intent. Define its data type, default values, and nullability. Consider indexing if queries will use it in filters or joins. Avoid defaults that trigger expensive table locks during backfill on large datasets.
Next, handle migrations in a way that scales. On high-traffic systems, use phased rollouts. Add the column first without constraints. Backfill data in small batches. Then apply constraints or indexes once the data is stable. This avoids long-running locks and reduces risk.