The fix was simple: add a new column.
A new column can change how your system works at its core. Done right, it improves performance, enables new features, and extends the life of your database. Done wrong, it triggers downtime, data corruption, or silent application errors.
Before adding a new column, define the exact schema. Decide the data type. Consider NULL defaults, constraints, and indexing. Adding a column without defaults on a live table can block writes. Adding it with the wrong type can force expensive migrations later.
Use transactional DDL when possible. In PostgreSQL, ALTER TABLE … ADD COLUMN is often fast if the column allows NULLs without a default. In MySQL, the same operation can lock the table and cause latency spikes. For large datasets, create the column empty, backfill in batches, then apply constraints.