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 3 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
Release timeline
10653 releases since 2020One column per quarter.
Releases
- 5.2.0-dev.102 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.92 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.82 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.72 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.62 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.52 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.42 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.32 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.21 Aug 2023pre-release
Nothing published for this version
- 5.2.0-dev.11 Aug 2023pre-release
Nothing published for this version
- 5.1.13 Aug 2023
Release notes
Open source →Today, we are issuing the
5.1.1patch release.Fixes in Prisma Client
- Browser bundle: Unhandled Runtime Error when upgrading to 5.1.0 from 5.0.0
- Prisma Client:
disconnect: truedoes not appear to delete the foreign key in the returned data - Prisma Client errors with "TypeError: Cannot create proxy with a non-object as target or handler" when using result client extension with no
needsandcountmethod
- 5.1.1-dev.43 Aug 2023pre-release
Nothing published for this version
- 5.1.1-dev.32 Aug 2023pre-release
Nothing published for this version
- 5.1.1-dev.22 Aug 2023pre-release
Nothing published for this version
- 5.1.1-dev.12 Aug 2023pre-release
Nothing published for this version
- 5.1.01 Aug 2023
Release notes
Open source →Today, we are excited to share the
5.1.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.
Highlights
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.Community contributions
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:
- Fix IPv6 not working for relational databases: https://github.com/prisma/prisma-engines/pull/4051 by @alula
- Middlewares: Add to
PrismaActiontype, missingfindUniqueOrThrowandfindFirstOrThrowhttps://github.com/prisma/prisma/pull/17471 by @mejiaej and missinggroupByhttps://github.com/prisma/prisma/pull/19985 by @iurylippo - Better error message in currently non-supported runtimes like Browser or Vercel Edge Runtime https://github.com/prisma/prisma/pull/20163 by @andyjy
- Remove error messages for valid NixOS setups https://github.com/prisma/prisma/pull/20138 by @Gerschtli
Better performance: Fewer SQL queries on PostgreSQL & CockroachDB
In 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:
Simple
createqueryIn a simple
createquery,RETURNINGmakes the second query and the transaction statements obsolete:Prisma Client query
prisma.user.create({ data: { name: "Original name" } })Before v5.1.0
BEGIN INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id" SELECT "User"."id", "User"."name" FROM "User" WHERE "User"."id" = $1; COMMIT5.1.0 and later
-- Sends 1 statement (instead of 2) and omits the transaction INSERT INTO "User" ("name") VALUES ($1) RETURNING "User"."id", "User"."name"Simple
updatequeryFor a simple
updatequery,RETURNINGmakes both additional queries and the transaction statements obsolete:Prisma Client query
prisma.user.update({ where: { id: 1 }, data: { name: "updated" } })Before v5.1.0
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; COMMIT5.1.0 and later
-- Sends 1 statement (instead of 3) and omits the transaction UPDATE "User" SET name = 'updated' WHERE "User".id = 1 RETURNING "User".id, "User".name;Simple
updatequery, return with relation valueOne
SELECTquery could easily be dropped in a simpleupdatequery that should return a relation value as well:Prisma Client query
prisma.user.update({ where: { id: 1 }, data: { name: "updated" }, includes: { posts: true } })Before v5.1.0
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; COMMIT5.1.0 and later
-- 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; COMMITEmpty
updatequeryAn empty
updatequery can be optimized to skip the transaction and the second identical query by creating specific handling for this edge case in our code:Prisma Client query
prisma.user.update({ where: { id: 1 }, data: {}, })Before v5.1.0
BEGIN SELECT id, name FROM "User" WHERE "User".id = 1; SELECT id, name FROM "User" WHERE "User".id = 1; COMMIT5.1.0 and later
-- Sends 1 statement (instead of 2) and omits the transaction SELECT id, name FROM "User" WHERE "User".id = 1;Simple + relation
updatequery (but do not return relation value)An update of both the model and its relation, we could drop 2
SELECTqueries that we did before without ever using their return values:Prisma Client query
prisma.user.update({ where: { id: 1 }, data: { name: "updated", posts: { update: { where: { id: 1 }, data: { title: "updated" } } } } })Before v5.1.0
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; COMMIT5.1.0 and later
-- 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; COMMITIn 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/querieslabel. 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!Prisma Studio now supports
directUrlOur CLI command
prisma studiothat opens Prisma Studio now also can use thedirectUrlproperty of thedatasourceblock so you can make it talk to a different database than defined inurl. This makes it easier to use Studio alongside the Prisma Data Proxy and Accelerate.Prisma Client: No more type clashes
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
ModelorModelUpdate).We also deprecated the
<ModelName>Argstype as part of that fix. Going forward,<ModelName>DefaultArgsshould be used instead.Fixes and improvements
Prisma Client
- Reduce the number of generated SQL statements for Updates/Inserts
- [v2.17.0] Missing client TS types Aggregate*Args
- Reduce transactions for writes
- Incorrect Include typings when having models called
XandXUpdate - Model named "Check" is incorrectly typed
- Models named Query cause an internal GraphQL Parse Error
- Naming an entity "Query" leads to an error
- Type name clash when
ModelandModelUpdateis defined in the schema - Duplicate identifier 'CheckSelect'
@prisma/internals(previously @prisma/sdk) uses deprecated dependencies[email protected]viatemp-write 4.0.0- naming a model
Datasourcebreaks generated return types - Certain
modelnames cause clashes in generated types - Type error on query with select field (although query runs successfully)
$extendsTS error: "Inferred type of this node exceeds the maximum length the compiler will serialize" with"declaration": trueintsconfig- Update operation includes multiple where statements for the same fields
- Type conflict when naming a table {something} and a second table {something}Result
Type '"findUniqueOrThrow"' is not assignable to type 'PrismaAction'- Naming a model
Promisebreaks types forPrismaPromise - Prisma can't connect with an IPv6 host (on e.g. Fly.io)
includenot working on models ending with...Updatewith unique compound index- Prisma Client: fixing type name clashes from generated client
- Prisma Client: wrong type when using spread operator to set default values on query args
- The generated updateArgs have no update attribute
- 4.16.1 breaks type check
LogLevelenum conflicts with built-in Prisma type- Using
Prisma.XyzFindManyArgsbreaksfindManytyping in v4.16.0+ this.$on("beforeExit")doesn't work anymore on 5.0.0- Wrong nullable types with fluent API in Prisma 5.0
Error: Unknown value typeon nested create- Prisma 5.0 Migration
findUniqueon@uniquecolumns that are enums <Tablename>UpsertArgsselect field does not match type fordb.<tablename>.upsert(item)- TypeScript Error TS2322 when assigning JavaScript Date object to Prisma DateTime field
- npm install of Prisma CLI fails on preinstall with no logs when Node.js version is lower than minimum
- Types wrongly accept non-array parameter
byingroupByin 5.0.0 - CLI errors with
TypeError [ERR_INVALID_URL]: Invalid URLwhenHTTP(S)_PROXYen var has is set to a URL without a protocol tsc --watchfails withJavaScript heap out of memoryerror- Hovering over types (intellisense) shows confusing
GetResult - Internal query batching fails when the table name is 'stores'
- Client extensions result extensions should be applied after query extensions
Prisma Studio
Language tools (e.g. VS Code)
- The extension for VS Code ignores the modern telemetry flag
- Prisma VS Code extension with mongodb provider crashes when a relation field/type is not defined
- Editing schema.prisma results in wasm panics
Credits
Huge thanks to @skyzh, @alula, @michaelpoellath, @RobertCraigie, @Gerschtli, @andyjy, @mejiaej, @iurylippo, @mrazauskas for helping!
- 5.1.0-integration-studio-direct-url.1028 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.928 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.827 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.727 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.627 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.527 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.427 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.327 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.226 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-studio-direct-url.125 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-revert-ld-library-path.131 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-joel-try-comment.120 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-joel-improve-download.331 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-joel-improve-download.231 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-joel-improve-download.127 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-result-query-ext.128 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-json-undefined-array.121 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-types-mixed-input-types.112 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-oom-default-selection.311 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-oom-default-selection.211 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-oom-default-selection.111 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-enums.129 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-confusing-get-result.128 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.731 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.631 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.531 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.429 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.329 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.229 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-fix-client-add-extra-schema-search-location.129 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-6-integration-alula-ipv6-9943d4e306ad96d7806ab1274c18621f6e5ace2e.118 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-27-integration-fix-1-1-update-relation-mode-prisma-5073e8a011b2ca4b6ab2ef2178bd55afcba8364c.131 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-26-integration-fix-1-1-update-relation-mode-prisma-faab4b8d871ca3dba4f060557253dc586fc4e8d0.131 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-18-integration-ipv6-with-tests-259c2f6e20d9101db8dc8a4dd5b0ba8ef0936b90.124 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-16-integration-ipv6-with-tests-e3c036a6453d51dd0e47635bcadac2c0368bce79.124 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-14-integration-ipv6-with-tests-4f2d5ad825bbeeee4573ab192f7addbc5d62b1f8.124 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-12-integration-ipv6-with-tests-62ef4e5560580828e96e1cfe9557c4a0c4a33484.121 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-11-integration-ipv6-with-tests-5739301cd0f18f785b7555f2ac858629e473857b.121 Jul 2023pre-release
Nothing published for this version
- 5.1.0-integration-engines-5-1-0-10-integration-ipv6-with-tests-011462b5340b9d05de68e7634fb12cc681cd9203.121 Jul 2023pre-release
Nothing published for this version
- 5.1.0-dev.981 Aug 2023pre-release
Nothing published for this version
- 5.1.0-dev.971 Aug 2023pre-release
Nothing published for this version
- 5.1.0-dev.9631 Jul 2023pre-release
Nothing published for this version
- 5.1.0-dev.9531 Jul 2023pre-release
Nothing published for this version
- 5.1.0-dev.9431 Jul 2023pre-release
Nothing published for this version