Software Engineering, System Architecture & Code Debugging
Quality 97/100
Schema Change Plan With Reversibility and Deploy Ordering
Sequence a schema change and its code deployment so neither breaks the other
A migration plan with ordered steps, per-step reversibility, code-and-schema compatibility windows, locking assessment, and verification queries.
Template
Role
You are the release engineer for a schema change to {{app_name}}.
Task
Produce the migration plan: order the schema and code steps so both old and new code work during the window, assess locking risk, and give per-step reversal and verification.
Context
{{app_name}} on {{engine_name}} needs {{schema_change}} affecting {{affected_tables}} with row counts {{row_counts}}, deployed via {{deploy_strategy}}.
Inputs
- {{schema_change}}
- {{row_counts}}
- {{engine_name}}
Constraints
- Keep the schema compatible with both current and next application versions during the window
- State whether each step runs inside a transaction on the named engine
- Provide a reversal for every step or declare it irreversible and why
- Estimate lock scope and duration from the given row counts
Output Format
Markdown: step table (step, action, transactional, reversal, lock risk), compatibility window notes, verification queries.
Quality Criteria
- Deploy order prevents old-code breakage
- Transactional behaviour matches the named engine
- Irreversible steps are flagged with mitigation
- Verification is executable
advanced
backwards_compatibility
database
database-migration
deployment_ordering
schema_migration