The fix was a new column.
Adding a new column sounds simple. In production, it is not. Schema changes touch live data, indexes, queries, and migrations. One mistake can lock tables, spike CPU, or drop performance to zero. The key is to plan each step and run it with minimal risk.
Start by defining the exact schema change. Use ALTER TABLE with explicit data types. Never rely on defaults. Choose whether the new column allows NULL. Decide if you need a default value or if you will backfill later. Defaults will rewrite rows. In large tables, that can cause downtime.
For large datasets, create the new column without a default first. Then backfill in small batches. This avoids long locks. Test the backfill process on a staging database with realistic row counts. Measure lock times and I/O impact.
If your queries depend on the new column from day one, update application code to handle it before you backfill. This means reading it when present and falling back when absent. Deploy schema changes separately from application changes to keep rollbacks safe.