Impact Score: 5/10
Prisma 2.5.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.
โก Executive Summary (TL;DR)
Prisma 2.5.0. Source highlight: Today we are excited to share the `2.5.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.
โจ New Features & Capabilities (6)
- In version `2.1.0` we introduced two experimental features, namely `connectOrCreate` and `transactionApi`.
- Add a few sanity tests for Studio in the CLI pipeline
- Implement deprecation notice of removed preview feature flags in Client
- Add lint support for no env vars in provider field
- [[feature] Group action button with other buttons](https://github.com/prisma/studio/issues/482)
- Add error code for invalid schema.prisma for reintrospection
โก Performance & Enhancements (3)
- Logging the time taken to perform a type of query
- Improve update notifier message
- Improvements to relation pills
๐ง Bug Fixes & Patches (2)
- Internal: trigger e2e tests for patch branches
- Switch GH Actions trigger from `repository_dispatch` to `workflow_dispatch` to enable running branches
๐ View Raw Release Notes (Original Developer Log)
Today we are excited to share the `2.5.0` stable release.
๐ **Help us spread the word about Prisma by starring the repo โ๏ธ, [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20release%202.5.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.5.0) about the release or sharing your experience with Prisma [on Reddit](https://www.reddit.com/r/typescript/comments/icbey2/which_orm_should_i_use/).** ๐
## Major improvements
### Middlewares, removing duplicates with `distinct` and aggregations are now stable
After running in _preview_ mode for a number of releases, we are excited to promote the following features into this stable release:
- `middlewares`
- `distinct`
- `aggregateApi`
This means you can omit the respective feature flags in the `generator` block in your Prisma schema:
```diff
generator client {
provider = "prisma-client-js"
- previewFeatures = ["middlewares", "distinct", "aggregateApi"]
}
```
Read on to learn about each feature individually!
#### Middlewares
Prisma Client's middleware lets you intercept Prisma Client queries to manipulate its _parameters_ and interrogate its _result_. A middleware is a _function_ that's passed to Prisma Client's `$use` method.
Middlewares are convenient for a number of use cases, for example:
- Logging the time taken to perform a type of query
- Manipulating or validating query parameters
- Contacting another service upon specific queries
The following example includes two middlewares:
```ts
const prisma = new PrismaClient()
prisma.$use(async (params, next) => {
const result = next(params);
return result;
}
prisma.$use(async (params, next) => {
return next(params);
}
```
๐ **Documentation**: [Middleware](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/middleware)
#### Remove duplicates from query results with `distinct`
Prisma Client allows you to filter duplicate rows from the response to a `findMany` query using the `distinct` option:
```ts
const distinctCities = await prisma.user.findMany({
select: {
city: true,
country: true,
},
distinct: ["city"],
});
```
๐ **Documentation**: [Distinct](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/distinct)
#### Aggregations with `aggregate`
Prisma Client allows you to perform aggregations operations on the **number** fields (such as `Int` and `Float`) of a model - for example, you can get the average age of all users:
```ts
const aggregations = await prisma.user.aggregate({
avg: {
age: true,
},
});
console.log("Average age:" + aggregations.avg.age);
```
Prisma Client supports the following aggregations:
* `avg` (average)
* `sum` (sum)
* `min` (minimum value)
* `max` (maximum value)
๐ **Documentation**: [Aggregations](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/aggregations)
## Preview features
### New: Case insensitive filters (PostgreSQL only)
In `2.5.0` we introduce case insensitive filters for querying capabilities to Prisma Client. It allows you to query for fields in a case insensitive way.
> **Note**: This feature will not work if you're using database collations that do not know how to convert between upper- and lowercase letters (e.g. the `C` collation).
๐ **Documentation**: [Case sensitivity](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/case-sensitivity) / [Case-sensitive filtering](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/filtering#case-insensitive-filtering)
#### Feature flag
Insensitive filters querying needs to be enabled with the feature flag `insensitiveFilters` like so:
```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["insensitiveFilters"]
}
```
#### Usage
The new `mode` option you can pass to `findMany` influences the corresponding filter (e.g. `contains` or `startsWith`) but doesn't change the return type of the `findMany` query. `mode` can have two possible values:
- `default`: Uses the default filter configured on the database level. If the collation is configured as case insensitive in the database, the default mode will be case insensitive as well. In that case, there's no need to use the `insensitive` mode.
- `insensitive`: Uses the case insensitive filter (if possible).
```ts
const result = await prisma.user.findMany({
where: {
email: {
equals: '[email protected]',
mode: 'insensitive',
},
},
})
```
Please [share your feedback](https://github.com/prisma/prisma/issues/3340) on how this feature works for you. We are interested in both positive and negative feedback, so we know if this feature is already ready for production! (If encounter any problems, please open a new issue [here](https://github.com/prisma/prisma/issues/new/choose)).
<!--
Github issue to be published:
Title: Preview feature feedback: `insensitiveFilters`
Body:
Please share your feedback about the preview feature `insensitiveFilters` that was released in [v2.5.0](https://github.com/prisma/prisma/releases/tag/2.5.0) in this issue.
- If you encounter a bug, please [open a bug report](https://github.com/prisma/prisma/issues/new?assignees=&labels=&template=bug_report.md&title=) in this repo.
- If the feature is working well for you, please share this in a comment below or leave a ๐ on this issue.
If you have any questions, don't hesitate to ask them in the [`#prisma2`](https://app.slack.com/client/T0MQBS8JG/CKQTGR6T0) channel in the [Prisma Slack](https://slack.prisma.io).
-->
### Feature flags for `middlewares`, `distinct` and `aggregationApi` removed
As mentioned above, we were able to promote three features into this stable release. This was thanks to your help and feedback, so please keep trying the preview features if they're useful to you and help us by sharing feedback.
### Already existing preview features from `2.1.0`
Just a quick reminder:
- In version [`2.1.0`](https://github.com/prisma/prisma/releases/tag/2.1.0) we introduced two experimental features, namely `connectOrCreate` and `transactionApi`.
In case they're useful for you, please give them a try and [share your feedback](https://github.com/prisma/prisma/issues/3108)! These features remain in preview in this release.
## ๐ Help us spread the word about Prisma
To help spread the word about Prisma, we'd very much appreciate if you would **star this repo** ๐ And if you're excited about the features in this week's release, then help us and [share it on Twitter](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20release%202.5.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.5.0).
## Fixes and improvements
### [`prisma`](https://github.com/prisma/prisma)
- [@default(autoincrement()) not working on non id integer fields](https://github.com/prisma/prisma/issues/1938)
- [thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', libs/datamodel/core/src/validator/validate.rs:178:29](https://github.com/prisma/prisma/issues/1988)
- [Improve update notifier message](https://github.com/prisma/prisma/issues/2416)
- [Introspect not creating unique relation names](https://github.com/prisma/prisma/issues/2591)
- [EPIC: Provide binaries for FreeBSD 12](https://github.com/prisma/prisma/issues/2841)
- [Internal: trigger e2e tests for patch branches](https://github.com/prisma/prisma/issues/3003)
- [`npx prisma introspect` errors with `[libs/sql-schema-describer/src/mysql.rs:353:27] column_name` on indexes using expressions (MySQL 8.0.13+)](https://github.com/prisma/prisma/issues/3089)
- [Switch Client to use Unix Domain Sockets](https://github.com/prisma/prisma/issues/3092)
- [Add a few sanity tests for Studio in the CLI pipeline](https://github.com/prisma/prisma/issues/3094)
- [Output Studio package version in `prisma -v`](https://github.com/prisma/prisma/issues/3188)
- [Suggested CLI commands are missing `npx` prefix when being triggered via `npx prisma` itself](https://github.com/prisma/prisma/issues/3210)
- [Internal: Move `Studio` command into `cli` package](https://github.com/prisma/prisma/issues/3211)
- [`Transaction` is still a reserved word in 2.4.1](https://github.com/prisma/prisma/issues/3215)
- [Fluent API chaining seems to be broken as of 2.3.0](https://github.com/prisma/prisma/issues/3267)
- [Error: [libs\datamodel\core\src\dml\datamodel.rs:166:9] Every RelationInfo should have a complementary RelationInfo on the opposite relation field. ](https://github.com/prisma/prisma/issues/3317)
- [Implement deprecation notice of removed preview feature flags in Client](https://github.com/prisma/prisma/issues/3324)
### [`prisma-client-js`](https://github.com/prisma/prisma-client-js)
- [Support case insensitivity when querying and sorting ](https://github.com/prisma/prisma-client-js/issues/690)
### [`migrate`](https://github.com/prisma/migrate)
- [migrate save and up always recreate the db](https://github.com/prisma/migrate/issues/316)
- [Migration fails after changing ENUM](https://github.com/prisma/migrate/issues/358)
- [On failure _new tables/types are left](https://github.com/prisma/migrate/issues/414)
- [Error: Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: db error: ERROR: type "MembershipRole" already exists ](https://github.com/prisma/migrate/issues/509)
- [Error while using prisma migrate init: The above error occurred in the <TabIndexProvider> component:](https://github.com/prisma/migrate/issues/521)
- [Invalid connection string not handled gracefully](https://github.com/prisma/migrate/issues/528)
- [Getting error in prisma migrate save --experimental command](https://github.com/prisma/migrate/issues/534)
### [`language-tools`](https://github.com/prisma/language-tools)
- [Add lint support for no env vars in provider field](https://github.com/prisma/language-tools/issues/17)
- [vscodium marketplace availability](https://github.com/prisma/language-tools/issues/281)
- [Publish to open-vsx.org](https://github.com/prisma/language-tools/issues/349)
- [2.4.0 breaks extension](https://github.com/prisma/language-tools/issues/382)
- [Renaming prisma.schema model](https://github.com/prisma/language-tools/issues/396)
### [`studio`](https://github.com/prisma/studio)
- [[feature] Group action button with other buttons](https://github.com/prisma/studio/issues/482)
- [Cache error](https://github.com/prisma/studio/issues/484)
- [Column titles overflow on the next column when too long](https://github.com/prisma/studio/issues/486)
- [Bring back row selection checkboxes](https://github.com/prisma/studio/issues/495)
- [Improvements to relation pills](https://github.com/prisma/studio/issues/496)
- [Field level filters for the relation accordion](https://github.com/prisma/studio/issues/497)
- [Prisma Client errors are not propagated correctly](https://github.com/prisma/studio/issues/498)
### [`prisma-engines`](https://github.com/prisma/prisma-engines)
- [Create CONTRIBUTING.MD](https://github.com/prisma/prisma-engines/issues/890)
- [Validate that there is only one @default(autoincrement()) per table, on an indexed column on MySQL](https://github.com/prisma/prisma-engines/issues/903)
- [Implement missing unexecutable migration warnings](https://github.com/prisma/prisma-engines/issues/926)
- [Validation: default values on enum fields should be valid for the enum](https://github.com/prisma/prisma-engines/issues/959)
- [Switch GH Actions trigger from `repository_dispatch` to `workflow_dispatch` to enable running branches](https://github.com/prisma/prisma-engines/issues/977)
- [Add error code for invalid schema.prisma for reintrospection](https://github.com/prisma/prisma-engines/issues/984)