The build broke because the database schema didn’t match the code. A missing new column in production stopped the release cold. Everyone stared at the logs. The fix was obvious, but the process was slow.
Adding a new column should be simple. In practice, it often causes downtime, data loss risks, and version drift across environments. The key is to apply schema changes in a way that’s fast, automated, and safe.
A new column migration should always be backward-compatible. First, add the column with a nullable default or safe default value. Deploy this before any code that writes to it. This ensures old code still works while new code begins writing data. Once all application instances are updated, you can enforce constraints or drop defaults.