← All Articles

Online MySQL Migrations with Dual-Write Cutovers

A tested migration sequence for large MySQL tables using shadow schema, dual writes, checksums, and rollback-safe traffic switching.

Schema migrations on multi-terabyte datasets are operational programs, not single SQL statements.

Safe Sequence

  1. Shadow table creation.
  2. Backfill in bounded chunks.
  3. Enable dual-write.
  4. Validate checksums continuously.
  5. Gradual read cutover, then write cutover.
INSERT INTO users_v2 (id, email)
SELECT id, email FROM users
WHERE id > ? AND id <= ?;

No cutover without sustained zero drift.

Next ArticleBuilding Internal Platform Scorecards That Drive AdoptionPlatform Engineering · 12 min read