The-AI-Directory-Company/agents-and-skills / skills/data-migration-plan
data-migration-plan
VerifiedPlan and execute data migrations with phased rollout — dual-write, backfill, cutover, and verification stages with rollback triggers and data integrity checks at every step.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.9 KB |
| assets/migration-checklist.md | markdown | 2.2 KB |
| assets/rollback-plan-template.md | markdown | 2.3 KB |
| examples/mysql-column-rename.md | markdown | 3.6 KB |
| examples/postgres-to-new-schema.md | markdown | 3.6 KB |
| scripts/integrity-check.sql | other | 4.1 KB |
assets/rollback-plan-template.md
View on GitHub# Rollback Plan
Fill in for each phase before starting the migration. This document should be ready before Phase 1 begins.
## Migration Summary
| Field | Value |
|-------|-------|
| Migration name | |
| Owner | |
| Point of no return | Phase ___ (after this, rollback requires restore from backup) |
---
## Rollback Summary by Phase
| Phase | Rollback Action | Data Loss Risk | Estimated Time | Owner |
|-------|-----------------|----------------|----------------|-------|
| Phase 1: Dual-Write | Revert deployment, drop new columns/tables | None | | |
| Phase 2: Backfill | Stop backfill, truncate new tables, disable dual-write | None (old data untouched) | | |
| Phase 3: Cutover | Flip feature flag to route reads back to old schema | None (old schema still populated) | | |
| Phase 4: Verification | Same as Phase 3 (old schema still exists) | None | | |
| Phase 5: Cleanup | Restore from backup (old schema dropped) | Data written after cleanup started | | |
---
## Phase 1 Rollback: Dual-Write
**Trigger**: Dual-write error rate exceeds 0.1%, or new write path causes application errors.
**Steps**:
1.
2.
3.
**Verification**:
- [ ] Application error rate returns to baseline
- [ ] No writes reaching new columns/tables
---
## Phase 2 Rollback: Backfill
**Trigger**: Backfill causes replica lag > 30 seconds, data corruption detected, or error rate spikes.
**Steps**:
1.
2.
3.
**Verification**:
- [ ] Replica lag returns to normal
- [ ] Old schema data is intact (spot-check)
- [ ] Dual-write disabled
---
## Phase 3 Rollback: Cutover
**Trigger**: Error rate or latency degrades at any ramp stage, or data correctness issues found.
**Steps**:
1.
2.
3.
**Verification**:
- [ ] All reads using old schema
- [ ] Metrics return to baseline within 10 minutes
---
## Phase 4 Rollback: Verification
**Trigger**: Downstream consumers report incorrect data, or consistency check fails.
**Steps**:
1.
2.
3.
**Verification**:
- [ ] Downstream consumers confirmed healthy
- [ ] Read path on old schema
---
## Phase 5 Rollback: Cleanup (Emergency)
**Trigger**: Only if old schema was dropped and a critical issue is discovered.
**Steps**:
1.
2.
3.
**Verification**:
- [ ] Backup restored successfully
- [ ] Row counts match pre-cleanup snapshot
- [ ] Application healthy on restored schema
**Data at risk**: Any data written between cleanup start and restore completion.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |