The build broke after you added a new column.
It wasn’t the migration itself. The schema change ran fine. But downstream queries failed, APIs returned 500s, and the client logs filled with null reference errors. A new column is never just a new column. It’s a change to the contract between your data and the code that depends on it.
Adding a column in SQL or NoSQL systems triggers a ripple. You need to handle default values, data migrations, indexes, and compatibility across services. For relational databases, a new column can lock the table, block writes, and cause slow queries if not indexed properly. In distributed environments, schema changes must roll out in phases to maintain compatibility while new code deploys.
Best practice: make the new column nullable and set safe defaults. Backfill data in small batches to avoid long locks. Add indexes only after the backfill. Use feature flags to gate logic that depends on the column until all environments are ready. For systems with strict uptime requirements, perform online schema changes with tools like pt-online-schema-change or native database equivalents.