← ClaudeAtlas

migguard-planlisted

Turns a risky schema change into a zero-downtime expand, migrate, contract plan with ordered deploy steps, batched backfill SQL, a verification query per step and the point of no return called out. Covers renaming a column, adding NOT NULL, changing a type, splitting a table, adding a unique index on a big table and backfilling in batches. Use when the user says "how do I rename this column safely", "zero downtime migration", "add a NOT NULL column to a big table", "change a column type without locking", "backfill in batches", or "split this table".
vivekbhange-hub/migration-guard-skill · ★ 0 · API & Backend · score 75
Install: claude install-skill vivekbhange-hub/migration-guard-skill
# migguard-plan: change the schema without taking the app down The app and the schema never change at the same instant. Between "migration ran" and "all servers run the new code" both versions of the app talk to the database, and a rollback brings the old one back. A safe plan keeps every intermediate state valid for both. This skill writes that plan. It has no script: the value is the ordering and the checks. ## Inputs - The change in one sentence: "rename `orders.total_cents` to `amount_cents`", "make `users.email` NOT NULL", "change `events.id` from int to bigint". - Engine and version (PostgreSQL 12+ matters for `SET NOT NULL`; MySQL 8 for `INSTANT`). - Row count of the table, write rate, and how deploys work (rolling, blue/green, one server). - How the app reads and writes the column: ORM, raw SQL, other services, reports, ETL jobs. - Commands below say `python3`; on Windows use `python` (or `py -3`). ## Outputs One plan document, in this shape: 1. **Summary**: change, table size, total number of deploys, and the point of no return. 2. **Steps table**: step, what changes, migration or code, how long it holds a lock, verification query, how to roll back this step. 3. **SQL** for every migration step and the batch backfill script. 4. **Checks** to run between steps, and the signal that says "stop, do not continue". ## Steps 1. **Confirm authorization.** The user owns this database or has permission to change it. Never run anything against a database; write