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 4 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
- 4.5.0-dev.4216 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.4115 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.4014 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3914 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3814 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3713 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3613 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3513 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3413 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3313 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3213 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3112 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.3012 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2912 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2812 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2712 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2612 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2512 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2412 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2312 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2211 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2111 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.2011 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.1911 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.1811 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.177 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.166 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.156 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.146 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.136 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.125 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.115 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.105 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.94 Oct 2022pre-release
Nothing published for this version
- 4.5.0-dev.829 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.728 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.628 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.528 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.428 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.328 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.228 Sept 2022pre-release
Nothing published for this version
- 4.5.0-dev.128 Sept 2022pre-release
Nothing published for this version
- 4.4.027 Sept 2022
Release notes
Open source โ๐ Help us spread the word about Prisma by starring the repo or tweeting about the release. ๐
Major improvements
General improvements
In the last sprint, we focused our efforts on squashing as many bugs as we could. You can find the full list of improvements and bug fixes in the Fixes and improvements section below.
Some of the improvements we made include but are not limited to:
- Improved optimistic concurrency control (GitHub issue)
- Improved decimal precision
- Improved handling of big amounts of prepared statement placeholders:
Databases impose limits when they hit a specific number, and when a query (either generated by Prisma Client or provided by the user directly as a raw query) hits it some users ran into a misleading
Can't reach database servererror message (GitHub issue). The error message will now be more useful (P2035error code), and Prisma Client should not cause these errors anymore.
If you notice any regression, please make sure to create a GitHub issue. We touched a lot of code in this sprint, and even though we are confident in our tests, something might have slipped through the cracks. We'd like to fix the regressions as soon as possible.
isolationLevelfor sequential transaction operationsIn version
4.2.0, we added support for setting transaction isolation levels for interactive transactions (Preview). You can now define isolation levels for sequential transaction operations:prisma.$transaction([]).Isolation levels describe different types of trade-offs between isolation and performance that databases can make when processing transactions. Isolation levels determine what types of data leaking can occur between transactions or what data anomalies can occur. To set the transaction isolation level, use the
isolationLeveloption in the second parameter of the API. For example:await prisma.$transaction( [ // sequential operations prisma.user.create({ data: {/** args */ } }), prisma.post.create({ data: {/** args */ } }) ], { isolationLevel: Prisma.TransactionIsolationLevel.Serializable } )Prisma Client supports the following isolation levels if they're available in your database provider:
ReadCommittedReadUncommittedRepeatableReadSerializableSnapshot
Learn more about it in our documentation.
New
P2034error code for transaction conflicts or deadlocksWhen using certain isolation levels, it is expected that a transaction can fail due to a write conflict or a deadlock, throwing an error. One way to solve these cases is by retrying the transaction.
To make this easier, we're introducing a new
PrismaClientKnownRequestErrorwith the error codeP2034: "Transaction failed due to a write conflict or a deadlock. Please retry your transaction". You can programmatically catch the error and retry the transaction. Here's an example showing how you can retry a transaction:import { Prisma, PrismaClient } from '@prisma/client' const prisma = new PrismaClient() async function main() { const MAX_RETRIES = 5 let retries = 0; let result; while (retries < MAX_RETRIES) { try { result = await prisma.$transaction( [ prisma.user.deleteMany({ where: { /** args */ } }), prisma.post.createMany({ data: { /** args */ } }) ], { isolationLevel: Prisma.TransactionIsolationLevel.Serializable } ) } catch (error) { if (error.code === 'P2034') { retries++ continue } throw error } } }Fixes and improvements
Prisma Client
- Wrong types for fluent API when used along with
rejectOnNotFound - Precision issue when persisting Decimal.js objects
- Decimals lose precision (postgres)
- Weird behavior with "in:" clause on a findMany() with orderBy + take
- decimal lose precision digits to postgres
updateMany()causes lost-updates- Error: P1001: Can't reach database server when including large table
- Client shows contains filter on uuid data type despite not being a valid operation
- A model with relation to another model via non-null foreign key has nullable type
- Validation error when inserting data of type
List<String | DateTime>into field of typeList<String> - Can't reach database server when doing a large findMany query
- Maximum call stack size exceeded when creating huge amount of related rows
- Unique constraint failed during
$transaction([deleteMany, createMany]) - update will break atomicity
- Nested self referential orderby not working
- MySQL: Optimistic Concurrency Control doesn't work with UpdateMany
- Wrong type when retrieving multiple related records using fluent API
- Fluent API produces runtime error
- Column 'orderby_.....' in on clause is ambiguous
- [PostgreSQL] Cannot create or update row with large Decimal value within
numericrange - Failed transactions trigger multipleResolves
The provided database string is invalid. Unable to parse URL. in database URL.on invalid (?) connection string- relation query fails when thousands of records
- Unable to query records with certain values
- orderBy using self-referential relation in a nested relation fails with "table name "TableName" specified more than once"
- @updatedAt does not work with @default
- Prisma silently misses nested elements on MariaDB when it triggers a huge IN clause
createdAt @default(now())andupdatedAt @updatedAtget different times on row creation- Interactive Transactions: fatal when throwing string instead of Error() since 3.10.0
- Prisma MongoDB can not search for field with value
$foo - groupBy crashes when using enums
- MySQL DECIMAL(X, 5) returns incorrect precision.
- "Join" performance: (Not so) huge data set throws an error
Error: The provided database string is invalid. Unable to parse URL. in database URL.- [mongoDB]
findRawdoes not work within aninteractiveTransaction - Filters max size is exceeded
- Prisma fails on Postgres query with findMany
- Update Restrict failed on prisma referentialIntegrity
- invalid character in $let in $lookup pipeline when using cursor and order by query
- Find many returns empty array or null
- Once instance has previously been poisoned
- Sanitize error snapshots in new test setup
- The findMany query fails silently when the array length passed through IN parameter exceeds 999
- mongodb cannot use $runCommand Raw in transaction
parent result: Some(ManyRecords { records: [Record { values: [Int(3), Int(1), DateTime(2022-08-08T12:27:55.310+00:00)], parent_id: None }], field_names: ["id", "userId", "createdAt"] }), relation: Relation { name: "post", model_a_name: "Comment", model_b_name: "Post", model_a: OnceCell((Weak)), model_b: OnceCell((Weak)), field_a: OnceCell((Weak)), field_b: OnceCell((Weak)), manifestation: Inline(InlineRelation { in_table_of_model_name: "Comment" }), internal_data_model: "#InternalDataModelWeakRef#" }- Given exponent overflowing the maximum accepted scale (255).: TryFromIntError(())
- Once instance has previously been poisoned
- sqlite:cuid():called
Result::unwrap()on anErrvalue: FingerprintError("Could not retrieve hostname") - Calling
findUniqueconcurrently with aDateTimecolumn causes it to returnnull - Maximum Call Stack Size Exceeded When Inserting large Array Object
- Prisma Client is incompatible with TypeScript 4.8
- This is a non-recoverable error: When creating Item with nested query
- Given exponent overflowing the maximum accepted scale (255).: TryFromIntError(())
- Prisma 4.3.0 takes 100x more time to generate types
- Tracing:
prisma:enginespans always get sampled when using probability based samplers - Datasource providers in
prisma initis listing wrong values - Disconnect with large queries
N/Aerror and message with large raw queries- only one @updatedAt is filled by the QE although multiple are accepted in the schema
- Insert fails if a table has a space in the name of the primary key
- Bug with throwing formatted errors
- called
Option::unwrap()on aNonevalue - Upsert error on MySQL:
Query ... is required to return data, but found no record(s) - Add tests for mongodb's
findRaw,aggregateRawandrunCommandRawin sequential transactions
Prisma
- sqlite: show better error when a permission denied error occurs
- Prisma v4 breaks support for empty
dbgenerated()- invalid migration created with no schema change - Binary engine:
$disconnectnever returns if engine failed to start
Prisma Migrate
Prisma Studio
Credits
Huge thanks to @abenhamdine, @miguelgargallo, @Clansty, @panoplied, @MEnnabah, @drzamich, @AndrewSouthpaw, @kt3k for helping!
๐ผ We're hiring!
If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you.
We're looking for a Developer Advocate (Frontend / Fullstack) and Back-end Engineer: Prisma Data Platform.
Feel free to read the job descriptions and apply using the links provided.
Prisma Data Platform
We're working on the Prisma Data Platform โ a collaborative environment for connecting apps to databases. It includes the:
- Data Browser for navigating, editing, and querying data
- Data Proxy for your database's persistent, reliable, and scalable connection pooling.
- Query Console for experimenting with queries
Try it out and let us know what you think!
๐บ 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" livestream.
The stream takes place on YouTube on Thursday, September 29 at 5 pm Berlin | 8 am San Francisco.
- 4.4.0-integration-feat-deno-deploy.112 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-61-integration-smaller-pg-batch-size-d648eeea3754295b57706d66257a7fe7be19c7c9.326 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-61-integration-smaller-pg-batch-size-d648eeea3754295b57706d66257a7fe7be19c7c9.226 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-61-integration-smaller-pg-batch-size-d648eeea3754295b57706d66257a7fe7be19c7c9.126 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-58-integration-sqlite-conversion-panic-27ab384f9b6367b324482ba93a5accaac01231ec.123 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-56-integration-sqlite-conversion-panic-3ba0d959e76c2282691aecac535009a8c0fd2ff1.123 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-55-qe-transaction-write-conflict-911f8bae8f9b08719066939ba0aaff82c1fe4a50.123 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-54-integration-database-assertion-violation-error-2-4eff3e6e5529e98980308c423c302b1fcfc72e6a.323 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-54-integration-database-assertion-violation-error-2-4eff3e6e5529e98980308c423c302b1fcfc72e6a.223 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-54-integration-database-assertion-violation-error-2-4eff3e6e5529e98980308c423c302b1fcfc72e6a.123 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-53-integration-database-assertion-violation-error-2-a1d9ea82ae39e90813e839586d113a19a1438f65.123 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-50-integration-database-assertion-violation-error-2-ed23821e01366277c5fbc9b7b44e6b66f3a18fd0.123 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-45-mongodb-url-error-038539e4f3ccddf32d7f3eaa63da07b1f3db2386.122 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-44-integration-database-assertion-violation-error-2-78d1421518fddc0b4cf781bcb17e2f3bca3b0f24.122 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-43-integration-query-raw-itx-mongo-e5ccee611e0dac785d27c75481672389bdf102dc.122 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-42-integration-query-raw-itx-mongo-89509fc6084c9ae736828beef25ad86b82179273.122 Sept 2022pre-release
Nothing published for this version
- 4.4.0-integration-engines-4-4-0-4-integration-deno-preview-flag-3c1168fbf77b17ded4f89a480e467eddb5302d77.131 Aug 2022pre-release
Nothing published for this version