The schema had changed, and a new column was live in production.
A new column is never just more data. It changes queries, indexes, and application logic. It can break API contracts if not handled with care. Adding a column to a database table seems simple, but in production systems at scale, it rewires how reads and writes flow.
When you add a new column, verify its purpose and data type. Choose the smallest type that works for the long term. Set constraints early—NOT NULL where possible to block incomplete data, defaults where it makes sense for backward compatibility. Avoid nullable fields unless the absence of a value is intentional and semantically correct.
Test your migration. Run it in staging with production-like volume. Measure execution time and locking behavior. For large tables, use online schema change tools like gh-ost or pt-online-schema-change to avoid downtime.
Update your queries. Audit every code path that touches the modified table. Failing to reference the new column where required can lead to silent logical errors. Conversely, adding it to SELECT * queries can bloat responses and increase load. Be deliberate.