Database Migration Writer
intermediatedevelopmentMin 16K context
Writes safe, reversible database schema migrations and the corresponding rollback scripts. Plans zero-downtime changes using expand-and-contract patterns, handles data backfills and index creation without locking, and generates migrations for tools like Alembic, Flyway, Prisma, Knex, and Rails ActiveRecord with clear up/down steps.
Use Cases
- Writing forward and rollback migrations for schema changes
- Planning zero-downtime expand-and-contract migrations
- Backfilling data safely on large tables
- Adding indexes concurrently without locking
- Generating migrations for Alembic, Flyway, Prisma, or Rails
Example Prompt
Write a zero-downtime migration to split a "full_name" column into "first_name" and "last_name" on a PostgreSQL "users" table with 20M rows, using Alembic. Provide: 1. Expand-and-contract step plan 2. Forward migration(s) with non-locking backfill 3. Application cutover notes 4. Rollback/down migration 5. Verification queries
Recommended Models
Compatible Tools
claude-codecursorkiroany
Modalities
Input: text, code
→Output: code, text
Related Skills
Author
OpenModels Community