The build broke the moment the migration hit production. A new column had been added to the database, but half the queries didn’t know it existed. Rows returned null where the new field should be. Logs filled with silent failures that no one caught until customers complained.
Adding a new column should be simple. It isn’t—unless you plan for it. Schema changes are one of the most common sources of hidden bugs in modern systems. The problem is not just adding a column to a table. It’s about ensuring every part of the stack understands the change at the same time.
A safe approach starts in version control. Write the migration and the code that handles it in separate commits. Deploy the migration first, ensuring it doesn’t break old versions of the application. Use defaults or allow null values to keep compatibility. Only after the migration is live in production should you deploy the code that reads or writes to the new column.