- Home
- Skills
- Physics91
- Claude Vibe
- Migration Checker
migration-checker_skill
- TypeScript
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill physics91/claude-vibe --skill migration-checker- SKILL.md9.4 KB
Overview
This skill reviews database migrations for safety, rollback capability, downtime risk, and data integrity. It highlights dangerous operations, suggests zero-downtime patterns, and produces concrete rollback and lock analyses to reduce production incidents. Use it to validate schema and data migrations before deployment.
How this skill works
The skill scans migration files and detects common patterns (Prisma, Alembic, TypeORM, Rails, Flyway/Liquibase and plain SQL). It classifies changes (schema vs data), flags high-risk operations (adding non-nullable columns, dropping/renaming columns, changing types, adding constraints), and generates step-by-step mitigations, rollback commands, and lock/downtime guidance. It also recommends batching and concurrent operations for large tables and provides a pre-migration checklist.
When to use it
- Before merging or deploying database migrations
- When adding or changing non-nullable columns or constraints
- When planning large data migrations or backfills
- When verifying rollback plans and down/reverse migrations
- When preparing zero-downtime deployment strategies
Best practices
- Break risky changes into multi-step migrations (nullable → backfill → set NOT NULL)
- Always include down/reverse migration or explicit rollback scripts
- Use CREATE INDEX CONCURRENTLY (or equivalent) to avoid write locks
- Process large data in batches or with server-side SQL to avoid memory and lock issues
- Test migrations and rollbacks on staging with production-like data and backups
Example use cases
- Review a migration that adds phone to users and produce a multi-step safe plan and rollback SQL
- Analyze index creation and recommend CONCURRENTLY plus note transaction constraints
- Validate a data backfill script for batching and memory safety, rewriting to use bulk updates or limited subqueries
- Check a rename operation and produce add/copy/drop pattern plus deployment coordination guidance
- Produce a pre-migration checklist including backup, staging test, downtime window, and rollback verification
FAQ
Adding non-nullable columns without a safe default and dropping tables/columns are critical because they can fail or permanently lose data. Use multi-step patterns and backups.
How do you avoid table locks during index creation?
Use database-specific concurrent/index-without-transaction options (e.g., CREATE INDEX CONCURRENTLY in PostgreSQL) and run the operation outside transactions or in separate migrations.