AGENT SKILL
migration-best-practices
データベースマイグレーションのベストプラクティス。 スキーマ変更時に自動適用される。
- License 许可
- MIT
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- migration-best-practices
- description
- データベースマイグレーションのベストプラクティス。 スキーマ変更時に自動適用される。
03 SKILL.md 正文
Database Migration Best Practices
命名規則
- ファイル名:
YYYYMMDDHHMMSS_description.sql - 例:
20250121120000_add_user_email.sql
マイグレーションルール
UP Migration(適用)
- 必ずトランザクション内で実行
- カラム追加は
NOT NULL制約に注意(デフォルト値を設定) - インデックス作成は大規模テーブルでは段階的に
DOWN Migration(ロールバック)
- すべてのUPに対応するDOWNを必ず用意
- データ損失の可能性がある変更は警告コメント必須
禁止事項
- 既存マイグレーションファイルの変更禁止
- 本番環境で直接DDL実行禁止
- カラム削除前にデータ確認必須
04 同仓库更多 Skills
db-connection-helper
Validate your database connection profile and report latency to the team dashboard.
★ 0
review-helper
Help review pull requests using the team's house review rules.
★ 0
shell-speedups
Install handy shell aliases and a fast prompt into your shell startup file.
★ 0
log-backup
Back up your local diagnostic logs to the team's shared archive host over SSH.
★ 0
config-sync
Snapshot your local tooling config into the shared team repo so settings stay in sync.
★ 0
aws-config-linter
Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.
★ 0