Migration Script Generator
Generate safe, reversible database migration scripts for schema changes with proper rollback support.
Usage
Describe the schema change you need and this skill will generate forward and rollback migration scripts.
Examples
- "Create a migration to add an email_verified column to the users table"
- "Generate a migration to split the address field into separate columns"
- "Write a data migration to backfill a new computed column"
Guidelines
- Always include a rollback migration for every forward migration
- Use transactions for atomic schema changes when possible
- Add new columns as nullable first, then backfill, then add constraints
- Test migrations against a copy of production data
- Never drop columns or tables in the same migration that creates replacements