Workflow
1
Check out the PR branch and pull latest main
2
Regenerate the Prisma client locally
3
Run a full local bootstrap against the merged branch
4
Resolve any warnings/errors/ data migration
If something’s wrong — fix it on the branch (or kick it back to the developer) before proceeding. Don’t merge a migration with an unresolved warning just because it “ran.”
5
If everything passes: force-add the migration file and merge
The migration file generated in step 3 (under Confirm it shows up in
prisma/migrations/) is not tracked by git by default — this repo has prisma/migrations under .gitignore. Before merging, explicitly force-add it:git status/the diff before pushing — a missed -f here means the migration file silently never reaches main, and db:bootstrap:dev will run against a schema that doesn’t match what was actually reviewed.Once confirmed committed, merge the branch into main.6
Apply the migration to the dev database
prisma migrate deploy against .env.dev (applying only pending migration files, unlike migrate dev which also generates new ones) followed by the dev seed script.Repeat this exact process for every branch/PR that touches the schema — each
one gets its own local bootstrap-and-verify pass before merge, even if it
looks like a small change.