The table was broken. Not physically, but in the schema. The data needed a new column, and without it, everything downstream was failing.
Adding a new column sounds simple. It rarely is. One wrong move can lock a table, slow queries to a crawl, or break APIs that depend on a stable structure. A careful approach is the difference between a painless deploy and an outage measured in hours.
A new column must be planned. Start with the schema migration. Define the column name, data type, nullability, and default value. Avoid ambiguous names—clarity matters when code interacts with this schema years from now.
In production, use migrations that are backward-compatible. First, add the column as nullable or with a safe default. Populate data in batches if needed, keeping transaction times short to prevent blocking. Only after the system has adjusted should you enforce non-null constraints or new indexes.