Skip to content

chore: Upgrade prisma to 6.7.0 #21264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 172 commits into
base: main
Choose a base branch
from
Draft

chore: Upgrade prisma to 6.7.0 #21264

wants to merge 172 commits into from

Conversation

zomars
Copy link
Member

@zomars zomars commented May 13, 2025

What does this PR do?

Upgades Prisma to version 6.7.0.

Most of the changes are only imports:

-import type { Prisma } from "@prisma/client";
+import type { Prisma } from "@calcom/prisma/client";

Some notable changes are:

  • Patches prismock library to keep unit testing passing with v6
  • Fixes typings across next-auth files

What do we get from upgrading?

Ability to join queries
Ability to get typed raw sql queries
It opens up the door for data residency with multiple clients
Allows us to to try the new TypeScript first prisma-client generator which should be faster for dev. To be done in a follow up.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Summary by mrge

Upgraded Prisma and @prisma/client to version 6.7.0, updated the Prisma schema, and refactored user type usage for better type safety and compatibility.

  • Dependencies

    • Updated all Prisma-related packages to 6.7.0.
  • Refactors

    • Replaced Prisma.UserArgs with Prisma.UserSelect across the codebase.
    • Updated user type definitions and related code to match new Prisma patterns.
    • Added new types and interfaces for users and team members.
    • Updated Prisma schema output path and added primary key constraints.

@zomars zomars requested review from a team as code owners May 13, 2025 00:32
@github-actions github-actions bot added the ❗️ migrations contains migration files label May 13, 2025
@keithwillcode keithwillcode added core area: core, team members only foundation labels May 13, 2025
Copy link

vercel bot commented May 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal ⬜️ Ignored Preview Aug 12, 2025 2:58am
cal-eu ⬜️ Ignored Preview Aug 12, 2025 2:58am

@dosubot dosubot bot added the ⬆️ dependencies Pull requests that update a dependency file label May 13, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

mrge found 2 issues across 20 files. Review them in mrge.io

id: userId,
},
...userSelect,
return await prisma.user.findUniqueOrThrow({
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary use of await in return statement.

@@ -80,7 +102,7 @@
if (!users.length && this.eventType.userId) {
const eventTypeUser = await this.getUserById(this.eventType.userId);
if (!eventTypeUser) {
throw new Error("buildUsersFromINnerClass.eventTypeUser.notFound");
throw new Error("buildUsersFromInnerClass.eventTypeUser.notFound");
Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed typo in error message from 'buildUsersFromINnerClass' to 'buildUsersFromInnerClass'.

@zomars zomars force-pushed the upgrade/prisma-6.7.0 branch from d3c82d2 to a1d2e30 Compare May 13, 2025 04:22
Copy link

socket-security bot commented May 13, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedclassnames@​2.5.110010010079100

View full report

zomars added 4 commits May 12, 2025 21:47
zomars added 2 commits May 13, 2025 08:48
Signed-off-by: Omar López <zomars@me.com>
zomars added 2 commits May 13, 2025 18:38
Signed-off-by: Omar López <zomars@me.com>
Signed-off-by: Omar López <zomars@me.com>
Copy link
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Jul 19, 2025
Copy link
Contributor

coderabbitai bot commented Jul 19, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch upgrade/prisma-6.7.0

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
🪧 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 @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in 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 ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only ⬆️ dependencies Pull requests that update a dependency file foundation ❗️ migrations contains migration files ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants