Database Testing / Scenario

Boss: The Rename of Damocles

One ALTER TABLE RENAME on a 40-million-row hot table, during a rolling deploy. Approve the plan and you get an outage; fix it and nobody notices anything, which is the point.

Difficulty
Boss
Format
Scenario
Points
300
Estimate
18 min

// MISSION BRIEF

Your Mission

A developer wants to fix a two-year-old typo: customers.email_adress becomes email_address. The proposed plan is one rename statement shipped with the app release. Deploys are rolling; the table is hot; downtime is not authorized. Review the plan like the person who will be paged.

Scoring: boss fight. Five weighted decisions; the compatibility call counts double.

// FIRST CONTACT

Battle teaser

First artifact

Proposed migration plan (v1)

The fatal flaw in plan v1:

  1. ATypo fixes are never worth schema changes
  2. BThe migration should run at a quieter hour
  3. CRENAME COLUMN rewrites all 40M rows and will run for hours
  4. DDuring the rolling overlap (and for every consumer not shipped in 41.0), old code still queries email_adress, which stops existing the instant the migration runs: errors on login-path reads until the last old pod dies
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

database-testingmigrationszero-downtimeexpand-contract