Prisma

Latest version: v0.15.0

Safety actively analyzes 714772 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 44

4.15.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v4.15.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.15.0) about the release.** 🌟

Highlights

For this release, we focused on fixing bugs and making smaller quality-of-life improvements.

Support for custom arguments for `prisma db seed`

This release adds support for defining and passing arbitrary arguments to `prisma db seed`. This creates the opportunity for you to define your own arguments in your seed file that you could pass to the `prisma db seed` command. A few example use-cases include, but are not limited to:

- Seeding different data in different environments
- Partially seeding data in some tables

Here is an example `seed.ts` file that defines custom arguments for seeding different data in different environments:

tsx
// prisma/seed.ts
import { parseArgs } from "node:util";

const options = {
environment: { type: 'string', },
}

async function main() {
const { values: { environment } } = parseArgs({ options })

switch (environment) {
case "development":
/** do something for development */
break;
case "test":
/** do something for test environment */
break;
default:
break;
}
}

main()


You can then provide the `environment` argument when executing the seed script as follows:

bash
npx prisma db seed -- --environment development


Let us know what you think, share example usage of this feature, and create a [bug report](https://github.com/prisma/prisma/issues/new?assignees=&labels=kind/bug&projects=&template=bug_report.yml) if you run into any issues.

Improved error messages when Query Engine file is not found

This release improves the error messages returned by Prisma Client when the Query Engine file is not found. A few reasons the Query Engine file might be missing from your application bundle include when:

- The downloaded Query Engine doesn’t match the runtime/ target platform your application is running on.
- The Query Engine is not copied to your final application bundle during the build step.

We hope these error messages are helpful while debugging your application.

Prisma VS Code extension improvements

In this release, we made a few improvements to our [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma):

1. Updated the file system watcher that is responsible for restarting the TypeScript server when `prisma generate` is run to ensure the types are in sync

>**Note**:
>
> - This new approach is currently only available on Windows and Linux. We plan on adding support for the new file system watcher on macOS soon.
> - This requires both Prisma CLI & VS code extension version `4.15.0` or higher

1. Added [Quick Fixes action](https://code.visualstudio.com/docs/editor/refactoring#_code-actions-quick-fixes-and-refactorings) for unique identifiers for MongoDB to add the `map("_id")` attribute function when it’s missing on an identifier field

https://user-images.githubusercontent.com/29753584/239030357-2b6613bf-b6b5-48f2-a2df-b93df0692fda.mov

1. Support for [renaming symbols](https://code.visualstudio.com/docs/editor/refactoring#_rename-symbol) for composite types and views

https://user-images.githubusercontent.com/33921841/242042225-87dfee9b-0698-4e1d-b05e-5cb0b8ab1349.mov


Fixes and improvements

Prisma Client

- [Prisma generate - `Error: write EPIPE` on WSL <-> Windows](https://github.com/prisma/prisma/issues/3294)
- [`prisma generate` is blocked by `query-engine-rhel-openssl-1.0.x` opening in Notepad on Windows](https://github.com/prisma/prisma/issues/4308)
- [Generated client output path hardcoded to build environment](https://github.com/prisma/prisma/issues/7228)
- [Issue with Yarn Workspace Monorepo: Query engine binary for current platform could not be found.](https://github.com/prisma/prisma/issues/7311)
- [Cloning a project with checked in `node_modules` (from another platform) leads to platform engine not being present](https://github.com/prisma/prisma/issues/7848)
- [SvelteKit, Vite and Prisma "module not defined"](https://github.com/prisma/prisma/issues/10404)
- [Schema File Not Found in non monorepo with custom `output`](https://github.com/prisma/prisma/issues/10433)
- [Deploying to Cloudflare Workers | "PrismaClient is unable to be run in the browser"](https://github.com/prisma/prisma/issues/12981)
- [Inline/bundle the contents of the prisma schema on generate](https://github.com/prisma/prisma/issues/13052)
- [Netlify: `Query engine library for current platform "rhel-openssl-1.0.x" could not be found. You incorrectly pinned it to rhel-openssl-1.0.x`](https://github.com/prisma/prisma/issues/13266)
- [Query Engine Library Not Found](https://github.com/prisma/prisma/issues/13396)
- [No client schema when using PrismaClient during cached (standard) Netlify build](https://github.com/prisma/prisma/issues/13475)
- [Module "prisma/client" has no exported member "PrismaClient"](https://github.com/prisma/prisma/issues/13946)
- [EPERM: operation not permitted](https://github.com/prisma/prisma/issues/14626)
- [prisma/client crashes when used with older versions of react-refresh](https://github.com/prisma/prisma/issues/14953)
- [Unable to run prisma cli in pnpm monorepo from workspace install](https://github.com/prisma/prisma/issues/15081)
- [Misleading error message when the query engine is not found](https://github.com/prisma/prisma/issues/15292)
- [When setting custom client output directory, generated package.json does not include "sideEffects: false"](https://github.com/prisma/prisma/issues/15301)
- [ You already added the platform "debian-openssl-1.1.x" to the "generator" block in the "schema.prisma" file as described in https://pris.ly/d/client-generator, but something went wrong. ](https://github.com/prisma/prisma/issues/15631)
- [Prisma seems to be looking in the wrong location for rhel-openssl-1.0.x](https://github.com/prisma/prisma/issues/15638)
- [Can't find prisma engine](https://github.com/prisma/prisma/issues/16872)
- [`Cannot find name '$PrismaModel'` due to feature `extendedWhereUnique` with preview feature `fieldReference`](https://github.com/prisma/prisma/issues/16997)
- [Netlify build fails with PrismaClientInitializationError](https://github.com/prisma/prisma/issues/17167)
- [i'm getting the error while requesting the api ](https://github.com/prisma/prisma/issues/17906)
- [Query engine library for current platform could not be found.](https://github.com/prisma/prisma/issues/17996)
- [Prisma unable to reconnect if initial connection fails](https://github.com/prisma/prisma/issues/18071)
- [GraphQL protocol encoder incorrectly turns empty array into empty object.](https://github.com/prisma/prisma/issues/18846)
- [GraphQL protocol: Invalid `Date` values silently turn into `nulls`](https://github.com/prisma/prisma/issues/18970)
- [prisma/client/edge + Cloudflare Worker / wrangler = Could not resolve "os"](https://github.com/prisma/prisma/issues/19174)
- [Client is bricked from connecting to DB if first attempt fails.](https://github.com/prisma/prisma/issues/19182)
- [JSON protocol: incorrect recursive composites detection through multiple nesting levels](https://github.com/prisma/prisma/issues/19373)
- [`fieldReference` is not working with enums](https://github.com/prisma/prisma/issues/19449)

Prisma Migrate

- [Pass extra arguments to `prisma db seed` to the seed command](https://github.com/prisma/prisma/issues/9403)
- [Typo in generating migration SQL to add enum.](https://github.com/prisma/prisma/issues/19352)

Language tools (e.g. VS Code)

- [MongoDB: Quick fix for missing `map("_id")` annotation](https://github.com/prisma/language-tools/issues/762)
- [Rename composite types](https://github.com/prisma/language-tools/issues/1135)
- [Views: Support for rename](https://github.com/prisma/language-tools/issues/1365)
- [TextDocument deprecation](https://github.com/prisma/language-tools/issues/1421)
- [Lib name change vsce -> vscode/vsce](https://github.com/prisma/language-tools/issues/1425)


Credits

Huge thanks to RobertCraigie, KhooHaoYit, art049, luxaritas, mrazauskas, maxmartynov, haneenmahd for helping!


πŸ“Ί Join us for another "What's new in Prisma" live stream

Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream.

The stream takes place [on YouTube](https://youtu.be/t7jsqf0DeNc) on **Thursday, June 1** at **5 pm Berlin | 8 am San Francisco**.

4.14.1

Today, we are issuing the `4.14.1` patch release.

Fix in Prisma Client

- [prisma/client/edge + Cloudflare Worker / wrangler = Could not resolve "os"](https://github.com/prisma/prisma/issues/19174)

4.14.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v4.14.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.14.0) about the release.** 🌟

Request for feedback for Preview features

We would appreciate your feedback on a handful of [Preview features](https://www.prisma.io/docs/about/prisma/releases#preview) to help us move them to [General Availability](https://www.prisma.io/docs/about/prisma/releases#generally-available-ga) soon. The Preview features include:

- [PostgreSQL extensions](https://github.com/prisma/prisma/issues/15835)
- [Extended where unique](https://github.com/prisma/prisma/issues/15837)
- [Field reference support](https://github.com/prisma/prisma/issues/15068)
- [Order by Nulls](https://github.com/prisma/prisma/issues/14377)
- [Count by filtered relation](https://github.com/prisma/prisma/issues/15069)

You can test them by enabling the Preview feature in your Prisma schema and giving them a try already in your Prisma schema, e.g., PostgreSQL extensions, or regenerating Prisma Client and trying them in your queries.

Highlights

Improved Prisma Client startup performance

For the last couple of months, we've been working hard to improve the performance of Prisma Client. We also published a blog post on how [How We Sped Up Serverless Cold Starts with Prisma by 9x](https://www.prisma.io/blog/prisma-and-serverless-73hbgKnZ6t), which we recommend you give it a read.

This release continues with the same theme by making the size of the generated Prisma Client smaller. We have roughly halved the size of Prisma Client's dependencies.

More Introspection warnings for unsupported features

In [4.13.0](https://github.com/prisma/prisma/releases/tag/4.13.0), we introduced the first 6 introspection warnings that surface the existence of these features in your database and link to our documentation on how to manually work around the Prisma Schema with unsupported database features.

In this release, we added 3 more introspection warnings for the following features:
- [Check Constraints](https://github.com/prisma/prisma/issues/3388) (MySQL + PostgreSQL)
- [Exclusion Constraints](https://github.com/prisma/prisma/issues/17514)
- [MongoDB $jsonSchema](https://github.com/prisma/prisma/issues/8135)

On introspecting a database using any of these features, you will get a warning from the Prisma CLI and a comment in your Prisma schema where the feature is being used. The warning will also contain a link to instructions on how to manually use the feature.


Fixes and improvements

Prisma Client

- [Generator output `client` leads to `Error: ENOENT: no such file or directory, open '.../node_modules/prisma/client/schema.prisma'`](https://github.com/prisma/prisma/issues/12295)
- [DeprecationWarning: Implicit coercion to integer for exit code is deprecated](https://github.com/prisma/prisma/issues/17127)
- [`thread 'tokio-runtime-worker' panicked at 'internal error: entered unreachable code: No unsupported field should reach that path', query-engine\connectors\sql-query-connector\src\model_extensions\scalar_field.rs:70:44`](https://github.com/prisma/prisma/issues/18517)
- [jsonProtocol: `in` argument of filter types does not accept scalars](https://github.com/prisma/prisma/issues/18549)
- [`jsonProtocol` should report errors as nicely as before](https://github.com/prisma/prisma/issues/18876)
- [Generated client with custom path containing string `client`: `ENOENT: no such file or directory, open 'D:\<projectpath>\node_modules\.prisma\client\schema.prisma`](https://github.com/prisma/prisma/issues/12719)
- [Can't find the schema when the project path contains the same name as the generated client folder](https://github.com/prisma/prisma/issues/11206)

Prisma Migrate

- [Build all glibc Linux binaries with CentOS 7](https://github.com/prisma/prisma/issues/16772)
- [Remove `Please create an issue ...` in `MigrateEngine.ts`](https://github.com/prisma/prisma/issues/17268)
- [Do not introspect exclusion constraints as Gist indexes](https://github.com/prisma/prisma/issues/17515)
- [Introspection warnings: move rendering from `DbPull.ts` to the engine ](https://github.com/prisma/prisma/issues/17582)
- [views: don't create local `views` folder on introspection if no views are found](https://github.com/prisma/prisma/issues/18611)
- [RelationMode autocomplete uses incorrect casing](https://github.com/prisma/prisma/issues/18983)

Language tools (e.g. VS Code)

- [Support for VSCode Region Marker Folding](https://github.com/prisma/language-tools/issues/1382)

Credits

Huge thanks to RobertCraigie, KhooHaoYit, art049, luxaritas, mrazauskas for helping!

πŸ“Ί Join us for another "What's new in Prisma" live stream

Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream.

The stream takes place [on YouTube](https://youtu.be/JvLTpSINZdA) on **Thursday, May 11** at **5 pm Berlin | 8 am San Francisco**.

4.13.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v4.13.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.13.0) about the release.** 🌟

Highlights

Introspection warnings for unsupported features

The Prisma Schema Language (PSL) currently doesn't support all database features and functionality of [our target databases](https://www.prisma.io/docs/reference/database-reference/supported-databases). The PSL is an abstraction over SQL and will keep evolving to address gaps in our [database feature matrix](https://www.prisma.io/docs/reference/database-reference/database-features).

Before this release, `prisma db pull` did not pick up the unsupported features in a database. It was easy to lose them when running `prisma migrate dev` based on an existing Prisma schema if not included in a migration file using custom migrations.

To avoid this, we added introspection warnings that surface the existence of these features in your database and link to our documentation on how to manually work around the Prisma Schema with unsupported database features.

In this release, we added introspection warnings for the following features:

- [Partitioned tables](https://github.com/prisma/prisma/issues/1708)
- [PostgreSQL Row Level Security](https://github.com/prisma/prisma/issues/12735)
- [Index sort order, `NULLS FIRST` / `NULLS LAST`](https://github.com/prisma/prisma/issues/15466)
- [CockroachDB row-level TTL](https://github.com/prisma/prisma/issues/13982)
- [Comments](https://github.com/prisma/prisma/issues/8703)
- [PostgreSQL deferred constraints](https://github.com/prisma/prisma/issues/8807)

Prisma CLI will output warnings on introspection (`prisma db pull`) and add comments to your Prisma schema. In the coming releases, we will expand this to many more [features labeled with `topic: database-functionality` on GitHub](https://github.com/prisma/prisma/issues?q=is%3Aopen+label%3A%22topic%3A+database-functionality%22+label%3Ateam%2Fschema+sort%3Aupdated-desc+).

Improved support for Netlify and Vercel build process

Netlify and Vercel cache project dependencies during the build process and reuse that cache until dependencies change. While this helps speed up the build process, any `postinstall` scripts of these dependencies will not be executed.

Prisma uses a `postinstall` script in its package to automatically trigger the customized generation of Prisma Client for your Prisma Schema. When a dependency cache is used, that generation process is not triggered, and an outdated Prisma Client may be used in your application.

When you update your Prisma Schema but not your dependencies, Prisma Client will not be generated for the new schema. For example, columns you added recently to one of your models will not be present in the Prisma Client API - causing errors.

This problem can be avoided by:
1. Adding a custom `postinstall` script in your `package.json` file
2. Manually adding a `prisma generate` step to the β€œBuild” scripts of Vercel and Netlify.

We now added detection of this scenario and will prevent a build without an additional `prisma generate`. This will ensure you're aware of the problem early and get guidance on how to fix this problem. You can read more on how to do this in our docs β€” [Vercel caching troubleshooting](https://prisma.io/docs/guides/other/troubleshooting-orm/help-articles/vercel-caching-issue), [Netlify caching troubleshooting](https://prisma.io/docs/guides/other/troubleshooting-orm/help-articles/netlify-caching-issue).

Better support for pnpm as a package manager

Before this release, Prisma only used npm scripts which would lead to undesirable behavior for a project using a different package manager such as pnpm and yarn. This release improves the detection of the package managers in your project by using [`ni`](https://github.com/antfu/ni). If you're still running into this problem, let us know by creating a [GitHub issue](https://github.com/prisma/prisma/issues/new?assignees=&labels=kind/bug&template=bug_report.yml).

Segmentation fault and TLS connection error fix

In this release, we've fixed a TLS connection error segmentation fault. This mostly affected users running on Node.js 17 or later with OpenSSL 1.1 when using TLS to connect to their database.

JSON protocol Preview feature feedback

We have fixed multiple bugs for the `jsonProtocol` Preview feature and are close to making it Generally Available. We are still looking for feedback about its usage to ensure it is ready and works as expected for everyone.

We would appreciate it if you would try it out, help us polish the feature, and move it to General Availability. Testing it requires little effort. You can test it using the following steps:

1. Enabling the `jsonProtocol` Preview feature in your Prisma schema
2. Re-generating Prisma Client
3. Running your application or tests to make sure everything works

We encourage you to leave your feedback in [this GitHub issue](https://github.com/prisma/prisma/issues/18095) or [create a bug report](https://github.com/prisma/prisma/issues/new?assignees=&labels=kind/bug&template=bug_report.yml) if your run into any issues.

Fixes and improvements

Prisma Client

- [`prisma generate` fails when using pnpm workspaces because it tries to install prisma dependencies with npm or yarn](https://github.com/prisma/prisma/issues/5340)
- [Netlify deploy does not pick up changes to schema file](https://github.com/prisma/prisma/issues/6634)
- [Vercel: Schema only change does not invalidate build cache](https://github.com/prisma/prisma/issues/7291)
- [Serverless deployments: Just making a schema level change to a repository does not invalidate `node_modules` cache that contains generated Client](https://github.com/prisma/prisma/issues/7818)
- [pnpm: Can not `prisma generate` when `prisma/client` is not installed in project](https://github.com/prisma/prisma/issues/9848)
- [Segmentation fault crash when using prisma client when using PostgreSQL](https://github.com/prisma/prisma/issues/10649)
- [Docker with `pnpm install` hangs on `prisma/client` postinstall ](https://github.com/prisma/prisma/issues/11791)
- [Automatic installation of missing dependencies isn't compatible with pnpm](https://github.com/prisma/prisma/issues/14401)
- [Prisma generate throws dependency error karma-chai](https://github.com/prisma/prisma/issues/14816)
- [Postinstall script fails with PNPM workspaces due to npm ERR! Cannot read properties of null (reading 'matches')](https://github.com/prisma/prisma/issues/14944)
- [Debian 11 Node 19.3.0 segmentation fault](https://github.com/prisma/prisma/issues/16897)
- [Prisma client segfault on Ubuntu 22.04](https://github.com/prisma/prisma/issues/17223)
- [Segmentation Fault in Postgres](https://github.com/prisma/prisma/issues/17946)
- [Using Prisma with pnpm results in inability to call database related commands](https://github.com/prisma/prisma/issues/18238)
- [Prisma Connect Causes NodeJS to Close With Exit Code 0](https://github.com/prisma/prisma/issues/18336)
- [99056 segmentation fault (core dumped) node --require esbuild-register prisma/seed.ts](https://github.com/prisma/prisma/issues/18559)
- [JSON protocol: sibling composites of the same type are rejected](https://github.com/prisma/prisma/issues/18735)


Prisma Migrate

- [prisma db pull adds redundant comments: "This table is a partition table ..."](https://github.com/prisma/prisma/issues/18103)
- [Render warning code 30 in cli (PG RLS)](https://github.com/prisma/prisma/issues/18700)

Language tools (e.g. VS Code)

- [`[object Object]` output in logging isn't helpful](https://github.com/prisma/language-tools/issues/1390)

Credits

Huge thanks to KhooHaoYit, rintaun, maxmartynov, haneenmahd for helping!

πŸ“Ί Join us for another "What's new in Prisma" live stream

Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream.

The stream takes place [on YouTube](https://youtu.be/NXzQIkfF3E8) on **Thursday, April 20** at **5 pm Berlin | 8 am San Francisco**.

4.12.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v4.12.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.12.0) about the release.** 🌟

Highlights

Introspection of Views SQL improvements (Preview)

The `views` Preview feature significantly improved this release: `prisma db pull` now reads the SQL query used to define a view and stores it in a `.sql` file in a `views` folder next to your Prisma schema.

> Note: These `.sql` files are not yet used for creating or updating views during migrations yet. For now, we are only looking for feedback. Let us know if the introspected SQL files match the views picked up in your database and if the correct files were created in your filesystem.

We encourage you to leave feedback in this [GitHub issue](https://github.com/prisma/prisma/issues/17335).

Improvements to JSON protocol (Early Preview)

In [4.11.0](https://github.com/prisma/prisma/releases/tag/4.11.0), we announced the `jsonProtocol` Preview feature which had some rough edges. This release improves the Preview feature by providing polished and helpful error messages from Prisma Client when something goes wrong. Here is an example error message:

![](https://user-images.githubusercontent.com/33921841/228188282-9198b378-1cba-4e59-9334-76df5549f599.png)

We would appreciate it if you would try it out to help us polish the feature and move it to General Availability. Testing it requires little effort. Please also leave any feedback in [this issue](https://github.com/prisma/prisma/issues/18095), or open a new one if you want to [report a bug](https://github.com/prisma/prisma/issues/new?assignees=&labels=kind/bug&template=bug_report.yml).

Prisma Client startup performance

In this release, we've improved the startup performance of Prisma Client. We're keen on improving the performance of Prisma Client. If you experience any problems with the startup performance, be sure to [report them](https://github.com/prisma/prisma/issues/new?assignees=&labels=kind/bug&template=bug_report.yml) so that we can look into them.

Open Telemetry tracing and logging for Prisma Client for Data Proxy

This release adds support for [Open Telemetry tracing](https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) (via the `tracing` Preview feature) and [logging](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-prismaclient/logging) to [Prisma Client for Data Proxy](https://www.prisma.io/docs/data-platform/data-proxy/use-data-proxy#generate-prisma-client-for-the-data-proxy).

Fixes and improvements

Prisma Migrate

- [Certain types of schema changes don't work with CockroachDB v22.2](https://github.com/prisma/prisma/issues/16909)
- [Completions: provided by engines break right at the start of a newline](https://github.com/prisma/prisma/issues/17000)
- [`db pull` fail with particular enum default value in column](https://github.com/prisma/prisma/issues/17047)
- [Unable to reset CockroachDB for table with foreign key relationship on v22.2.](https://github.com/prisma/prisma/issues/17055)
- [Introspection of SQLite views](https://github.com/prisma/prisma/issues/17416)
- [Changing the Column Type to Enum on a model throws an error](https://github.com/prisma/prisma/issues/17930)
- [Introspection of the view definition statement](https://github.com/prisma/prisma/issues/18366)
- [MySQL multi-value index removes the primary key on introspection](https://github.com/prisma/prisma/issues/18471)

Prisma Client

- [`findUnique` used with `Promise.all` returns `null`](https://github.com/prisma/prisma/issues/18096)
- [Missing `PrismaPromise` export after update from 4.9.0 to 4.11.0](https://github.com/prisma/prisma/issues/18143)
- [jsonProtocol doesn't query enum fields by default](https://github.com/prisma/prisma/issues/18148)
- [Prisma 4.11 breaks multilevel relation with compound primary keys (typings)](https://github.com/prisma/prisma/issues/18173)
- [4.11.0: `Unique constraint failed on the fields` on query that worked in 4.10.1](https://github.com/prisma/prisma/issues/18186)
- [`jsonProtocol` Field/Enum is not included in the result of the findFirst/findMany function](https://github.com/prisma/prisma/issues/18200)
- [Too many records are returned in 4.11.0 when using nested include and unique field is null](https://github.com/prisma/prisma/issues/18351)
- [Objects with computed properties returned from an extended prisma client return true for any property name when calling hasOwn or hasOwnProperty on it](https://github.com/prisma/prisma/issues/18462)

Language tools (e.g. VS Code)

- [Completions: suggest `type` block for MongoDB](https://github.com/prisma/language-tools/issues/1368)
- [Remove datasource completions](https://github.com/prisma/language-tools/issues/1384)

Credits

Huge thanks to KhooHaoYit, rintaun, ivan, art049 for helping!


πŸ“Ί Join us for another "What's new in Prisma" live stream

Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream.

The stream takes place [on YouTube](https://youtu.be/Ls4qDhRuyko) on **Thursday, March 30** at **5 pm Berlin | 8 am San Francisco**.

4.11.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v4.11.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.11.0) about the release.** 🌟

Highlights

JSON protocol Early Preview

This release introduces an early Preview feature: JSON protocol.

During performance investigations and optimizations, we noticed that the existing implementation added a CPU and memory overhead that was especially noticeable for larger Prisma schemas. Therefore, we found an alternative way to express our queries without needing that overhead: JSON.

To try out the new protocol, enable the `jsonProtocol` Preview feature in your Prisma schema:

prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["jsonProtocol"]
}


Regenerate Prisma Client to use the new JSON protocol.

For environments or situations where it is not viable to enable the Preview feature flag to your Prisma schema file, we also added an environment variable that you can use to force the use of the JSON Protocol Preview feature: `PRISMA_ENGINE_PROTOCOL=json`.

Note: This is an early Preview feature with a significant limitation: Invalid input to Prisma Client will throw unpolished, internal errors that are less descriptive and user-friendly than our usual ones. We intend to improve these future releases. Using it with Data Proxy and Prisma Data Platform currently also leads to errors.

We expect using `jsonProtocol` to improve Prisma Client's startup performance significantly. This will likely have a more significant impact on applications with larger Prisma schemas.

We would appreciate your feedback on this feature on the following particularly:

1. Does using this preview feature introduce any regressions or problems in your application?
2. If not, how does it influence the performance of your application? Can you share before and after measurements?

For feedback, please comment on the [GitHub feedback issue](https://github.com/prisma/prisma/issues/18095).

Introspection support for MySQL, SQL Server, and CockroachDB views

You can now run `prisma db pull` against your database to populate your Prisma schema with your views in MySQL, SQL Server, and CockroachDB.

To learn more, refer to our documentation on [views introspection](https://www.prisma.io/docs/concepts/components/prisma-schema/views#use-introspection). Try it out and let us know your thoughts in this [GitHub issue](https://github.com/prisma/prisma/issues/17335).

Prisma Client extensions improvements: raw query operations

This release adds support for extending top-level raw query operations.

ts
const prisma = new PrismaClient().$extends({
query: {
// relational databases
$queryRaw({ args, query, operation }) {
// handle $queryRaw operation
return query(args)
},
$executeRaw({ args, query, operation }) {
// handle $executeRaw operation
return query(args)
},
$queryRawUnsafe({ args, query, operation }) {
// handle $queryRawUnsafe operation
return query(args)
},
$executeRawUnsafe({ args, query, operation }) {
// handle $executeRawUnsafe operation
return query(args)
},
// MongoDB
$runCommandRaw({ args, query, operation }) {
// handle $runCommandRaw operation
return query(args)
},
},
})


Webpack plugin for Next.js apps using Prisma in monorepo setups

If you've been using Prisma Client in a Next.js app in a monorepo setup, you might have seen this infamous error message:


Error: ENOENT: no such file or directory, open schema.prisma


We finally pinpointed the problem's source to the Next.js bundling step and opened [an issue in the Next.js repository for Vercel to investigate](https://github.com/vercel/next.js/issues/46070) and hopefully fix it.

In the meantime, we've created a workaround via a webpack plugin that makes sure your Prisma schema is copied to the correct location: `prisma/nextjs-monorepo-workaround-plugin`.

To use the plugin, first install it:

npm install -D prisma/nextjs-monorepo-workaround-plugin


Import the plugin into your `next.config.js` file and use it in `config.plugins`:

js
const { PrismaPlugin } = require('prisma/nextjs-monorepo-workaround-plugin')
module.exports = {
webpack: (config, { isServer }) => {
if (isServer) {
config.plugins = [...config.plugins, new PrismaPlugin()]
}
return config
},
}


For further information, refer to our [documentation](https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-monorepo) to learn how to use it and [open an issue](https://github.com/prisma/prisma/issues/new/choose) if it doesn't work as expected.

Fixes and improvements

Prisma Client

- [Prisma hangs when javascript is minified](https://github.com/prisma/prisma/issues/12355)
- [Issue with prisma failing to locate schema file in monorepo](https://github.com/prisma/prisma/issues/12588)
- [NextJS try to open "schema.prisma" at wrong path.](https://github.com/prisma/prisma/issues/12823)
- [pnpm workspace + nextjs: `ENOENT: no such file or directory, open '...\.next\server\pages\api\schema.prisma'`](https://github.com/prisma/prisma/issues/12853)
- [next.js ENOENT trying to open schema.prisma](https://github.com/prisma/prisma/issues/12921)
- [Error with custom output in NPM monorepo: `Error: ENOENT: no such file or directory, open 'schema.prisma'`](https://github.com/prisma/prisma/issues/13233)
- [Error with custom output in Turborepo using Blitz.js: Error: ENOENT: no such file or directory, open '<...>/schema.prisma'](https://github.com/prisma/prisma/issues/14566)
- [Upsert fails on Postgres with list column.](https://github.com/prisma/prisma/issues/16760)
- [Error received when connecting items in an existing one-to-many relationship on MySQL](https://github.com/prisma/prisma/issues/17103)
- [`ENOENT` with custom output and ESM module in NPM monorepo (including Nextjs): `no such file or directory, open /.../schema.prisma...`](https://github.com/prisma/prisma/issues/17687)
- [Setting `ignoreEnvVarErrors: true` Node API QE causes `datasourceOverrides` to be ignored](https://github.com/prisma/prisma/issues/17873)
- [PCE: Support query extensions for raw queries](https://github.com/prisma/prisma/issues/18027)

Prisma Migrate

- [sslaccept=accept_invalid_certs not working with mysql server 8.0.30](https://github.com/prisma/prisma/issues/14903)
- [Error 08S01 (1043) -> Bad Handshake. MySQL Connection with SSL certs](https://github.com/prisma/prisma/issues/16886)
- [Introspection of MySQL views](https://github.com/prisma/prisma/issues/17414)
- [Introspection of SQL Server views](https://github.com/prisma/prisma/issues/17415)
- [Introspection of CockroachDB views](https://github.com/prisma/prisma/issues/17418)
- [`db pull`: add new codes for introspection warnings for views in the CLI](https://github.com/prisma/prisma/issues/17578)
- [Figure out where getDMMF is used for validation](https://github.com/prisma/prisma/issues/17618)
- [Error when `directUrl` is `prisma://` connection string](https://github.com/prisma/prisma/issues/17780)
- [4.10.0, unexpected: `errorCode: 'P1012' PrismaClientInitializationError: error: Environment variable not found: DATABASE_URL.`](https://github.com/prisma/prisma/issues/17797)
- [Validation output is now always colored, also in CI](https://github.com/prisma/prisma/issues/17806)
- [Prisma Client falsely validates `directUrl` env var value, leading to validation error (Affects PDP/Data Proxy and normal Engine)](https://github.com/prisma/prisma/issues/17810)
- [Fix Postgres introspection of partition tables false positives on inherited tables](https://github.com/prisma/prisma/issues/17816)
- [Support openSUSE Tumbleweed](https://github.com/prisma/prisma/issues/17947)
- [Change `validate` to return `Result<(), JsError>` in `Wasm` module](https://github.com/prisma/prisma/issues/17955)
- [(internal): add unit tests for path-specific libssl version parsing](https://github.com/prisma/prisma/issues/18001)

Credits

Huge thanks to KhooHaoYit, rintaun, ivan, Mini256, Lioness100, yukukotani, sandrewTx08, fubhy, zachtil, unflxw, Mosaab-Emam for helping!

πŸ“Ί Join us for another "What's new in Prisma" live stream

Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://youtube.com/playlist?list=PLn2e1F9Rfr6l1B9RP0A9NdX7i7QIWfBa7) live stream.

The stream takes place [on YouTube](https://youtu.be/-Q5vV6s4jIU) on **Thursday, March 2** at **5 pm Berlin | 8 am San Francisco**.

Page 8 of 44

Links

Releases

Has known vulnerabilities

Β© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.