The migration was complete, but the data felt wrong. You check the table. It’s missing a new column you added only hours ago. Code compiled fine. Tests passed. Yet the schema in production never caught up.
A new column should be simple. One line in SQL. Run ALTER TABLE … ADD COLUMN. But in real systems, things break. Legacy databases hide constraints. Downstream services expect fixed sets of fields. Schema drift accumulates in staging. Migrations fail halfway through. Or worse, they silently succeed in one environment and fail in another.
The first step is clarity. Confirm the schema you expect with DESCRIBE or INFORMATION_SCHEMA.COLUMNS. If the new column is absent, review migration logs. Did the change run? Did it commit? Are permissions blocking schema updates?
Deployment strategies matter. In high-traffic systems, adding a new column to a massive table can lock writes for minutes or hours. For zero-downtime, use tools like gh-ost or pt-online-schema-change. Design new columns with nullable defaults or reasonable fallbacks to reduce risk. For non-null columns, populate data in phases before adding constraints.