Skip to content

fix: add prisma generate to start up script#1111

Merged
Klakurka merged 1 commit intomasterfrom
fix/prisma-generate-on-script
Feb 24, 2026
Merged

fix: add prisma generate to start up script#1111
Klakurka merged 1 commit intomasterfrom
fix/prisma-generate-on-script

Conversation

@chedieck
Copy link
Collaborator

@chedieck chedieck commented Feb 23, 2026

Description

Make sure prisma generate is automatically run after prisma migrate deploy, just like prisma migrate dev does (
prisma migrate dev also doesn't run prisma generate afterwords in prisma version >= 7, we have it at ^6.14.0)

Summary by CodeRabbit

  • Chores
    • Updated production startup sequence to include database client generation during deployment initialization.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Startup Script
scripts/paybutton-server-start.sh
Added yarn prisma generate command in the production deployment path after yarn prisma migrate deploy to regenerate the Prisma client during startup.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A whisker twitch, a yarn command so fine,
Prisma client fresh, migrations align,
One line to generate, the startup flows true,
From schema to server, the rabbit's shiny new! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is partially complete but missing required sections. It explains the rationale but lacks issue reference, test plan, and other template sections. Add related issue number, test plan section, and complete other template sections to provide a more comprehensive PR description.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding a prisma generate command to the startup script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/prisma-generate-on-script

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
scripts/paybutton-server-start.sh (1)

27-27: Consider future-proofing the dev path with an explicit prisma generate.

In Prisma v7, migrate dev no longer automatically triggers prisma generate — it must be run explicitly if needed. Currently the project is pinned to ^6.14.0, so migrate dev still "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.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 070f7ba and c13db22.

📒 Files selected for processing (1)
  • scripts/paybutton-server-start.sh

@Klakurka Klakurka added the enhancement (development) Improvement to the development situation label Feb 24, 2026
@Klakurka Klakurka added this to the Phase 3 milestone Feb 24, 2026
@Klakurka Klakurka merged commit 092c83d into master Feb 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement (development) Improvement to the development situation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants