Skip to content

Conversation

@danielfrankcom
Copy link
Contributor

@danielfrankcom danielfrankcom commented Jan 23, 2026

This PR updates the Prisma sample from Prisma v6 to Prisma v7. There were major version changes which caused incompatibilities with our previous sample, such that Dependabot was unable to complete the upgrade without manual changes. It tried in #295 and #284.

The major change is the replacement of DATABASE_URL with a prisma.config.ts file. This is quite convenient for DSQL since previously it was awkward for users to generate a token and embed it in the DATABASE_URL variable, given the password would expire. Now we can generate a token on the fly as part of the prisma.config.ts file like we do in our connector libraries.

You will notice that it's now necessary to provide CLUSTER_ENDPOINT even when doing things like npm run build which doesn't make a lot of sense, but this seems to be a side-effect of the way Prisma requires the configuration file any time a Prisma command is run. We could probably provide a dummy URL or something but that may be confusing in the sample code, and in practice it's easy to define the CLUSTER_ENDPOINT env var first and just leave it defined. In practice I think users may hard code their endpoint in the config file anyway, in which case this won't be an issue.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.

@danielfrankcom danielfrankcom changed the title Update Prisma sample to work with v7 Convert Prisma sample from v6 to v7 Jan 23, 2026
@danielfrankcom danielfrankcom marked this pull request as ready for review January 23, 2026 17:24
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.

1 participant