chore: support Prisma's official multi-file schema structure
Prisma released v6.7.0, which included the official multi-file schema feature.
Prior to this version, this feature was available using the "prismaSchemaFolder" preview option. At the time, this feature required a ./schema folder to be created under the default ./prisma folder where "model" schemas would live (see blog).
In the latest version that implementation has changed so that schema files can be placed anywhere under the ./prisma folder (their example is under ./models), and then you specify the ./prisma directory in --schema (not the original prisma/schema.prisma.
✅ Checklist
- [x] I have followed every step in the contributing guide
- [x] The PR title follows the convention.
- [x] I ran and tested the code works
Testing
- Updated the
<root>/references/v3-catalogprisma files andtrigger.config.tsand ran against docker locally -
pnpm link'd the@trigger.dev/buildpackage to my own application and deployed to a remote instance. - Copied the updated
prismaExtensionto my own project in order to benefit from it without need to wait
Changelog
- Bumped
[email protected]and@prisma/[email protected]in../v3-catalog - Use schema folder if
schema:value does not end in.prisma- Is this enough? Is it possible to have a schema file with a different extension?
- Retrieve all
*.prismafiles usingtinyglobby - Updated the
prismaExtensiondocumentation with a code example for how to configuration thetrigger.config.tsfile
Screenshots
💯
🦋 Changeset detected
Latest commit: 424228845751a519bedef93347a246913d9f85dc
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 23 packages
| Name | Type |
|---|---|
| @trigger.dev/build | Minor |
| trigger.dev | Minor |
| @trigger.dev/python | Minor |
| d3-chat | Patch |
| references-d3-openai-agents | Patch |
| references-nextjs-realtime | Patch |
| @trigger.dev/core | Minor |
| @trigger.dev/react-hooks | Minor |
| @trigger.dev/redis-worker | Minor |
| @trigger.dev/rsc | Minor |
| @trigger.dev/schema-to-json | Minor |
| @trigger.dev/sdk | Minor |
| @trigger.dev/database | Minor |
| @trigger.dev/otlp-importer | Minor |
| @internal/cache | Patch |
| @internal/clickhouse | Patch |
| @internal/redis | Patch |
| @internal/replication | Patch |
| @internal/run-engine | Patch |
| @internal/schedule-engine | Patch |
| @internal/testcontainers | Patch |
| @internal/tracing | Patch |
| @internal/zod-worker | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Walkthrough
A new changeset file was added documenting a minor update to the @trigger.dev/build package that introduces support for Prisma's official multi-file schema structure. The internal logic of the PrismaExtension was changed to detect schema folders by checking the schema path extension, unify source/destination directory handling for schema, SQL, and migrations files, use tinyglobby to recursively discover .prisma files in schema folders, and adjust prisma generate invocation to reference either a schema folder or a single schema file. The docs for the Prisma extension were updated to recommend setting the schema option to a directory, raise the minimum Prisma version, and provide examples; no public APIs or exported entities were changed.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
[!TIP]
🔌 Remote MCP (Model Context Protocol) integration is now available!
Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.
📜 Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📥 Commits
Reviewing files that changed from the base of the PR and between da62a1304e070029cd5ffe83363ebb6a953185e5 and 424228845751a519bedef93347a246913d9f85dc.
📒 Files selected for processing (1)
-
.changeset/unlucky-ghosts-do.md(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- .changeset/unlucky-ghosts-do.md
✨ Finishing Touches
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
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.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>, please review it. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. - PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
-
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
CodeRabbit Commands (Invoked using PR/Issue comments)
Type @coderabbitai help to get the list of available commands.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Status, Documentation and Community
- Visit our Status Page to check the current availability of CodeRabbit.
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.