smithery/nakamura-shuta

migration-best-practices

データベースマイグレーションのベストプラクティス。 スキーマ変更時に自動適用される。

Installation

$ npx skills add smithery/nakamura-shuta --skill migration-best-practices

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 923 B
  • docs SUMMARY.md 157 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Database Migration Best Practices

命名規則

  • ファイル名: YYYYMMDDHHMMSS_description.sql
  • 例: 20250121120000adduser_email.sql

マイグレーションルール

UP Migration(適用)

  • 必ずトランザクション内で実行
  • カラム追加はNOT NULL制約に注意(デフォルト値を設定)
  • インデックス作成は大規模テーブルでは段階的に

DOWN Migration(ロールバック)

  • すべてのUPに対応するDOWNを必ず用意
  • データ損失の可能性がある変更は警告コメント必須

禁止事項

  • 既存マイグレーションファイルの変更禁止
  • 本番環境で直接DDL実行禁止
  • カラム削除前にデータ確認必須