-
Notifications
You must be signed in to change notification settings - Fork 1
fix(deps): update prisma monorepo to v7 (major) #9
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
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/major-prisma-monorepo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4351aae to
cd7b8b2
Compare
f26ef98 to
0f61664
Compare
|
46c5ace to
11d5055
Compare
289a0e3 to
1e27565
Compare
1e27565 to
70b6f99
Compare
37a6576 to
3286d75
Compare
3286d75 to
f8a5277
Compare
f8a5277 to
efb139d
Compare
efb139d to
d2d3ec7
Compare
d7a014a to
e613de4
Compare
e613de4 to
6e0e3f0
Compare
6e0e3f0 to
50b927c
Compare
50b927c to
79e53eb
Compare
79e53eb to
d553374
Compare
44170cb to
12c4ba7
Compare
12c4ba7 to
715c57c
Compare
48277e4 to
b82431f
Compare
b82431f to
8707ea3
Compare
8707ea3 to
b09dcd6
Compare
b09dcd6 to
8ca82fe
Compare
9e140b3 to
549db19
Compare
912c412 to
b4c30c3
Compare
b4c30c3 to
d7bfe78
Compare
d7bfe78 to
a3b1257
Compare
a3b1257 to
6832f20
Compare
6832f20 to
82ae7e9
Compare
82ae7e9 to
143b056
Compare
143b056 to
6e218f6
Compare
6e218f6 to
4fcdb7d
Compare
4fcdb7d to
59258f0
Compare
59258f0 to
c3a6ace
Compare
b70cda5 to
4d4ffd1
Compare
4d4ffd1 to
d29cb89
Compare
d29cb89 to
ce778c4
Compare
20de2e6 to
3fef07c
Compare
830e49f to
69ea184
Compare
eaf3805 to
58a759e
Compare
58a759e to
f5af05d
Compare
f5af05d to
571a41e
Compare
49ef736 to
8f8742a
Compare
8f8742a to
facc05a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.16.2->7.0.1^4.15.0->^7.0.0Release Notes
prisma/prisma (@prisma/client)
v7.0.1Compare Source
Today, we are issuing a 7.0.1 patch release focused on quality of life improvements, and bug fixes.
🛠 Fixes
Prisma Studio:
Prisma CLI
prisma migrate diff(via prisma/prisma-engines#5699)prisma db seedis run, but nomigrations.seedcommand is specified in the Prisma config file (via #28711)enginescheck inpackage.json, to let Node.js 25+ users adopt Prisma, although Node.js 25+ isn't considered stable yet (via #28600). Thanks @Sajito!Prisma Client
cockroachdbsupport inprisma-client-jsgenerator, after it was accidentally not shipped in Prisma 7.0.0 (via #28690)@prisma/better-sqlite3
better-sqlite3to^12.4.5, fixing #28624 (via #28625). Thank you @bhbs!v7.0.0Compare Source
Today, we are excited to share the
7.0.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — and follow us on X!
Highlights
Over the past year we focused on making it simpler and faster to build applications with Prisma, no matter what tools you use or where you deploy, with exceptional developer experience at it’s core. This release makes many features introduced over the past year as the new defaults moving forward.
Prisma ORM
Rust-free Prisma Client as the default
The Rust-free Prisma Client has been in the works for some time now, all the way back to v6.16.0, with early iterations being available for developers to adopt. Now with version 7.0, we’re making this the default for all new projects. With this, developers are able to get:
Adopting the new Rust-free client is as simple as swapping the
prisma-client-jsprovider forprisma-clientin your mainschema.prisma:// schema.prisma generator client { - provider = "prisma-client-js" + provider = "prisma-client" }Generated Client and types move out of
node_modulesWhen running
prisma generate, the generated Client runtime and project types will now require aoutputpath to be set in your project’s mainschema.prisma. We recommend that they be generated inside of your project’ssrcdirectory to ensure that your existing tools are able to consume them like any other piece of code you might have.Update your code to import
PrismaClientfrom this generated output:For developers who still need to stay on the
prisma-client-jsbut are using the newoutputoption, theres’s a new required package,@prisma/client-runtime-utils, which needs to be installed:prisma generatechanges and post-install hook removalFor
prisma generate, we’ve removed a few flags that were no longer needed:prisma generate --data-proxyprisma generate --accelerateprisma generate --no-engineprisma generate --allow-no-modelsIn previous releases, there was a post-install hook that we utilized to automatically generate your project’s Client and types. With modern package managers like pnpm, this actually has introduced more problems than it has solved. So we’ve removed this post-install hook and now require developers to explicitly call
prisma generate.As a part of those changes, we’ve also removed the implicit run of
prisma db seedin-betweenmigratecommands.Prisma Client
As part of the move to a Rust-free Prisma Client, we moved away from embedding the drivers of the databases that we support. Now developers explicitly provide the driver adapters they need for their project, right in their source code. For PostgresSQL, simply install the
@prisma/adapter-pgto your project, configure the connection string, and pass that the Prisma Client creation:For other databases:
We’ve also removed support for additional options when configuring your Prisma Client
new PrismaClient({ datasources: .. })support has been removednew PrismaClient({datasourceUrl: ..})support has been removedDriver Adapter naming updates
We’ve standardized our naming conventions for the various driver adapters internally. The following driver adapters have been updated:
PrismaBetterSQLite3⇒PrismaBetterSqlite3PrismaD1HTTP⇒PrismaD1HttpPrismaLibSQL⇒PrismaLibSqlPrismaNeonHTTP⇒PrismaNeonHttpSchema and config file updates
As part of a larger change in how the Prisma CLI reads your project configuration, we’ve updated what get’s set the schema, and what gets set in the
prisma.config.ts. Also as part of this release,prisma.config.tsis now required for projects looking to perform introspection.Schema changes
datasource.urlis now configured in the config filedatasource.shadowDatabaseUrlis now configured in the config filedatasource.directUrlhas been made unnecessary and has removedgenerator.runtime=”react-native”has been removedFor early adopters of the config file, a few things have been removed with this release
engine: 'js'| 'classic'has been removedadapterhas been removedA brief before/after:
Explicit loading of environment variables
As part of the move to Prisma config, we’re no longer automatically loading environment variables when invoking the Prisma CLI. Instead, developers can utilize libraries like
dotenvto manage their environment variables and load them as they need. This means you can have dedicated local environment variables or ones set only for production. This removes any accidental loading of environment variables while giving developers full control.Removed support for
prismakeyword inpackage.jsonIn previous releases, users could configure their schema entry point and seed script in a
prismablock in thepackage.jsonof their project. With the move toprisma.config.ts, this no longer makes sense and has been removed. To migrate, use the Prisma config file instead:{ "name": "my-project", "version": "1.0.0", "prisma": { "schema": "./custom-path-to-schema/schema.prisma", "seed": "tsx ./prisma/seed.ts" } }Removed Client Engines:
We’ve removed the following client engines:
LibraryEngine(engineType = "library", the Node-API Client)BinaryEngine(engineType = "binary", the long-running executable binary)DataProxyEngineandAccelerateEngine(Accelerate uses a newRemoteExecutornow)ReactNativeEngineDeprecated metrics feature has been removed
We deprecated the previewFeature
metricssome time ago, and have removed it fully for version 7. If you need metrics related data available, you can use the underlying driver adapter itself, like the Pool metric from the Postgres driver.Miscellaneous
WeakRefin Cloudflare Workers. This will now avoid any unexpected memory leaks.--urlflag fromprisma db pullprisma introspectcommand./wasmto/edgeprisma-client-js/edge→ meant “for Prisma Accelerate”/wasm→ meant “for Edge JS runtimes (e.g., Cloudflare, Vercel Edge)”/edge→ means “for Edge JS runtimes (e.g., Cloudflare, Vercel Edge)”PRISMA_CLI_QUERY_ENGINE_TYPEPRISMA_CLIENT_ENGINE_TYPEPRISMA_QUERY_ENGINE_BINARYPRISMA_QUERY_ENGINE_LIBRARYPRISMA_GENERATE_SKIP_AUTOINSTALLPRISMA_SKIP_POSTINSTALL_GENERATEPRISMA_GENERATE_IN_POSTINSTALLPRISMA_GENERATE_DATAPROXYPRISMA_GENERATE_NO_ENGINEPRISMA_CLIENT_NO_RETRYPRISMA_MIGRATE_SKIP_GENERATEPRISMA_MIGRATE_SKIP_SEEDMapped enums
If you followed along on twitter, you will have seen that we teased a highly-request user feature was coming to v7.0. That highly-requested feature is…. mapped emuns! We now support the
@mapattribute for enum members, which can be used to set their expected runtime valuesPrisma Accelerate changes
We’ve changed how to configure Prisma ORM to use Prisma Accelerate. In conjunction with some more Prisma Postgres updates (more on that later), you now use the new
accelerateUrloption when instantiating the Prisma Client.New Prisma Studio comes to the CLI
We launched a new version of Prisma Studio to our Console and VS Code extension a while back, but the Prisma CLI still shipped with the older version.
Now, with v7.0, we’ve updated the Prisma CLI to include the new Prisma Studio. Not only are you able to inspect your database, but you get rich visualization to help you understand connected relationships in your database. It’s customizable, much smaller, and can inspect remote database by passing a
--urlflag. This new version of Prisma Studio is not tied to the Prisma ORM, and establishes a new foundation for what comes next.Prisma Postgres
Prisma Postgres is our managed Postgres service, designed with the same philosophy of great DX that has guided Prisma for close to a decade. It works great with serverless, it’s fast, and with simple pricing and a generous free tier. Here’s what’s new:
Connection Pooling Changes with Prisma Accelerate
With support for connection pooling being added natively to Prisma Postgres, Prisma Accelerate now serves as a dedicated caching layer. If you were using Accelerate for the connection pooling features, don’t worry! Your existing connection string via Accelerate will continue to work, and you can switch to the new connection pool when you’re ready.
Simplified connection flow
We've made connecting to Prisma Postgres even simpler. Now, when you go to connect to a database, you’ll get new options to enable connection pooling, or to enable Prisma Accelerate for caching. Below, you’ll get code snippets for getting things configured in your project right away.
Serverless driver
For those who want to connect to Prisma Postgres but are deploying to environments like Cloudflare Workers, we have a new version of the serverless client library to support these runtimes.
Check out the serverless driver docs for more details
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.
v6.19.0Compare Source
v6.18.0Compare Source
Today, we are excited to share the
6.18.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Prisma ORM
Prisma ORM is the most popular ORM in the TypeScript ecosystem. Today’s release brings a bunch of new bug fixes and overall improvements:
prisma initnow creates aprisma.config.tsautomaticallyWhen creating a new project with 6.18.0,
prisma initwill now create aprisma.config.tsfile automatically. This prepares new applications for the future of Prisma 7. Some fields that have been historically set in theschema.prismafile are now able to be set in theprisma.config.ts, and we encourage people to migrate over to the new structure before the release of version 7, where this file will become a requirement.datasourceinprisma.config.tsIf you’re adopting the new
prisma.config.tssetup in your projects, version 6.18.0 brings the ability to set your datasource directly in your config file. Once this is in your config file, any datasource set in yourschema.prismawill be ignored. To set the datasource, we also must include the newenginekey which we can set to"classic", which will be required for Prisma v7envhelper functionjsorclassicas engine types inprisma.configBytestoUint8Arraydepending on Typescript versionPreparing for Prisma v7
While it has been mentioned a few times already, many of the changes in this release are here to prepare folks for the upcoming release of Prisma v7. It’s worth repeating that these changes and the migration to
prisma.config.tswill be required for Prisma v7, so we’re releasing this as opt-in features for developers. But come Prisma v7, they will be the new way of configuring your project.Prisma Postgres
Prisma Postgres is our fully managed Postgres service designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release we are introducing the following improvements:
Database Metric in Console
Inside of your database console, you can now view metrics on your database usage and interactions. You can get insights into the follow:
In addition, you can also get insights into how to improve your query caching and gain better performance.
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.
v6.17.1Compare Source
Today, we are issuing a patch release to address a regression in v6.17.0 that affected diffing of unsupported types, leading to unnecessary or incorrect changes when creating new migrations or running
db pull. This update is recommended for all users who have any fields marked asUnsupportedin their schema files.Changes
v6.17.0Compare Source
Today, we are excited to share the
6.17.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Prisma ORM
Prisma ORM is the most popular ORM in the TypeScript ecosystem. Today's release brings a number of bug fixes and improvements to Prisma ORM.
Bug fixes and improvements
configobject to configure DefaultAzureCredential:@opentelemetry/instrumentationto be compatible with">=0.52.0 <1". Learn more in this PR.Prisma Postgres
Prisma Postgres is our fully managed Postgres service designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release we are introducing the following improvements:
New usage workspace metrics available in your Console Dashboard
The Dashboard in your Prisma Console account now displays new metrics about your Prisma Postgres usage:
Using Prisma Postgres with any tool is ready for production
Previously, the only way to connect to Prisma Postgres was using Prisma ORM. That combination is great because it gives you connection pooling, global caching and overall an amazing DX.
That being said, we understand that preferences vary and some developers prefer to use plain SQL or lower-level query builders in their applications. As of this release, these ways for connecting to Prisma Postgres are now officially generally available and can be used in your production apps!
You can connect using Drizzle, Kysely, TypeORM,
psql, or any other Postgres-compatible library, database migration tools like Atlas or interfaces like DBeaver, Postico, and more.📚 Learn more in the docs.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.
v6.16.3Compare Source
Today, we are issuing a 6.16.3 patch release focused on bug fixes.
🛠 Fixes
Prisma Client (
prisma-clientgenerator): fixed missing JSON null type definitions (JsonNull,DbNull,AnyNull) in thebrowser.tsentrypoint. (#28186)Prisma Migrate: don't add the default schema (namespace) to the generated migrations unless it was specified explicitly in the schema file. This restores the pre-6.13.0 behaviour that was inadvertently changed with enabling multi-schema support by default. Users who rely on database schemas for multi-tenancy can now again use the same migration files for all of their schemas. (prisma/prisma-engines#5614)
Prisma Client: enabled negative
takewithfindFirstagain. (prisma/prisma-engines#5616 — contributed by @jay-l-e-e)Prisma Accelerate: aligned the behaviour of the new Rust-free client with Query Engine to handle self-signed certificates consistently and ensure backward compatibility. (#28134)
@prisma/adapter-mariadb: fixed error event listeners leak. (#28177 — contributed by @Tiaansu)The fix introduces the missing types, but the singleton instances differ between the client and browser entrypoints of the generated client. This means that values like
Prisma.JsonNullimported from browser cannot yet be assigned to fields expected from the client entrypoint, and vice versa. This results in confusing TypeScript errors if you mix them. A follow-up improvement is planned to unify these utility types across entrypoints.v6.16.2Compare Source
Today, we are issuing a 6.16.2 patch release.
Bug fixes
engineType = clientwith Prisma Postgres, but our validation rules permitted invalid combinations of Prisma Postgres URLs and driver adapters. This now produces a clear error message indicating Prisma Postgres URLs and driver adapters are mutually exclusive.unref()on NodeJS timers to prevent them from keeping the NodeJS event loop active. This change unintentionally affected non-NodeJS runtimes likeworkerd, where it has resulted in runtime errors. This behavior has been made conditional to prevent these runtime errors.v6.16.1Compare Source
Today, we are issuing a 6.16.1 patch release.
Bug fixes
driverAdaptersandqueryCompilerfeatures were stabilized, but leftover code in theprisma-client-tsgenerator required them to still be specified in edge runtimes. This has now been fixed, runtimes likeworkerdandvercel-edgeno longer require these preview features.v6.16.0Compare Source
Today, we are excited to share the
6.16.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Prisma ORM
This section contains all the updates made in Prisma ORM v6.16.0.
Rust-free ORM and driver adapters are Generally Available
Eight months ago, we published our ORM manifesto with the first hint that we're going to remove the Rust-based query engine from Prisma ORM:
After a lot of hard work and feedback from the community, we're incredibly excited to share that the migration has been completed and you can now use Prisma ORM without its Rust engine in your production apps. 🎉 This is a major milestone in the history of Prisma ORM and comes with a lot of benefits:
… and overall a much better DX since you don't need to worry about the extra binary in your generated Prisma Client code any more.
While the Rust-free ORM will become the default in Prisma ORM v7 soon, for now you still need to opt-into using it:
generatorblock in your Prisma schema:queryCompileranddriverAdapterfeature flags from thepreviewFeaturesarray. And if you usedbinaryTargets, you can also get rid of these.pgfor PostgreSQL:PrismaClientusing thePrismaPgdriver adapter as follows:📚 To learn more and see instructions for all other supported databases, check out the documentation.
New ESM-first
prisma-clientgenerator is Generally AvailableAnother major milestone has been achieved in this release: The new, flexible and ESM-first
prisma-clientgenerator is ready for production too. Here's a quick overview of its main benefits:node_modules; generated code is fully under control by the developerIn addition to making it production-ready, we also made some changes to the
prisma-clientgenerator:Prisma.validator; you can use TypeScript nativesatisfieskeyword instead./generared/prisma/browserentrypoint for importing types in browser environmentsIf you want to try out the new generator with your favorite framework, check out one of our ready-to-run examples (e.g. for Next.js, Nuxt or React Router).
📚 Learn more in the docs.
Type check performance optimizations
Runtime performance is not the only performance category that matters. In fact, when it comes to DX, type checking performance is equally important: if your TypeScript types become too complex and the compiler needs to do too much work (e.g. inferring types), it may slow down your editor, lead to laggy auto-completion or prevent jump-to-definition from working.
We've worked with TypeScript expert David Blass to find ways for improving the type checking performance in Prisma ORM and created benchmarks comparing the type checking performance with Drizzle.
You can read about the results here: Why Prisma ORM Checks Types Faster Than Drizzle
Deprecating the
postgresqlExtensionsPreview featureWe're deprecating the
postgresqlExtensionsPreview feature. Note that this doesn't mean that you can't use extensions with Prisma ORM any more. Instead of setting the Preview feature, you can install extensions manually with a customized migration via the--create-onlyflag:You can then install an extension with plain SQL in the newly created, empty migration file:
CREATE EXTENSION IF NOT EXISTS "pgcrypto";Prisma Postgres
Prisma Postgres is our fully managed Postgres service designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release we are introducing the following improvements:
Manage OAuth apps in Prisma Console
In Prisma Console, you can now manage all of the 3rd party applications that you've granted access to perform actions on behalf of yourself in your Prisma Console account. Find the 🧩 Integrations tab in the sidenav to see which applications currently have access.
Rust-free Prisma ORM with Prisma Accelerate and Prisma Postgres
With this release, the Rust-free Prisma ORM (Query Compiler) can now be used together with Prisma Postgres and also Prisma Accelerate. This means you can take advantage of connection pooling and caching while using the new TypeScript-based ORM architecture.
To enable it, update your Prisma schema:
We'd love for you to try this out and share your feedback as we prepare for General Availability. Please open an issue on GitHub if you encounter any problems or have suggestions.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.
v6.15.0Compare Source
Today, we are excited to share the
6.15.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
AI safety guardrails for destructive commands
Prisma ORM now includes built-in safety checks that protect against destructive commands when triggered by AI coding assistants. The CLI can recognize when it is being executed by popular AI agents such as Claude Code, Gemini CLI, Qwen Code, Cursor, Aider and Replit.
If a command like
prisma migrate reset --forceis attempted, Prisma ORM will prompt for explicit confirmation before proceeding.This feature ensures that irreversible operations which drop and recreate the database are not executed automatically by an AI tool. Prisma ORM is the first ORM to provide this level of protection, making it safer to use AI-assisted development while working with your databases.
📚 Learn more in the docs.
prisma-client: runtime improvements and schema flexibilityWe simplified Prisma ORM by making the runtime options for the Prisma Client more consistent and easier to understand. Previously there were several overlapping aliases which created confusion. With this release we simplified the inputs while keeping support for all the major environments you might be targeting.
Changes include:
nodehas been removed, useruntime = "nodejs"insteaddeno-deployhas been removed, useruntime = "deno"insteadvercelhas been replaced by the newruntime = "vercel-edge"edge-lightis now just an alias forvercel-edgenodejs,deno, andbunnow share the same internal code path, while still keeping their separate input values for clarityThe updated list of supported runtimes is now:
nodejs,deno,bun,workerd(aliascloudflare),vercel-edge(aliasedge-light), andreact-native.In addition, we fixed an issue where running
prisma generatewould fail if your schema contained no models. This is now supported with the newprisma-clientgenerator, just like it already worked with the olderprisma-client-jsgenerator.For example, the following schema will now generate a client without errors:
Running
prisma generatewith this schema will succeed and create the client in./generated/client.📚 Learn more in the docs.
Using Prisma ORM with Vercel Fluid
Fluid compute is a new compute model from Vercel that combines the flexibility of serverless with the stability of servers, making it ideal for dynamic workloads such as streaming data and AI APIs.
A common challenge in traditional serverless platforms is that when functions are suspended, database connection pools can’t close idle connections. This leads to leaked connections that stay open until the database times them out, which can exhaust the pool.
Vercel provides the
attachDatabasePoolutility to solve this problem. It ensures idle connections in the pool are properly released before a function is suspended, preventing connection leaks.You can use this utility together with Prisma’s driver adapters to safely manage database connections in Fluid Compute:
📚 Learn more in the docs.
Other news
Prisma Postgres Management API is Generally Available
The Prisma Postgres Management API allows you to programmatically provision and manage Prisma Postgres instances. It’s the perfect way to spin up a database in your CI/CD workflow, see our GitHub Action examples for creating and deleting if you’re curious about this use case.
It also enables developers to offer databases to their own users! For example, did you know that Co.dev (YC23), a popular “low-code AI app builder” is using the Management API to provision Prisma Postgres instances to people building apps with their platform?
We’re excited to share that the Management API is now fully ready for production. With it moving into GA, we also added another piece of functionality where you can now create new projects without a default database.
We’re looking forward to see what you’re going to build with it!
📚 Learn more in the docs.
Prisma Postgres is now available on Pipedream
Prisma Postgres can now be used directly in your Pipedream workflows 🎉
With this integration, you can connect Prisma Postgres to over 2,800+ apps supported on Pipedream, enabling powerful automations and data workflows. For example, you can:
This makes it easier than ever to use Prisma Postgres in your automation pipelines, without needing to manage custom scripts or infrastructure.
📚 Learn more on the Pipedream integration page.
New
--jsonflag fornpx create-dbThe
npx create-dbcommand lets you spin up a temporary, production-ready Prisma Postgres database that you can later claim for continued use. With this release, you can now add the--jsonflag to return the database details in JSON format.This makes it straightforward to programmatically use the connection details, whether you are building custom APIs or integrating database provisioning into your workflows.
📚 Learn more in the docs.
Direct connections to Prisma Postgres are coming close to GA
Direct connections enable you to connect to your database using any ORM library or tool of your choice (e.g. Drizzle ORM, Kysely but also database GUIs like Postico or TablePlus).
In this release, we’ve improved the robustness of direct TCP connections and are close to bringing it to General Availability.
📚 Learn more in the docs.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.
v6.14.0Compare Source
Today, we are excited to share the
6.14.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
@uniqueattributes for SQL views (Preview)Last release, we improved the robustness of SQL views defined in the Prisma schema. Views are virtual tables that don't allows for defining unique constraints, indexes or foreign keys in the underlying database.
However, as an application developer, it can be convenient to also define relationships involving views or paginate them using cursors. We've received this feedback from several people who had been using views in that way with Prisma ORM, so in this release we're re-introducing the
@uniqueattribute for views. This attribute enables:findUniquequeries, cursor-based pagination & implicit ordering for viewsHere's an example schema using
@uniqueand defining a relationship from a model to a view:Expand to view the SQL code for this view
You can now query this view and its relationship using
include:📚 Learn more in the docs.
Various fixes & stability improvements
prisma-clientgenerator and thequeryCompilerPreview feature (aka “Prisma Client without Rust engines”). Both will become the default in the upcoming Prisma 7 release and we're working hard on bringing these features into General Availability. You can try them out with your favorite stack with our ready-to-run examples.prisma.$usemethod), which was deprecated since v4.16.0. Use Prisma Client extensions instead.metricsPreview feature (which will be removed in Prisma 7)Improved type performance
In this release, we also addressed some type performance issues that led to slower editors and lagging auto-complete. If you're curious about the details, you can check the description and changes in this PR.
Other news
Increased robustness of Management API (Early Access)
We recently released an API for programmatically managing Prisma Postgres instances that's perfect for CI/CD workflows and scripting.
In this release, we made it more robust and are bringing it closer to its General Availability release.
Revoke OAuth tokens in Prisma Console
If you use OAuth to authorize third-party applications to act on your behalf in the Prisma Console, you can now revoke any app's access at any time. The Prisma Console shows a list of your authorized (connected) apps, and you can easily remove one to immediately block further access.
ICYMI
Last release was huge, so just in case you missed it, here's the TLDR of what we put out last time:
prisma.config.ts) is Generally Available – Native way to configure schema paths, migrations, seeds, and more; no need forearlyAccessflag anymore.@@​schema.pgvector,pg_search,pg_stat_statements,citext,pg_trgm,fuzzystrmatch, andunaccent. If you don't see the extension you need, you can request it here. Extensions only work on new instances, if you want to use any of them on your existing instance, reach out to us.npx create-db– Instantly spin up a new Postgres database—no authentication required.v6.13.0Compare Source
Today, we are excited to share the
6.13.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
In this ORM release, we’re moving the Prisma Config file and the multi-schema feature into General Availability. This means these features now are fully production-ready and we’re looking forward to seeing what you are going to build with them!
Additionally, support for SQL views is getting an important update to further stabilize its API.
Configuring Prisma via Prisma Config is now Generally Available
The
prisma.config.tsfile is Prisma ORM’s native way to provide configuration options for your project. It currently lets you specify:seedcommand to populate your database based on some executable scriptHere’s an example Prisma Config file that specified custom locations for various project assets in and a seed script inside a
dbdirectory:Note that you’ll also see warning now if you defined a
prisma.seedcommand inpackage.json.We’re excited to move the
prisma.config.tsfile into General Availability. If you used it before in your projects, you can now dropearlyAccessfrom its options:import { defineConfig } from "prisma/config"; export default defineConfig({ - earlyAccess: true, });There still are and will be fields on the Prisma Config object that are Early Access or Preview features. To opt-into these, you’ll need to explicitly declare them via a new
experimentalfield.For example, usage of
adaptersis currently still in Preview:Finally, the Prisma Config file now also supports various file extensions so it fits neatly into your individual project setups:
.js,.ts,.mjs,.cjs,.mts,.cts. It also can be defined as.config/prisma.${extension}, whereextensionis the same one as file extensions above.📚 Learn more in the docs.
Using multiple schemas in now Generally Available
Databases like PostgreSQL or SQL Server provide a way to logically organize your tables in dedicated namespaces called schemas. In Prisma ORM, you can assign tables to various schemas via the
@@​schemaattribute: