Agent skill
migration-best-practices
データベースマイグレーションのベストプラクティス。 スキーマ変更時に自動適用される。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/migration-best-practices
SKILL.md
Database Migration Best Practices
命名規則
- ファイル名:
YYYYMMDDHHMMSS_description.sql - 例:
20250121120000_add_user_email.sql
マイグレーションルール
UP Migration(適用)
- 必ずトランザクション内で実行
- カラム追加は
NOT NULL制約に注意(デフォルト値を設定) - インデックス作成は大規模テーブルでは段階的に
DOWN Migration(ロールバック)
- すべてのUPに対応するDOWNを必ず用意
- データ損失の可能性がある変更は警告コメント必須
禁止事項
- 既存マイグレーションファイルの変更禁止
- 本番環境で直接DDL実行禁止
- カラム削除前にデータ確認必須
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?