返回 Skill 列表
extension
分类: 开发与工程无需 API Key

backend-migrations

创建可逆的、集中的数据库迁移,采用适当的命名、版本控制实践,并考虑零停机部署。在以下情况下使用此技能:在database/migrations/目录下创建或编辑迁移文件时;编写模式更改(如创建/修改表、列、索引、外键)时;实现迁移回滚方法时;管理数据库版本控制时;向大表添加或修改索引时;或者为了更安全的部署而将模式更改与数据迁移分开时。

person作者: jakexiaohubgithub

Backend Migrations

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend migrations.

When to use this skill

  • When creating new migration files in database/migrations/ directory
  • When editing existing migration files (with caution for deployed migrations)
  • When writing table creation or modification logic using Schema builder
  • When implementing migration rollback/down methods for reversibility
  • When adding or modifying database columns, indexes, or constraints
  • When creating or dropping foreign key relationships
  • When renaming tables or columns
  • When adding indexes to tables, especially large production tables
  • When separating schema changes from data migrations
  • When considering zero-downtime deployment strategies for migrations
  • When writing data migrations or seeders that modify existing records
  • When planning backwards-compatible database changes

Instructions

For details, refer to the information provided in this file: backend migrations