fix: add prisma generate to start up script#1111
Conversation
📝 WalkthroughWalkthroughThe production startup script now executes a Prisma client generation step immediately after running database migrations, ensuring the Prisma client is regenerated during the deployment process before PM2 processes start. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/paybutton-server-start.sh (1)
27-27: Consider future-proofing the dev path with an explicitprisma generate.In Prisma v7,
migrate devno longer automatically triggersprisma generate— it must be run explicitly if needed. Currently the project is pinned to^6.14.0, somigrate devstill "triggers the generation of artifacts (for example, Prisma Client)" automatically. However, since Prisma 7 was released in November 2025, a future upgrade will silently break the dev flow the same way the production path was broken. Mirroring the fix here now is low-cost:♻️ Proposed optional addition for the dev path
yarn prisma migrate dev || exit 1 + yarn prisma generate || exit 1 yarn prisma db seed || exit 1🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/paybutton-server-start.sh` at line 27, The dev startup script currently runs the Prisma migration command ("yarn prisma migrate dev || exit 1") but does not explicitly run Prisma Client generation; to future-proof against Prisma v7 behavior, add an explicit generation step after the migrate command by invoking the Prisma generate command ("yarn prisma generate || exit 1") so artifacts are produced regardless of Prisma version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/paybutton-server-start.sh`:
- Line 27: The dev startup script currently runs the Prisma migration command
("yarn prisma migrate dev || exit 1") but does not explicitly run Prisma Client
generation; to future-proof against Prisma v7 behavior, add an explicit
generation step after the migrate command by invoking the Prisma generate
command ("yarn prisma generate || exit 1") so artifacts are produced regardless
of Prisma version.
Description
Make sure
prisma generateis automatically run afterprisma migrate deploy, just likeprisma migrate devdoes (prisma migrate devalso doesn't runprisma generateafterwords in prisma version >= 7, we have it at ^6.14.0)Summary by CodeRabbit