buchananwill/ue-claude-scaffold/migration-safety-checklist

Claude Code and agent skill by buchananwill/ue-claude-scaffold

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Structural constraints and safety checklist for database migration files. Defines what a valid, safe migration looks like.

Install

npx vskill@latest install buchananwill/ue-claude-scaffold/migration-safety-checklist

SKILL.md

The same SKILL.md was published earlier as buchananwill/ue-claude-scaffold/migration-safety-checklist.

Migration Safety Checklist

Constraints that define a valid, production-safe migration file.

When to Activate

  • Writing or reviewing a database migration
  • Adding/removing columns, indexes, or constraints on existing tables

Checklist

Before applying any migration:

  • [ ] Migration has both UP and DOWN (or is explicitly marked irreversible)
  • [ ] No full table locks on large tables (use concurrent operations)
  • [ ] New columns are nullable or have a default (never add NOT NULL without default)
  • [ ] Indexes on existing tables created with CONCURRENTLY (not inline)
  • [ ] Data backfill is a separate migration from schema change
  • [ ] Tested against a copy of production data
  • [ ] Rollback plan documented

Safe Column Addition

sql
-- GOOD: Nullable column, no lock
ALTER TABLE users ADD COLUMN avatar_url TEXT;
-- GOOD: Column with default (Postgres 11+ is instant, no rewrite)
ALTER TABLE users ADD COLUMN is_active BOOLEAN NOT NULL DEFAULT true;
-- BAD: NOT NULL without default on existing table (full table rewrite + lock)
ALTER TABLE users ADD COLUMN role TEXT NOT NULL;

Safe Index Creation

sql
-- BAD: Blocks writes on large tables
CREATE INDEX idx_users_email ON users (email);
-- GOOD: Non-blocking, allows concurrent writes
CREATE INDEX CONCURRENTLY idx_users_email ON users (email);
-- Note: CONCURRENTLY cannot run inside a transaction block

Safe Column Removal

Step 1: Remove all application references to the column
Step 2: Deploy application without the column reference
Step 3: Drop column in next migration

Batched Data Migrations

sql
-- BAD: Updates all rows in one transaction (locks table)
UPDATE users SET normalized_email = LOWER(email);
-- GOOD: Batch update
DO $$
DECLARE
batch_size INT := 10000;
rows_updated INT;
BEGIN
LOOP
UPDATE users
SET normalized_email = LOWER(email)
WHERE id IN (
SELECT id FROM users
WHERE normalized_email IS NULL
LIMIT batch_size
FOR UPDATE SKIP LOCKED
);
GET DIAGNOSTICS rows_updated = ROW_COUNT;
EXIT WHEN rows_updated = 0;
COMMIT;
END LOOP;
END $$;

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/buchananwill/ue-claude-scaffold/migration-safety-checklist/badge)](https://verified-skill.com/skills/buchananwill/ue-claude-scaffold/migration-safety-checklist)

Something wrong with this skill or its page? Tell us.