Review a schema change before rollout | DevPrompt Lab
Check constraints, compatibility, migration cost, and recovery for a data model change.
prompt · Database · advanced
English Tiếng ViệtA schema review prompt focused on preserving existing records and keeping application versions compatible during rollout.
Reusable content
Review the proposed schema change against current data and deployment order. Check stable identities, nullability, uniqueness scope, foreign-key deletion rules, index needs, data volume, locks, and application compatibility during a rolling deployment. Identify legacy rows that cannot map cleanly and how they remain accessible. Verify backup and restore prerequisites. Provide migration phases, reconciliation queries, and a safe rollback path. Do not recommend dropping old data until preservation is proven.
Proposal: {{PROPOSAL}}
Current data: {{CURRENT_DATA}}
Rollback plan: {{ROLLBACK_PLAN}}
How to use it
Include the database engine/version, table sizes, and a restore-tested backup reference.
Example
Phase 1 add nullable column and dual-read; phase 2 backfill deterministically; phase 3 compare counts; phase 4 switch writes; phase 5 remove legacy only in a later approved cycle.