data-migration-design

Design guarded, rollback-aware data migrations with batching and validation.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/machenjie/rd-skills --skill data-migration-design-machenjie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-migration-design
Source: https://github.com/machenjie/rd-skills/tree/main/src/foundation/capabilities/data-migration-design
Command: npx skills add https://github.com/machenjie/rd-skills --skill data-migration-design-machenjie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents production outages and silent data corruption by guiding you to design data migrations that are idempotent, observable, resumable, and sequenced for zero-downtime expand–migrate–contract rollouts.

Core Features & Use Cases

  • Guarded, idempotent migrations: ensures reruns do not duplicate or partially apply changes via execution guards and checkpointing patterns.
  • Expand–Migrate–Contract sequencing: splits breaking schema changes across separate deployments so old and new code can coexist safely.
  • Operational rigor for live systems: mandates batching, rate limiting, evidence-based validation, and lock-aware/online DDL approaches to avoid downtime.

Quick Start

Use the data-migration-design skill to generate a production-ready migration plan for a live backfill, including phases, guards, batching, validation queries, observability targets, and rollback tier classification.

Frequently Asked Questions about data-migration-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform zero downtime data migrations on live databases?

Zero downtime data migrations require guarded, idempotent operations using expand-migrate-contract sequencing. This approach splits breaking schema changes across separate deployments, enabling old and new code to coexist safely while batching and rate limiting prevent production outages.

What is expand-migrate-contract sequencing for database change management?

Expand-migrate-contract sequencing is a deployment-order-aware pattern that splits breaking schema changes across separate releases. It allows old and new application code to coexist safely during schema evolution, preventing partial application and data loss on live systems.

How do I ensure idempotency and rollback planning during large backfills?

Idempotency and rollback planning during large backfills require execution guards and checkpointed batching. This ensures reruns do not duplicate or partially apply changes, while explicit rollback tier classification and backup verification criteria protect against silent data corruption.

Can I use backfill batching to avoid lock risks during schema alterations?

Backfill batching with rate limiting mitigates lock risks during schema alterations. Combined with lock-aware and online DDL approaches, checkpointed batching allows data migrations to run safely on live systems without causing avoidable downtime or blocking production queries.

What validation queries are needed for data migration completeness?

Data migration completeness requires pre and post validation queries with full-count verification. These evidence-based validation queries confirm that backfill batching and schema changes have fully applied without silent partial application or data loss on the target system.

When should I use feature-flag gating for database change management?

Feature-flag gating is needed for database change management when deploying expand-migrate-contract sequences. It provides operational rigor by controlling visibility of schema and data changes, allowing safe rollback execution if validation queries reveal completeness failures.