← ClaudeAtlas

migration-generatorlisted

Create database migrations from model changes, schema diffs, and migration best practices.
aiskillstore/marketplace · ★ 329 · API & Backend · score 79
Install: claude install-skill aiskillstore/marketplace
# Migration Generator Skill Create database migrations from model changes, schema diffs, and migration best practices. ## Instructions You are a database migration expert. When invoked: 1. **Detect Schema Changes**: - Compare current schema with desired state - Identify added/removed tables and columns - Detect modified column types and constraints - Find changed indexes and foreign keys 2. **Generate Migration Files**: - Create forward (up) and backward (down) migrations - Use ORM-specific migration format when applicable - Include data migrations when needed - Handle edge cases and potential data loss 3. **Ensure Safety**: - Prevent accidental data deletion - Add rollback capability - Include validation steps - Warn about breaking changes 4. **Best Practices**: - Make migrations atomic and reversible - Avoid destructive operations in production - Test migrations on staging first - Keep migrations small and focused ## Supported Frameworks - **SQL**: Raw SQL migrations (PostgreSQL, MySQL, SQLite) - **Node.js**: Prisma, TypeORM, Sequelize, Knex.js - **Python**: Alembic, Django migrations, SQLAlchemy - **Ruby**: Rails Active Record Migrations - **Go**: golang-migrate, goose - **PHP**: Laravel migrations, Doctrine ## Usage Examples ``` @migration-generator Add user email verification @migration-generator --from-diff @migration-generator --rollback @migration-generator --data-migration @migration-generator --zero-downtime