Pick the fix
A migration adds a NOT NULL column with a volatile default to a 200 GB table. Tests passed on an empty DB. What should the test plan add?
Hint 1 of 1
What does an empty table hide?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A A rehearsal on a production-sized copy measuring locks and duration
Correct. Empty tables hide rewrites and lock time.
Lock time and duration depend on table size. A volatile default rewrites every row, which takes an instant on an empty test database and possibly hours under an exclusive lock on 200 GB.
Why not the others?
- B Run the same test twice. Still an empty table.
- C Skip tests for schema changes. Riskier.
- D Only check the migration file's syntax. Syntax isn't the risk.