UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
データ・研究 · SKILL.md

database-migrations

database-migrations

Plan additive, zero-downtime schema migrations with rollout, backfill, and rollback awareness. Use when renaming columns, backfilling data, or shipping risky database changes.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: database-migrations description: Plan additive, zero-downtime schema migrations with rollout, backfill, and rollback awareness. Use when renaming columns, backfilling data, or shipping risky database changes. metadata: triggers: files: - '/migrations/*.sql' - 'prisma/schema.prisma' - '/*.entity.ts' keywords: - migration - backfill - rollout - rename column - zero downtime

Database Migrations

Priority: P0 (CRITICAL)

Use expand -> backfill -> contract for risky changes.

Rules

  • Ship additive schema first.
  • Backfill with resumable logic and visibility.
  • Flip reads/writes only after new shape is populated.
  • Drop old columns or indexes in a later safe step.

Verify

  • Migration can run without taking the app offline.
  • Backfill ownership, batching, and monitoring are defined.
  • Rollback or pause strategy exists.
  • Old and new code paths can coexist during rollout.

Anti-Patterns

  • No destructive one-shot rename: expand and migrate first.
  • No hidden backfill: long data moves need explicit plan and observability.
  • No app deploy coupling by accident: schema and code rollout order must be clear.

References

保存したスキル