Skip to content
Automation
Skill

/db-migrate

Create and apply a Prisma migration safely against the remote (tunneled) PostgreSQL. Use for schema changes - "create a migration", "apply migrations", "add a column/table".

From plugin
jobpilot
10432 skills4 agents2 MCP

Claude Code

$ npx -y skills add suxrobGM/jobpilot --skill db-migrate --agent claude-code

SKILL.md

db-migrate.SKILL.md
name: db-migrate
description: Create and apply a Prisma migration safely against the remote (tunneled) PostgreSQL. Use for schema changes - "create a migration", "apply migrations", "add a column/table".

DB migrate

The tunneled database (`bun run db:tunnel`, `localhost:5433`) is **production**. `prisma migrate dev` can demand a reset there, which wipes it, so never run it. All commands are `bun --cwd=apps/api run …`.

1. Edit the schema - split by domain under `apps/api/prisma/schema/*.prisma`. 2. Restore a throwaway copy: `pg_dump` prod through the tunnel, restore it into a local PostgreSQL on another port (e.g. 5434), and point `DATABASE_URL` at it for every step below until step 6. A local PostgreSQL and the tunnel both default to 5433 - check `docker ps` first. 3. `db:diff` prints the SQL from the database to the schema (read-only). Save it as `apps/api/prisma/migrations/<yyyymmddhhmmss>_<name>/migration.sql` and edit it: Prisma turns renames into drop + add - hand-edit to `ALTER ... RENAME` when data must survive. Data fixes that need TS logic go in a one-off `apps/api/scripts/<name>.ts` with a `--dry-run` report. `migrate deploy` applies every pending migration at once, so a script can't run between two of them. When the migration needs the script's output, run the script first against the old schema, have it fill a staging table the migration joins on, and make the migration `RAISE EXCEPTION` before any change if rows are left unmapped (`20261026070000_board_ids` in git history). Partial unique indexes aren't in the Prisma schema; `db:diff` won't emit them, so write them by hand. 4. `db:migrate:apply` against the copy, run the data script, spot-check counts and samples, and run the app against the copy. Then `db:generate`. 5. Ask the user before touching production. 6. Production: fresh `pg_dump` backup, `db:migrate:apply` through the tunnel, the data script, then deploy the matching images back to back. Never leave code that accepts both shapes.

Never run `db:reset` without explicit user confirmation - it wipes the database it points at.

Read more
@suxrobgm
Ships withjobpilot

An AI agent that applies to jobs for you, using the Claude or Codex subscription you already have. Open JobPilot → · Docs · How it works · Changelog Watch it full size → Applying for jobs takes hours.

10432 skills4 agents2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
104
Star history of suxrobGM/jobpilot on GitHub, a chart by star-history.com

Other skills on jobpilot.

add-api-route

add-api-route

Add a new JobPilot API route or module the standard way - contracts schema, controller, service, response schema, optional web…

@suxrobgm@suxrobgmInstall Skill
commit

commit

Write a git commit with a one-sentence Conventional Commits subject and no narrative body. Use whenever the user asks to commit,…

@suxrobgm@suxrobgmInstall Skill
knip-cleanup

knip-cleanup

Add knip to a TypeScript project and use it to remove dead exports, collapse pass-through barrels, and narrow every export to…

@suxrobgm@suxrobgmInstall Skill
pr-review

pr-review

Review a JobPilot pull request on its own branch, resolve merge conflicts with main, remove over-engineering, redundancy,…

@suxrobgm@suxrobgmInstall Skill
release

release

Bump the unified JobPilot version (host + plugin), update the changelog, commit, and tag a new release

@suxrobgm@suxrobgmInstall Skill
restart-terminal

restart-terminal

Rebuild the .NET terminal host, restart it, and wait for /healthz. Use after any C# change under apps/terminal, or when asked to…

@suxrobgm@suxrobgmInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about db-migrate.

Which coding agents can use db-migrate?
db-migrate installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.