The migration failed. The logs showed why: a missing new column in the target table broke the deploy. You saw it too late, after users were already hitting errors.
Adding a new column should be simple. But in production, nothing is simple. Schema changes can lock tables. Queries can stall. Migrations can block writes. Without care, a single new column can take down your service.
The right process starts before the code. Define the new column with explicit type, nullability, and default. Avoid operations that scan the entire table during peak traffic. For large datasets, use online schema changes or partitioned updates.
In Postgres, ALTER TABLE … ADD COLUMN is fast if defaults are not computed per row. In MySQL, use tools like gh-ost or pt-online-schema-change for zero-downtime changes. Always stage the new column in a non-critical path first. Populate it in batches. Verify indexes and constraints before switching dependent logic.