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 2 days ago
01 Sep 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
10657 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
Today, we are issuing the 5.1.1 patch release.
disconnect: true does not appear to delete the foreign key in the returned dataneeds and count methodNothing 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 5.1.0 stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.
After two big releases where we released Client extensions for production usage (4.16.0) and made Prisma faster by default (5.0.0), we have focused on some smaller issues to make the experience with these new features even better.
Our community has been on the roll! We appreciate everyone who helps us by opening a GitHub issue or proposing a fix via Pull Requests. In this release, we're excited to highlight multiple community contributions:
PrismaAction type, missing findUniqueOrThrow and findFirstOrThrow https://github.com/prisma/prisma/pull/17471 by @mejiaej and missing groupBy https://github.com/prisma/prisma/pull/19985 by @iurylippoIn our continued and ongoing work to make Prisma faster, we identified some Prisma Client queries that led to multiple SQL statements being executed — although in specific databases, that was not necessary.
Hence we optimized our internal SQL generation for PostgreSQL and CockroachDB to generate more efficient SQL queries:
create queryIn a simple create query, RETURNING makes the second query and the transaction statements obsolete:
prisma.user.create({
data: { name: "Original name" }
})
BEGIN
INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id"
SELECT "User"."id", "User"."name" FROM "User" WHERE "User"."id" = $1;
COMMIT
-- Sends 1 statement (instead of 2) and omits the transaction
INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id", "User"."name"
update queryFor a simple update query, RETURNING makes both additional queries and the transaction statements obsolete:
prisma.user.update({
where: { id: 1 },
data: { name: "updated" }
})
BEGIN
SELECT id FROM "User" WHERE "User".id = 1;
UPDATE "User" SET name = 'updated' WHERE "User".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
COMMIT
-- Sends 1 statement (instead of 3) and omits the transaction
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name;
update query, return with relation valueOne SELECT query could easily be dropped in a simple update query that should return a relation value as well:
prisma.user.update({
where: { id: 1 },
data: { name: "updated" },
includes: { posts: true }
})
BEGIN
SELECT id FROM "User" WHERE "User".id = 1;
UPDATE "User" SET name = 'updated' WHERE "User".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
SELECT id, title FROM "Post" WHERE "Post"."userId" = 1;
COMMIT
-- Sends 3 statements (instead of 4)
BEGIN
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id;
SELECT id, name FROM "User" WHERE "User".id = 1;
SELECT id, title FROM "Post" WHERE "Post"."userId" = 1;
COMMIT
update queryAn empty update query can be optimized to skip the transaction and the second identical query by creating specific handling for this edge case in our code:
prisma.user.update({
where: { id: 1 },
data: {},
})
BEGIN
SELECT id, name FROM "User" WHERE "User".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
COMMIT
-- Sends 1 statement (instead of 2) and omits the transaction
SELECT id, name FROM "User" WHERE "User".id = 1;
update query (but do not return relation value)An update of both the model and its relation, we could drop 2 SELECT queries that we did before without ever using their return values:
prisma.user.update({
where: { id: 1 },
data: {
name: "updated",
posts: {
update: {
where: { id: 1 },
data: {
title: "updated"
}
}
}
}
})
BEGIN
SELECT id, name FROM "User" WHERE "User".id = 1;
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id;
SELECT "id", "postId" FROM "Post" WHERE "Post".id = 1;
UPDATE "Post" SET title = 'updated' WHERE "Post"."userId" = 1 AND "Post".id = 1;
SELECT id, name FROM "User" WHERE "User".id = 1;
COMMIT
-- Sends 3 statements (instead of 5)
BEGIN
UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name;
SELECT "id", "postId" FROM "Post" WHERE "Post".id = 1;
UPDATE "Post" SET title = 'updated' WHERE "Post"."userId" = 1 AND "Post".id = 1;
COMMIT
In the next releases, we will continue optimizing Prisma Client queries to only run the minimal amount of SQL queries necessary.
If you notice any Prisma Client queries that are affected right now, please check the issues under our performance/queries label. If you didn’t find one for what you’re seeing, please create a new issue. This will be super useful for us to understand all (edge) cases. Thank you!
directUrlOur CLI command prisma studio that opens Prisma Studio now also can use the directUrl property of the datasource block so you can make it talk to a different database than defined in url. This makes it easier to use Studio alongside the Prisma Data Proxy and Accelerate.
We fixed (almost) all cases where using a specific term as a model name in your Prisma Schema would lead to a type clash due to Prisma’s generated typings. As a result of a type clash, it was not possible to use that model in your code (this was e.g. the case if you named a model Model or ModelUpdate).
We also deprecated the <ModelName>Args type as part of that fix. Going forward, <ModelName>DefaultArgs should be used instead.
X and XUpdateModel and ModelUpdate is defined in the schema @prisma/internals (previously @prisma/sdk) uses deprecated dependencies [email protected] via temp-write 4.0.0Datasource breaks generated return typesmodel names cause clashes in generated types$extends TS error: "Inferred type of this node exceeds the maximum length the compiler will serialize" with "declaration": true in tsconfigType '"findUniqueOrThrow"' is not assignable to type 'PrismaAction'Promise breaks types for PrismaPromiseinclude not working on models ending with ...Update with unique compound indexLogLevel enum conflicts with built-in Prisma typePrisma.XyzFindManyArgs breaks findMany typing in v4.16.0+this.$on("beforeExit") doesn't work anymore on 5.0.0Error: Unknown value type on nested createfindUnique on @unique columns that are enums<Tablename>UpsertArgs select field does not match type for db.<tablename>.upsert(item)by in groupBy in 5.0.0TypeError [ERR_INVALID_URL]: Invalid URL when HTTP(S)_PROXY en var has is set to a URL without a protocoltsc --watch fails with JavaScript heap out of memory errorGetResultHuge thanks to @skyzh, @alula, @michaelpoellath, @RobertCraigie, @Gerschtli, @andyjy, @mejiaej, @iurylippo, @mrazauskas for helping!
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