Data migration

From Activer007/ordinary-claude-skills · View interactive version

Data migration is an AI agent skill from the GitHub repository Activer007/ordinary-claude-skills. Plan and execute database migrations, data transformations, and system migrations safely with rollback strategies and data integrity validation. Use when migrating databases, transforming data schemas, moving between database systems, implementing versioned migrations, handling data transformations,

How to use this skill

Skill file

Data Migration - Safe Schema Changes

When to use this skill

When to use this skill

Use when: Migrating data between schemas, zero-downtime deployments.

Process

  1. Add new column
  2. Dual-write to old & new
  3. Backfill historical data
  4. Switch reads to new column
  5. Remove old column

Example

\\\`sql

-- Step 1: Add column

ALTER TABLE users ADD COLUMN email_new VARCHAR(255);

-- Step 2: Backfill

UPDATE users SET email_new = email WHERE email_new IS NULL;

-- Step 3: Swap

ALTER TABLE users DROP COLUMN email;

ALTER TABLE users RENAME COLUMN email_new TO email;

\\\`

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.