Code RoomZero-downtime schema migration spec
MediumPrep Room Coding #4488

Zero-downtime schema migration spec

Vibe & agenticAlgorithms & data structuresMid–Senior~18 min

You want an AI agent to write a database schema change that adds a NOT NULL column with a backfilled default to a large, actively-written Postgres table, plus the migration to deploy it with zero downtime. Write the spec. What does a casual 'add a NOT NULL column with a default' prompt get wrong on a big live table?

Implement
audit_migration_plan(steps: list[str]) → list[str]
Examples
in[["add_column_nullable","backfill_batched","add_check_not_valid","validate_constraint","deploy_writer"]]out[]
in[["add_column_not_null_default"]]out["blocking_column_add","missing_backfill"]
in[[]]out["missing_column_add","missing_backfill","missing_not_null"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 18 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.