Skills

Db Migrations

Create a database migration with Drizzle on a fresh Neon branch, and check it is safe...

Install

npx skills add ParadevAI/Paradev --skill db-migrations -g -a claude-code -y
Repository
ParadevAI/Paradev15.8k
Category
Data and ML
Updated
3d ago
License
See repository
Context cost
Mediumabout 1,979 tokens
Runs scripts
No, instructions only

What it does

Create a database migration with Drizzle on a fresh Neon branch, and check it is safe to run against production under load. Use when changing the packages/db schema, generating migrations, or reviewing one.

DB migrations

A migration that is correct on a quiet database can still take production down. On 17 September 2026 migration 0119 rewrote ingest.webhook_events (about 540 GB with indexes) while holding ACCESS EXCLUSIVE on the auth tables, and took the API down. Generate the migration with the steps below, then clear the safety checklist before opening the PR.

Generate

  1. Spin up a new Neon branch and point the root .env files at it. NEON_ORG_ID and NEON_PROJECT_ID are in .env; the Neon list_projects tool needs org_id passed in.
  2. Change the schema in packages/db/src/schema/.
  3. Run bunx drizzle-kit generate --name="<sample_name_snake_case>" from packages/db.
  4. Apply it to your dev branch only. Never apply against a shared or production database; those go through the deploy flow described under "What the production deploy does".

Never hand-edit packages/db/drizzle/ (.sql files, meta/_journal.json, snapshots) without explicit user confirmation. Change the schema and let drizzle-kit generate write the files. The one legitimate reason to ask for that confirmation is statement order (rule 3).

Safety checklist

Read the whole SKILL.md on GitHub

More in Data and ML