Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.
Last release 6 days ago
27 Aug 2026
Ships fairly regularly
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
7 years old
10653 releases · first in 2020
One column per quarter.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Today, we are excited to share the 2.29.0 stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Today we’re introducing Interactive Transactions – one of our most debated feature requests.
Interactive Transactions are a double-edged sword. While they allow you to ignore a class of errors that could otherwise occur with concurrent database access, they impose constraints on performance and scalability.
While we believe there are better alternative approaches, we certainly want to ensure people who absolutely need them have the option available.
You can opt-in to Interactive Transactions by setting the interactiveTransactions preview feature in your Prisma Schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["interactiveTransactions"]
}
Note that the interactive transactions API does not support controlling isolation levels or locking for now.
You can find out more about implementing use cases with transactions in the docs, and share your feedback.
Named Constraints allow you to represent (when using introspection) and specify (when using Prisma Migrate) the names of constraints of the underlying database schema in your Prisma schema.
Before this release, you could only specify the underlying database constraint names for @@unique and @@index. This meant that you didn't have control over all constraint names in the database schema. In projects that adopted Prisma with introspection, some constraint names from the database were not represented in the Prisma schema. This could lead to the database schema across environments getting out of sync when one environment was introspected, and another was created with Prisma Migrate and had different constraint names.
Starting with this release, you can specify the underlying database constraint names for @id, @@id, @unique, and @relation constraints.
You can opt-in to Named Constraints by adding the namedConstraints preview feature to your Prisma Schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["namedConstraints"]
}
After enabling the namedConstraints preview flag, you can specify the names of constraints in the database schema using the map attribute:
@id(map: "custom_primary_key_constraint_name")@@id([field1, field2], map: "custom_compound_primary_key_name")@unique(map: "custom_unique_constraint_name")@@unique([field1, field2], map: "custom_compound_unique_constraint_name")@@index([field1, field2], map: "custom_index_name")@relation(fields: [fieldId], references: [id], map: "custom_foreign_key_name")After specifying the map attribute, Prisma Migrate will use it when creating migrations.
When using prisma db pull with namedConstraints, these names will be automatically populated in your Prisma schema unless they match our default naming convention (which follows the Postgres convention). When handwriting a Prisma schema, these names are optional and will alternatively be filled with the default names by Prisma under the hood.
name argument in @@unique and @@idIn addition to the map argument, the @@unique and the @@id attributes have the name argument (optional) that Prisma uses to generate the WhereUnique argument in the Prisma Client API.
Note: You can use both
nameandmaptogether, e.g.@@unique([firstName, lastName], name: "NameOfWhereUniqueArg", map: "NameOfUniqueConstraintInDB")
For example, given the following model:
model User {
firstName String
lastName String
@@id([firstName, lastName])
}
The following Prisma Client query is valid:
const user = await prisma.user.findUnique({
where: {
// firstName_lastName is the default `name`
firstName_lastName: {
firstName: 'Ada',
lastName: 'Lovelace',
},
},
})
By adding the name argument to the @@id attribute:
model User {
firstName String
lastName String
- @@id([firstName, lastName])
+ @@id([firstName, lastName], name: "fullname")
}
The following query is valid:
const user = await prisma.user.findUnique({
where: {
// fullname comes from the name argument
fullname: {
firstName: 'Ada',
lastName: 'Lovelace',
},
},
})
Note: For the @@unique attribute this functionality was already available in previous releases. For @@id this is new.
You can learn more about namedConstraints in our documentation.
Please check our upgrade guide before enabling the preview flag and running migrate operations for the first time. It explains what to do if you either want to keep the existing names in your database or want to switch to the default names for a cleaner Prisma schema.
As previously announced, we are adjusting our release policy to adhere more strictly to Semantic Versioning.
In the future, breaking changes in the stable development surface i.e. General Availability will only be rolled out with major version increments.
You can learn more about the change in the announcement blog post.
updateMany does not update the updatedAt timestamps for related records properlyIntroducing FOREIGN KEY constraint '...' on table '...' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.--forceExitintrospect --url outputs additional lines which make output result unusableconfig.datasources[0].provider from GetConfig needs to be a string and not a string[]bar specified for the @@unique attribute is already used as a name for a field. Please choose a different name.Huge thanks to @benkenawell for helping!
Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" livestream.
The stream takes place on Youtube on Thursday, March 04 at 5pm Berlin | 8am San Francisco.
Nothing published for this version