affaan-m/ECC

database-migrations

PostgreSQL、MySQL、一般的なORM(Prisma、Drizzle、Kysely、Django、TypeORM、golang-migrate)全体のスキーマ変更、データマイグレーション、ロールバック、ゼロダウンタイムデプロイメントのためのデータベースマイグレーションベストプラクティス。

59Collecting
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/database-migrations"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn database-migrations's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: 本番環境システム用の安全で可逆的なデータベーススキーマ変更。

npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/database-migrations"
Check the pinned source

Best fit

  • PostgreSQL、MySQL、一般的なORM(Prisma、Drizzle、Kysely、Django、TypeORM、golang-migrate)全体のスキーマ変更、データマイグレーション、ロールバック、ゼロダウンタイムデプロイメントのためのデータベースマイグレーションベストプラクティス。

Bring this context

  • A concrete task that matches the documented purpose of database-migrations.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned database-migrations instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read database-migrations through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

アクティベーション時期

データベーステーブルの作成または変更

SKILL.md · アクティベーション時期
データベーステーブルの作成または変更列またはインデックスの追加/削除データマイグレーション(バックフィル、変換)の実行
02

コア原則

1. すべての変更はマイグレーション — 本番環境データベースを手動で変更しない 2. マイグレーションは本番環境で前方のみ — ロールバックは新しい前向きマイグレーション使用 3. スキーマとデータマイグレーションは分離 — 1つのマイグレーションでDDLとDMLを混ぜない 4. 本番環境サイズのデータに対してマイグレーションをテスト — 100行で機能するマイグレーション10M上でロックされる場合がある 5. マイグレーションは展開後は不変 — 本番環境で実行されたマイグレーションを編集しない

SKILL.md · コア原則
すべての変更はマイグレーション — 本番環境データベースを手動で変更しないマイグレーションは本番環境で前方のみ — ロールバックは新しい前向きマイグレーション使用スキーマとデータマイグレーションは分離 — 1つのマイグレーションでDDLとDMLを混ぜない
03

マイグレーション安全チェックリスト

[ ] マイグレーションはUPとDOWNの両方を持つ(または明示的に不可逆としてマーク)

SKILL.md · マイグレーション安全チェックリスト
[ ] マイグレーションはUPとDOWNの両方を持つ(または明示的に不可逆としてマーク)[ ] 大型テーブルの完全テーブルロックなし(並行操作使用)[ ] 新しい列はデフォルトまたはnullable(デフォルトなしでNOT NULLを追加しない)
04

PostgreSQL パターン

Review the “PostgreSQL パターン” section in the pinned source before continuing.

SKILL.md · PostgreSQL パターン
Review and apply the “PostgreSQL パターン” source section.
05

列を安全に追加

Review the “列を安全に追加” section in the pinned source before continuing.

SKILL.md · 列を安全に追加
Review and apply the “列を安全に追加” source section.

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use database-migrations to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned database-migrations source to [task]. Pay particular attention to these source sections: “アクティベーション時期”, “コア原則”, “マイグレーション安全チェックリスト”, “PostgreSQL パターン”, “列を安全に追加”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current database-migrations result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “アクティベーション時期” has been checked.

The source section “コア原則” has been checked.

The source section “マイグレーション安全チェックリスト” has been checked.

The source section “PostgreSQL パターン” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does database-migrations do?

本番環境システム用の安全で可逆的なデータベーススキーマ変更。

How do I start using database-migrations?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/database-migrations". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
234,327
Repository forks
35,711
Quality
59/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

59/100
Documentation16/30
Specificity11/25
Maintenance20/20
Trust signals12/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

データベースマイグレーションパターン

本番環境システム用の安全で可逆的なデータベーススキーマ変更。

アクティベーション時期

  • データベーステーブルの作成または変更
  • 列またはインデックスの追加/削除
  • データマイグレーション(バックフィル、変換)の実行
  • ゼロダウンタイムスキーマ変更を計画
  • 新しいプロジェクト用のマイグレーションツール設定

コア原則

  1. すべての変更はマイグレーション — 本番環境データベースを手動で変更しない
  2. マイグレーションは本番環境で前方のみ — ロールバックは新しい前向きマイグレーション使用
  3. スキーマとデータマイグレーションは分離 — 1つのマイグレーションでDDLとDMLを混ぜない
  4. 本番環境サイズのデータに対してマイグレーションをテスト — 100行で機能するマイグレーション10M上でロックされる場合がある
  5. マイグレーションは展開後は不変 — 本番環境で実行されたマイグレーションを編集しない

マイグレーション安全チェックリスト

マイグレーションを適用する前に:

  • マイグレーションはUPとDOWNの両方を持つ(または明示的に不可逆としてマーク)
  • 大型テーブルの完全テーブルロックなし(並行操作使用)
  • 新しい列はデフォルトまたはnullable(デフォルトなしでNOT NULLを追加しない)
  • インデックスは並行して作成(既存テーブルのCREATE TABLEでインライン化しない)
  • データバックフィルはスキーマ変更から分離したマイグレーション
  • 本番環境データのコピーに対してテスト
  • ロールバック計画を文書化

PostgreSQL パターン

列を安全に追加

-- GOOD: Nullable列、ロックなし
ALTER TABLE users ADD COLUMN avatar_url TEXT;

-- GOOD: デフォルト付きの列(Postgres 11+は即座、書き直しなし)
ALTER TABLE users ADD COLUMN is_active BOOLEAN NOT NULL DEFAULT true;

-- BAD: 既存テーブルのデフォルトなしで NOT NULL(完全書き直し必須)
ALTER TABLE users ADD COLUMN is_active BOOLEAN NOT NULL;

詳細についてはドキュメントを参照してください。

Source repo
affaan-m/ECC
Skill path
docs/ja-JP/skills/database-migrations/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected