The query returned, but the data was broken. You knew why in an instant: the schema had changed. A new column had appeared.
Adding a new column seems simple, but it’s often where systems break. Schema changes ripple through APIs, services, and clients. If you add a column without a controlled plan, you risk downtime, mismatched data, or silent corruption. The process must be deliberate.
A new column in a production database starts with a clear definition: name, type, constraints, and defaults. Avoid NULL unless it’s intentional. Define the column so it fits the existing data model without creating hidden dependencies.
Roll out the change in stages. First, add the column without altering existing queries or code paths. Then update writes to populate it. Once new data flows in, update reads to take advantage of it. This staged pattern ensures backward compatibility while you test at each step.