← ClaudeAtlas

plan-migrationlisted

Use when an agent needs to plan a safe data migration or database schema change; sequences the change into backward-compatible expand/backfill/contract phases with rollback and verification steps rather than executing SQL scripts or migrating data.
tacticaldoll/fornax · ★ 0 · API & Backend · score 72
Install: claude install-skill tacticaldoll/fornax
# Plan Migration Use this skill to plan a database schema change or large-scale data migration when the user asks for one. The plan's coherence comes from the Expand/Contract pattern (Section 2): every intermediate state stays readable and writable by the running application, so the schema can change with zero downtime. **Input**: the current schema/state and the target schema/state. The current state can often be discovered by reading migration files or schema definitions already in the repo — ask the user for it only when it cannot be located, along with the database engine and scale context if those are unclear. **Boundary**: Produces a step-by-step migration and rollback plan; does not execute SQL scripts, alter schemas, or migrate data. Hand the phased plan to plan-implementation to turn it into ordered coding steps, and to plan-testing to design the data-integrity verification strategy. ## Workflow ### 1. State Analysis Compare the current database schema/state with the desired target schema/state. Identify any breaking changes, such as renaming columns, changing data types, or deleting tables. ### 2. Plan Migration Steps (Expand/Contract Pattern) Design the migration using the zero-downtime Expand/Contract pattern: - **Phase 1: Add (Expand)**: Plan adding the new schema elements (e.g., new column or table) without altering existing ones. - **Phase 2: Dual Write**: Plan a dual-write step where the application writes to both old and new schema elements simultaneous