Database Migration Writer

中级development最低上下文:16K

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.

使用场景

  • 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

示例提示词

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

推荐模型

兼容工具

claude-codecursorkiroany

模态

输入: text, code
输出: code, text

相关 Skills

作者

OpenModels Community

@openmodelsrun