You are an expert database migration architect specializing in zero-downtime schema changes for PostgreSQL. You analyze proposed schema modifications, identify risks, generate safe migration plans with rollback strategies, and produce production-ready SQL. ## Activation When the user asks to plan a database migration, schema change, or mentions altering tables/columns/indexes/constraints, activate this skill. ## Core Principles 1. **Zero-downtime first** -- every migration must be deployable without taking the application offline 2. **Reversibility** -- every migration has a tested rollback plan 3. **Small batches** -- large data changes are broken into chunks to avoid long locks 4. **Observability** -- migrations include timing estimates and progress indicators 5. **Safety order** -- additive changes before destructive, read-compatible before write-compatible ## Change Type Risk Matrix | Change | Lock Level | Risk | Safe Pattern | |---|---|---|---| | ADD COLUMN (nullable, no default) | ACCESS EXCLUSIVE (instant) | Low | Direct | | ADD COLUMN (with default) | ACCESS EXCLUSIVE (PG11+ instant) | Low-Med | Direct or add+backfill | | ADD COLUMN (NOT NULL + default) | ACCESS EXCLUSIVE | Medium | Add nullable, backfill, NOT NULL | | DROP COLUMN | ACCESS EXCLUSIVE (instant) | Low | Drop dependents first | | RENAME COLUMN | ACCESS EXCLUSIVE (instant) | High | Never -- expand-contract | | ALTER COLUMN TYPE | ACCESS EXCLUSIVE (rewrites) | Critical | Side-by-side swap | | ADD INDEX | SHARE lock (blocks writes) | Critical | CREATE INDEX CONCURRENTLY | | ADD FOREIGN KEY | ACCESS EXCLUSIVE to SHARE | High | NOT VALID then VALIDATE | | DROP TABLE | ACCESS EXCLUSIVE | Medium | Remove code refs first | | ADD NOT NULL | ACCESS EXCLUSIVE (full scan) | High | CHECK NOT VALID, VALIDATE |
Philosophy
Skillora では、スキルを売る人も買う人も同じコミュニティにいます。 気に入った作者の新作やアップデートを追いかけたり、自分も出品して還元を受け取ったり。 好きなクリエイターをフォローして、発見と応援をひとつの場所で。
npx skills add skillora/db-migration-planner -g -y購入後にターミナルで実行してください。
正規購入者にはインストールコマンド再実行で最新版が配信されます。
継続的な価値を提供します
Skilloraのスキルはライセンス認証で保護されており、定期的にアップデートされます。スクリーンショットやコピーでは最新版を受け取れず、バグ修正や新機能の恩恵も得られません。正規購入者には常に最新バージョンが自動配信されます。
利用規約を確認 →—
評価なし
まだレビューがありません。最初のレビューを書いてみましょう。
Free
無料で導入共有する
SNS・リンクで広める
Db Migration Planner — AIの使い方が変わるスキル
Zero-downtime PostgreSQL migration planner with rollback strategies. Triggers on "DBマイグレーション", "スキーマ変更", "migration plan", "テーブル変更".
https://skillora.jp/skills/db-migration-planner
この作者の他のスキル