Database Migration Rollback & Data Integrity Validation
Validate database schema migrations for zero data loss, backward compatibility, and forward/backward rollbacks.
Verify database migration scripts (Flyway, Liquibase, Prisma) for table lock safety, concurrent index creation, and bidirectional rollback integrity.
Execution Workflow Procedure
Ordered steps the coding agent executes when performing this skill.
Inspect DDL Table Locking Mechanics
Check whether ALTER TABLE operations trigger ACCESS EXCLUSIVE locks or full table rewrites on high-traffic tables.
Verify Expand/Contract Backward Compatibility
Ensure the currently running application build remains compatible while the migration is applied in production.
Validate Rollback Data Safety
Run automated Up -> Insert Data -> Down test cycle to prove zero data loss during rollbacks.
Agent Safety Guardrails & Anti-Hallucination Rules
- DO NOT drop columns or tables in the same release where you stop reading them.
- DO NOT create indexes without CONCURRENTLY on active tables.
Expected Output Format
Locking risk breakdown, safe SQL scripts, and automated test plan.
Domain Verification Checks
Example Agent Invocations
Install / Configure This Skill
# Place in .cursorrules or create .cursor/rules/database-migration-rollback-validation.mdc # Trigger: Whenever you perform database migration rollback & data integrity validation --- name: database-migration-rollback-validation description: Verify database schema migrations for zero-downtime safety, lock prevention, and data loss-free rollbacks. version: 1.0.0 compatibility: [Cursor, Claude Code, Cline, Roo Code, Antigravity] --- # Database Migration Rollback & Data Integrity Validation ## Objective Guarantee zero-downtime database migrations by preventing table locks and verifying bidirectional rollback safety. ## Workflow 1. **Locking Audit**: Verify that DDL operations avoid `ACCESS EXCLUSIVE` locks on large tables. 2. **Expand/Contract Compatibility**: Ensure active application pods run safely during migration execution. 3. **Rollback Verification**: Test Up -> Data Insertion -> Down sequence to verify data preservation.
Need a quick one-time prompt for chat?
Try the Database Migration Rollback & Data Integrity Test Plan — a lightweight version designed for 1-click copying directly into Claude, ChatGPT, or Cursor chat.
SprintKit Workflow Integrations
Complementary tools and checklists to pair with this agent workflow.
Related Agent Skills
Explore related procedural workflows in this discipline.
Relational Database Schema Normalization & Indexing Strategy
Design production PostgreSQL schemas with composite indexes, foreign key strategies, and partitioning.
Database Deadlock & Concurrency Race Condition Diagnosis
Diagnose Postgres/MySQL transaction deadlocks, lock contention, and concurrent update race conditions.
Database Zero-Downtime Migration & Rollback Orchestration
Plan high-volume, live table restructuring and large column migrations without application outages.