Skip to content

Conversation

@entitree
Copy link

@entitree entitree commented Nov 22, 2025

Prisma v7 brings a few breaking changes:
https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7

  • export type PrismaClientOrDynamicClientExtension should be ANY as those two types will conflict
import type { PrismaClient } from "@prisma/client";
import { PrismaClient } from "./generated/client";
  • @prisma/extension-read-replicas throws as error: Error [PrismaClientConstructorValidationError]: Unknown property datasourceUrl provided to PrismaClient constructor.

  • should we increase the peer dependency?

"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
Copy link
Author

Choose a reason for hiding this comment

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

this happened automatically, is it correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

no idea

generator client {
provider = "prisma-client-js"
provider = "prisma-client"
output = "generated"
Copy link
Author

Choose a reason for hiding this comment

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

any better idea for an output path?

Copy link
Contributor

Choose a reason for hiding this comment

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

fine


# turbo
.turbo
packages/db/prisma/generated
Copy link
Author

Choose a reason for hiding this comment

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

it's quite many files, but should usually be checked in to git. How about it?

Copy link
Contributor

Choose a reason for hiding this comment

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

checked in hmmm no I wouldn't, same for the https://www.npmjs.com/package/prisma-client-types-generator we've made, I do not check generated types in

@entitree entitree requested a review from ogroppo November 22, 2025 11:49
@entitree entitree changed the title init prisma v7 Upgrade to prisma v7 Nov 22, 2025
import { PrismaPg } from "@prisma/adapter-pg";
import { readReplicas } from "@prisma/extension-read-replicas";

const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL });
Copy link
Contributor

@ogroppo ogroppo Nov 22, 2025

Choose a reason for hiding this comment

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

interesting, PrismaPg does indeed have slightly more flexibility, what was your reason for?

Copy link
Contributor

Choose a reason for hiding this comment

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

or is the adapter required now?

if (process.env.NODE_ENV !== "production") global.prismaClient = prismaClient;

export const prismaReadClient = prismaClient
export const prismaReadClient = new PrismaClient({ adapter })
Copy link
Contributor

Choose a reason for hiding this comment

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

mmmh, I think it should extend the primary client, unless things have changed?

"prisma": "^6.8.2",
"tsup": "^8.4.0",
"typescript": "^5.8.3"
"dotenv": "^17.2.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

is prisma not coming with it anymore?

datasource: {
url: env("DATABASE_URL"),
},
});
Copy link
Contributor

Choose a reason for hiding this comment

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

awesome

"dependencies": {
"axios": "^1.13.2",
"deverything": "^4.2.1"
"deverything": "^4.5.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants