Validates database migration files against the Expand/Contract (Parallel Change) architectural rules. Rejects destructive operations like DROP COLUMN or RENAME COLUMN.
Use this skill when reviewing code that includes database schema changes, SQL migration scripts, or ORM model updates. Do NOT use when reviewing application logic with no database structural alterations.
ARCHITECTURE_RULES.md.claude/feature-workspace/data-engineering-notes.md (if available).sql, .ts, .py, or other files in the migrations/ directory that are added or modified../.claude/skills/validate-migrations/check.sh [target]DROP or RENAME.# Migration Validation Report
## Violations
- `migrations/20260307_v2.sql`: Destructive operation `DROP COLUMN legacy_id` detected.
## Recommended Fixes
- **Expand Phase**: Add the new column, dual write, backfill.
- **Contract Phase**: (Separate deployment) Drop the legacy column.
DROP COLUMN or RENAME COLUMN if it is not explicitly marked and isolated in a Contract phase deployment.NOT NULL constraints on new columns without a DEFAULT value.If check.sh is unavailable, use grep or manual file inspection to manually scan all migration target files for banned terms (DROP, RENAME, NOT NULL without DEFAULT).