db-change
Safely plan and apply a BiteCampus Prisma schema change or migration, with review, approval and verification.
Files1
View on GitHubSKILL.md.claude/skills/db-change/SKILL.md
GitHubDatabase change
- Run
npx prisma migrate status. Readprisma/schema.prismaand the existing migrations. Never edit an applied migration. - Describe the change: tables/columns, constraints (including raw SQL Prisma cannot express), indexes and the data impact on existing rows.
- Ask the database-reviewer agent to review it, then show its findings.
- Ask for approval, then run
npx prisma migrate dev --create-only --name <name>so the SQL can be reviewed and hand-edited. - Show the generated SQL; add documented raw SQL if needed; get approval to apply.
- Apply with
npx prisma migrate dev(local only). Nevermigrate resetordb pushon a shared database. - Update
prisma/seed.tsif needed (synthetic data only), then run the relevant integration tests. - Update
docs/DATABASE_DESIGN.mdif the design changed.