⚠️ Breaking Change
Impact Score: 7/10
Prisma 2.20.0 — Release Notes & Engineering Impact
Source available — automated, not human-reviewed
Component: prisma · Channel: stable. Automated analysis, not a compatibility certification. How this works.
Analysis updated: 2026-11-01.
Breaking-change evidence from the source
Breaking changes ### The `@prisma/cli` package has reached its end of life
Upcoming breaking changes in the next version (2.21.0)
⚡ Executive Summary (TL;DR)
Prisma 2.20.0. Source highlight: Today, we are excited to share the `2.20.0` stable release 🎉
Who Does This Impact? (Role-Based Analysis)
💻 Software Engineers & Devs
Check the source notes against the package and APIs you use before upgrading.
📊 Product & Engineering Leads
Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.
⚙️ DevOps & Security
Verify the target version, runtime requirements and rollback procedure in the official documentation.
⚠️ Breaking Changes & Deprecations (2)
- Breaking changes ### The `@prisma/cli` package has reached its end of life
- Upcoming breaking changes in the next version (2.21.0)
✨ New Features & Capabilities (2)
- Tests: add tests for `prisma format` cli command
- Add a `push` method to scalar list update input in addition to set
🔧 Bug Fixes & Patches (2)
- Command injection vulnerability in @prisma/sdk in getPackedPackage function
- Visual Studio Code Prisma Extension Remote Code Execution Vulnerability
📄 View Raw Release Notes (Original Developer Log)
Today, we are excited to share the `2.20.0` stable release 🎉
🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v2.20.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.20.0) about the release.** 🌟
## Major improvements & new features
### Count on relations (Preview)
This [highly requested feature](https://github.com/prisma/prisma/issues/5079) is now in [Preview](https://www.prisma.io/docs/about/releases#preview). You can now count the number of related records by passing `_count` to the `select` or `include` options and then specifying which relation counts should be included in the resulting objects via another `select`.
For example, counting the number of posts that an user has written:
```ts
const users = await prisma.user.findMany({
include: {
_count: {
select: { posts: true },
},
},
})
```
The structure of the returned `User` objects is as follows:
```js
{
id: 1,
email: '[email protected]',
name: 'Alice',
_count: { posts: 2 }
}
```
You can enable this featrues with the `selectRelationCount` feature flag:
```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["selectRelationCount"]
}
```
There may be some rough edges during the Preview period. If you run into any problems, you can reach us in [this issue](https://github.com/prisma/prisma/issues/6312).
### `Node-API` is now in Preview
[Node-API](https://napi.rs/) is a new technique for binding Prisma's Rust-based [query engine](https://www.prisma.io/docs/concepts/components/prisma-client/query-engine) directly to Prisma Client. This reduces the communication overhead between the Node.js and Rust layers when resolving Prisma Client's database queries.
You can enable this feature with the `napi` feature flag:
```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["napi"]
}
```
Enabling the Node-API will not affect your workflows in any way, the experience of using Prisma will remain exactly the same.
The Node-API has different runtime characteristics than the current communication layer between Node.js and Rust.
There may be some rough edges during the Preview period. If you run into any problems, you can reach us in [this issue](https://github.com/prisma/prisma/issues/6301).
### New `push` operation available for arrays on PostgreSQL
PostgreSQL supports [array](https://www.postgresql.org/docs/9.1/arrays.html) data structures (sometimes also called [scalar lists](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#lists)). As an example, consider the `permissions` field on the following `User` model:
```prisma
model User {
id Int @id @default(autoincrement())
permissions String[]
}
```
As of this release, you can append a new item to existing lists atomically with the `push` command:
```ts
await prisma.user.update({
where: { id: 42 },
data: {
permission: {
push: "chat:read",
},
},
})
```
Learn more in [this issue](https://github.com/prisma/prisma/issues/5078).
### `groupBy` and `createMany` are now Generally Available
For the pioneers among you, you can now remove the `groupBy` and `createMany` from your Preview features:
```diff
generator client {
provider = "prisma-client-js"
- previewFeatures = ["groupBy", "createMany"]
}
```
Learn more in our documentation about [`groupBy`](https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing#group-by-preview) and [`createMany`](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#createmany-preview).
### Prisma Client Go now supports `BigInt`, `Decimal` and `Bytes`
Prisma Client Go continues to get more powerful every release. With this release, we've added support for more native database types: `BigInt`, `Decimal` and `Bytes`:
```go
var views db.BigInt = 1
bytes := []byte("abc")
dec := decimal.NewFromFloat(1.23456789)
created, err := client.User.CreateOne(
db.User.Picture.Set(bytes),
db.User.Balance.Set(dec),
db.User.Views.Set(views),
).Exec(ctx)
```
## Breaking changes
### The `@prisma/cli` package has reached its end of life
For all you holdovers, you've seen warnings like this for a couple months now:
```
warn @prisma/cli has been renamed to prisma.
Please uninstall @prisma/cli: npm remove @prisma/cli
And install prisma: npm i prisma
```
It's now time to upgrade. Follow the instructions and switch over to the new `prisma` package today:
#### npm
```
npm remove @prisma/cli
npm install -D prisma
```
Thanks to this change, running `npx prisma` will now always invoke the right Prisma CLI, no matter what your local setup looks like.
#### Yarn
```
yarn remove @prisma/cli
yarn add -D prisma
```
## Upcoming breaking changes in the next version (2.21.0)
### `.aggregate` will change to return `null` in 2.21.0
Subscribe to [this issue](https://github.com/prisma/prisma/issues/6320) for updates on how to prepare your code.
## Fixes and improvements
### Prisma Migrate
- [Unclear Introspection error message: Error parsing attribute "@id": Fields that are marked as id must be required.](https://github.com/prisma/prisma/issues/1368)
- [[Introspection] Defaults set as expressions (as required in MySQL on some column types) not picked up](https://github.com/prisma/prisma/issues/2600)
- [Introspection: More information in `Schema is inconsistent` error message](https://github.com/prisma/prisma/issues/3145)
- [prisma introspect overrides generator fields](https://github.com/prisma/prisma/issues/4066)
- [Tests: add tests for `prisma format` cli command](https://github.com/prisma/prisma/issues/5910)
- [prisma migrate gives: Error querying the database: db error: ERROR: syntax error at or near "NOT"](https://github.com/prisma/prisma/issues/6026)
- [Introspection does not recognize Default Expressions](https://github.com/prisma/prisma/issues/6035)
- [Failing describer on MySQL with empty view definition](https://github.com/prisma/prisma/issues/6082)
- [Introspection failed: Getting definition from Resultrow ResultRow { columns: [\"name\", \"definition\"], values: [Text(Some(\"sp_helpdiagrams\")), Text(None)] } as String failed](https://github.com/prisma/prisma/issues/6134)
- [`prisma migrate` set field as unique automatically](https://github.com/prisma/prisma/issues/6239)
### Prisma Client
- [Add a `push` method to scalar list update input in addition to set](https://github.com/prisma/prisma/issues/5078)
- [$transaction doesn't roll back in NestJS when we pass method from external service](https://github.com/prisma/prisma/issues/5730)
- [when case-insensitive mode enabled in where clause, unnecessarily LOWER() function and ILIKE operator is used at the same time](https://github.com/prisma/prisma/issues/5748)
- [Invalid response data: the query result was required, but an empty Object((Weak)) was returned instead.](https://github.com/prisma/prisma/issues/5762)
- [regression: Running multiple findUnique's in parallel causes both to return null](https://github.com/prisma/prisma/issues/5941)
- [PANIC in query-engine/core/src/interpreter/query_interpreters/inmemory_record_processor.rs:111:80called `Result::unwrap()` on an `Err` value: FieldNotFound { name: "origin", model: "Field not found in record Record { values: [Int(1011), String(\"https://woman.mynavi.jp/article/190924-7/\")], parent_id: None }. Field names are: [\"id\", \"link\"], looking for: \"origin\"" }](https://github.com/prisma/prisma/issues/5969)
- [Internal: Setup Renovate for https://github.com/prisma/engines-wrapper](https://github.com/prisma/prisma/issues/6086)
- [Rename `SKIP_GENERATE` from Client postinstall script to `PRISMA_SKIP_POSTINSTALL_GENERATE`](https://github.com/prisma/prisma/issues/6151)
### Language tools (e.g. VS Code)
- [Autocomplete all array items in a compound index](https://github.com/prisma/language-tools/issues/676)
### Security Fixes
We fixed two security issues:
* [Command injection vulnerability in @prisma/sdk in getPackedPackage function](https://github.com/prisma/prisma/security/advisories/GHSA-pxcc-hj8w-fmm7)
This is a low-severity issue and no users have been affected
* [Visual Studio Code Prisma Extension Remote Code Execution Vulnerability](https://github.com/prisma/language-tools/security/advisories/GHSA-4rf9-43m7-x828)
This is a high-severity issue and we recommend all Prisma VS Code extension users verify that they have automatically been upgraded to the latest version. There is no evidence that this vulnerability has been exploited.
Big thanks to [@erik-krogh (Erik Krogh Kristensen)](https://github.com/erik-krogh) and [@Ry0taK](https://github.com/Ry0taK) for reporting these issues.
## Credits
Huge thanks to @endor, @iBluemind, @matthewmueller, @paularah, @Iamshankhadeep for helping!
## 📺 Join us for another "What's new in Prisma" livestream
Learn about the latest release and other news from the Prisma community by joining us for another ["What's new in Prisma"](https://www.youtube.com/watch?v=2CDHn-Maij0&ab_channel=Prisma) livestream.
The stream takes place [on Youtube](https://www.youtube.com/watch?v=2CDHn-Maij0&ab_channel=Prisma) on **Thursday, April 01** at **5pm Berlin | 8am San Francisco**.