Write a Rollout Plan for a Schema Change
Added 2026-11-04
Expand, migrate, then contract — never skip a step.
We need a database schema change (structure below). Write the rollout: 1) split it into expand, migrate and contract; 2) the app version and compatibility requirement at each step; 3) backfill order and rate limiting; 4) how to verify both old and new reads and writes; 5) rollback at each step; 6) the most dangerous window. Do not ship all changes in one release.
Site original
Chinese original
How to use
schema 变更的安全来自「新旧版本能同时跑」。
Try tweaking it
- Have it restate requirements and constraints before writing code.
- Ask for the smallest change plus a rollback path, not a full-file rewrite.
What you should get
- A minimal, runnable change with copy-ready code
- Impact list: which files and call sites must follow
Common mistakes
- Asking it to touch ten files at once, then losing track of what broke what.
- Pasting only the error, with no code or version, and getting an unfixable answer.
How to check the output
- The change runs, can be rolled back, and touches nothing unrelated.
- Edge cases (empty, oversized, concurrent) are covered or explained.
Where it works
- Good for: having it restate requirements and constraints, then propose the smallest runnable change.
- Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.