tpmjs/.claude/commands/db-migrate.md
Ajax Davis fa962d3527 feat(claude): add database slash commands for common operations
Add 5 new slash commands for database management:

- /db-check - Check database connection and show table row counts
- /db-migrate - Create and apply Prisma migrations (production)
- /db-push - Push schema changes without migrations (development)
- /db-studio - Open Prisma Studio visual database browser
- /db-seed - Run seed script to initialize database

These commands make it easy to test database connectivity, run migrations,
view data in Prisma Studio, and seed the database with initial data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 02:24:28 +10:00

462 B

description
Create and apply a Prisma migration

Create and apply a new Prisma migration:

  1. Run pnpm --filter=@tpmjs/db db:migrate to create and apply a migration
  2. The migration will be named automatically based on changes
  3. After migration completes, regenerate the Prisma client with pnpm --filter=@tpmjs/db db:generate
  4. Report the results to the user

This is used for production-ready database schema changes that create migration files.