Senior Backend Engineer / Stage 2 · Data

Roll a schema change through two application versions

Plan an expand-and-contract migration and identify the rollback boundary.

CoreAdvancedDraft, not yet reviewed35 min of activities

"Already know" meets prerequisites. "Not relevant" removes the topic from your total but leaves what builds on it waiting.

Self-check

  • Your old application writes `orders.status`; your new application needs `orders.fulfilment_state`. Describe expansion, compatible writes, backfill verification and contraction. Identify the point after which the old binary can no longer be restored safely.
  • Evidence to include: Include a compatibility matrix for both binaries at each step, a query that detects mismatched values, and a plan to stop rather than wait indefinitely for a conflicting lock. Do not claim zero downtime just because an operation is syntactically additive.

Try it without the material first, then compare. Save your answer in your notes below. Report a problem with this self-check

Learning activities

2 activities
  • Not done
    ALTER TABLE (opens another site)
    ReadOther sitelink checked 2026-11-15

    The primary reference for which lock each schema change takes, and for adding a constraint NOT VALID now and validating it later under a weaker lock. Read the notes on lock levels and ADD CONSTRAINT, not the whole page.

    20 min
  • Not done
    Expand-and-contract migrations (opens another site)
    ReadOther sitelink checked 2026-11-15

    A worked example of the pattern step by step: add the new column, copy data across, switch readers, then drop the old column. The steps carry over to any ORM.

    15 min

My notes

Saved on this device, synced when signed in
Esc
↑ ↓ to move↵ to open