DB Migration Safety

Migration-safety lint (M22) — the static contract the migration-safety auditor (MSA) and db-migration-writer enforce on a candidate migration BEFORE it runs. Checks reversibility (down migration present / expand-contract), lock level (does it take ACCESS EXCLUSIVE on a hot table), table rewrite (full-table rewrites on type/default changes), destructive ops (DROP COLUMN/TABLE, TRUNCATE), unsafe enum mutation, NOT NULL without default on a large table, and schema drift between the declarative artifact and migration history. Feeds the Performance & Scale score.

Hainrixz c7ce2b4 5.7 KB Updated

File contents

hainrixz/claude-db/tree/main/skills/db-migration-safety commit c7ce2b46b6

Frequently asked questions

npx skillmds@latest add hainrixz/db-migration-safety