The migration that took the checkout down
The situation. An e-commerce company ran a schema migration on a Friday deploy. It locked their orders table mid-write on a 40-million-row alter. Checkouts started timing out; the on-call developer's rollback attempt left the schema half-migrated and the ORM confused about reality.
What we found. The migration ran an ALTER TABLE that takes a full table lock on their MySQL version, fine in staging with 10k rows, fatal in production with 40 million. The rollback had dropped a column the new code still read.
The fix. Restored write availability first by patching the application to tolerate both schema states, then completed the migration online with a ghost-table approach during low traffic.
The outcome. Checkout restored, zero data lost, and a migration playbook in the root-cause report: online-DDL tooling, staging data at production scale, and a rule that schema changes never ride Friday deploys.