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 5 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
- 3.15.0-dev.2013 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1913 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1812 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1712 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1612 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1512 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1412 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1312 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1212 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1112 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.1012 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.911 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.811 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.711 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.611 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.511 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.411 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.311 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.210 May 2022pre-release
Nothing published for this version
- 3.15.0-dev.110 May 2022pre-release
Nothing published for this version
- 3.14.010 May 2022
Release notes
Open source βπ Help us spread the word about Prisma by starring the repo or tweeting about the release. π
Major improvements
CockroachDB connector is now Generally Available!
We are proud to announce the CockroachDB connector is now stable and Generally Available. The connector was built in joined efforts with the team at Cockroach Labs and comes with full Prisma Client and Prisma Migrate support.
If you're upgrading from Prisma version
3.9.0+ or the PostgreSQL connector, you can now runnpx prisma db pulland review the changes to your schema. To learn more about CockroachDB-specific native types we support, refer to our docs.To learn more about the connector and how it differs from PostgreSQL, head to our documentation.
PostgreSQL
GIN,GiST,SP-GiST, andBRINindexes support (Preview)We introduced the
extendedIndexesPreview feature in version3.5.0, and we have been adding new configuration options for indexes. We've expanded index type support with theGIN,GiST,SP-GiST, andBRINindexes in this release.To make use of an index type, you can update your Prisma schema by providing the
typeargument to the@@indexattribute:datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" previewFeatures = ["extendedIndexes"] } model Post { id Int @id title String content String? tags Json? @@index([tags], type: Gin) }The following SQL will be generated in your migration when you run
prisma migrate dev:CREATE TABLE "Post" ( "id" INTEGER NOT NULL, "title" TEXT NOT NULL, "content" TEXT, "tags" JSONB, CONSTRAINT "Post_pkey" PRIMARY KEY ("id") ); CREATE INDEX "Post_tags_idx" ON "Post" USING GIN ("tags");To learn more about configuring index types in your schema, refer to our documentation.
Improved
queryRawAPIIn this release, we made improvements to the SQL raw API. Some improvements are breaking and will be available behind the new
improvedQueryRawPreview feature flag.The
improvedQueryRawPreview feature solves most of the issues faced when working with the raw API. We would encourage you to turn on the Preview feature flag, try out the new API, and let us know how we can make it even better.You can enable the Preview feature in your Prisma schema as follows:
datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" previewFeatures = ["improvedQueryRaw"] }Here's a list of the improvements
improvedQueryRawcomes with:1. Raw scalar values are deserialized as their correct JavaScript types
Prisma Client queries such as
findManydeserialize database scalar values to their corresponding JavaScript types. For example, aDateTimevalue is deserialized as a JavaScriptDate,and aByteswould be deserialized as a JavaScriptBuffer.Raw queries now implement the same behavior when the
improvedQueryRawPreview feature flag is enabled.β οΈ This change is not yet available in the SQLite connector.
The types of values from the database will be used instead of the types in the Prisma schema. Here's an example query and response:
const res = await prisma.$queryRaw`SELECT bigint, bytes, decimal, date FROM "Table";` console.log(res) // [{ bigint: BigInt("123"), bytes: Buffer.from([1, 2]), decimal: new Prisma.Decimal("12.34"), date: Date("<some_date>") }]Here's a table that recaps the serialization type-mapping for raw results:
Database Type Javascript Type Text String Int32 Number Float Number Double Number Int64 BigInt Numeric Decimal Bytes Buffer Json Object DateTime Date Date Date Time Date Uuid String Xml String 2. PostgreSQL type-casts
We've also fixed a lot of PostgreSQL type-casts that were broken by enabling the
improvedQueryRawPreview feature flag.Here's an example of a query that used to fail:
await prisma.$queryRaw`SELECT ${1.5}::int as int`; // Before: db error: ERROR: incorrect binary data format in bind parameter 1 // After: [{ int: 2 }]You can now perform some more type-casts in your queries:
await prisma.$queryRaw`SELECT ${2020}::float4, (NOW() - ${"1 day"}::interval), ${"2022-01-01 00:00:00"}::timestamptz;`A consequence of this fix is that some subtle implicit casts are now handled more strictly and would fail. Here's an example that used to work but won't work anymore under the
improvedQueryRawfeature flag:await prisma.$queryRaw`SELECT LENGTH(${42});` // ERROR: function length(integer) does not exist // HINT: No function matches the given name and argument types. You might need to add explicit type casts.The
LENGTHPostgreSQL function only accepttextas input. Prisma used to coerce42totextsilently, but wonβt anymore. As suggested by the hint, cast42totextas follows:await prisma.$queryRaw`SELECT LENGTH(${42}::text);`3. Query parameters are correctly sent to the database
This improvement is available without the
improvedQueryRawPreview feature flag.Before this release, query parameters of type
BigInt,Bytes, andDecimalwere incorrectly sent to the database leading to instances of unexpected inserts. Passing the types as query parameters now works:await prisma.$executeRaw`INSERT INTO "Table" ("bigint", "bytes", "decimal") VALUES (${BigInt("123")}, ${Buffer.from([1, 2, 3])}, ${new Prisma.Decimal("12.23")});`Fixes and improvements
Prisma Client
- Improve type conversion and responses for raw queries
- Postgres parameterized interval is passed incorrectly in raw query
- queryRaw cannot handle some numbers
- Query raw run throws the following error
incorrect binary data format in bind parameter 3 - BigInt becomes Number if queried with
$queryRaw - Weird behavior of raw query containing st_dwithin and radius parameter binding
generateoutput withoutputhas weird package path on Windows- Casting error when using integers in raw query
- $queryRaw fails when passing bigint as parameter
- Decimal becomes Number if queried with $queryRaw
- $queryRaw doesn't allow for typecasts
- Raw sql Is not working as expected
- Missing
$fromexecuteRawin error message "Invalid `prisma.executeRaw()` invocation:" - Parameterized ExecuteRaw breaks with Postgres Floats
- PANIC: called
Result::unwrap()on anErrvalue: Any { .. } in query-engine/connectors/sql-query-connector/src/error.rs:58:51 - $queryRaw to Postgres failing to correctly insert/cast numeric parameters
- Compound primary key is not generated when a unique field has the same name
referentialIntegrity = prisma: Broken query ononUpdate: Cascade|symbol ... not found|The column ... does not exist in the current database.- Getting a "Raw query failed. Code: `N/A`. Message: `error deserializing column 0: a Postgres value was `NULL``" error when using Postgres ARRAY_AGG with a nullable column
- Planetscale not able to upsert with Prisma
- connectOrCreate deletes old relation and creates a new one
- referentialIntegrity=prisma causes P2022 (column not exist) on updating a record
- Unable to insert Buffer into Bytes pg field using $executeRaw
- CockroachDB: Figure out, test and document which versions we support
- Implement
debugPaniclike functionality forgetConfigandgetDmmfof Query Engine - $queryRaw returning numbers for bigint fields
- Prisma returns sequence values with number type from Postgres while using queryRaw
- PANIC: called
Result::unwrap()on anErrvalue: Any { .. } in query-engine/connectors/sql-query-connector/src/error.rs:58:51 - RQ: Properly coerce query raw input parameters in the Query Engine
- RQ: Properly coerce query raw result in the Client
- RQ: Send type-hinted query parameters for raw queries (Postgres)
- RQ: Integrate new QE result for query raw in the client
- thread 'tokio-runtime-worker' panicked at 'internal error: entered unreachable code: Relation fields should never hit the BSON conversion logic.', query-engine/connectors/mongodb-query-connector/src/value.rs:34:35
- Exception when using Decimal.js instance in an input
Prisma
- Error: Error in migration engine. Reason: [migration-engine\cli\src/main.rs:68:41] called
Result::unwrap()on anErrvalue: Custom { kind: InvalidData, error: "stream did not contain valid UTF-8" } - Allow creating GIN index on JSONB fields in Postgres adapter
prisma formatpanics when you use a colon to declare field type (field: Typesyntax)- Better error message if using
TEXTorBLOBin MySQL @id/@index/@unique - Schema validation error mentions
Error parsing attribute "@id"but it's actually about@@id - Support GiST Index type with Postgres
- MySQL 8 function as default not created in first migration
- Error: [introspection-engine/connectors/sql-introspection-connector/src/commenting_out_guardrails.rs:32:59] called
Option::unwrap()on aNonevalue - Nicer error message when you try to migrate a CockroachDB database with a
provider=posgresqlschema - Using
--urlfordb pullignored/overwritesprovider=cockroachdb - CockroachDB: support more autoincrementing integer primary key representations
- Prisma migrate always DROP DEFAULT on CockroachDB
- Allow using a custom root certificate with SQL Server
- Write basic tests for cockroachdb in prisma/prisma
- CockroachDB: re-add Oid native type
- Support Generalized Inverted Indices on CockroachDB
- Missing validation on decimal defaults
- Log error details in console when we fail to submit an error report
Prisma Migrate
Language tools (e.g. VS Code)
- Autocompletion support for composite type indexes
- Add tests for new CockroachDB native types
- Completion for new CockroachDB sequences
Credits
Huge thanks to @ever0de, @flatplate, @njmaeff, @tnzk, @DePasqualeOrg for helping!
Prisma Day
Prisma Day is back this year, and it'll be on June 15 - 16 at the JamesJune Sommergarten in Berlin. Join us in-person or online for talks and workshops on modern application development and databases. Come and meet and chat with the team behind the Prisma ORM and Prisma Data Platform.
πΌ 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 hiring for a number of roles: Technical Support Engineer, Back-end Engineer: Prisma Data Platform, and a Developer Advocate(Frontend/ Fullstack). You can find more jobs we're hiring for on our jobs page.
Feel free to read through the job descriptions and apply using the links provided.
πΊ 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, May 12 at 5 pm Berlin | 8 am San Francisco.
- 3.14.0-integration-tweak-ci.79 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tweak-ci.69 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tweak-ci.54 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tweak-ci.44 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tweak-ci.34 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tweak-ci.24 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tweak-ci.14 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tnzk-feature-esm-friendly-reexports.53 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-tnzk-feature-esm-friendly-reexports.327 Apr 2022pre-release
Nothing published for this version
- 3.14.0-integration-tnzk-feature-esm-friendly-reexports.227 Apr 2022pre-release
Nothing published for this version
- 3.14.0-integration-tnzk-feature-esm-friendly-reexports.127 Apr 2022pre-release
Nothing published for this version
- 3.14.0-integration-log-error-details-on-error-report-failure.19 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.2110 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.2010 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.1910 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.1810 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.179 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.169 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.159 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.149 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.139 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.129 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.119 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.109 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.99 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.89 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.79 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.69 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.59 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.48 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.33 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.22 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-handle-fmt-panics.129 Apr 2022pre-release
Nothing published for this version
- 3.14.0-integration-fix-inline-schema.510 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-fix-inline-schema.410 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-fix-inline-schema.310 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-fix-inline-schema.210 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-fix-inline-schema.110 May 2022pre-release
Nothing published for this version
- 3.14.0-integration-fix-db-pull-url-overwrites-provider-cockroachdb.26 May 2022pre-release
Nothing published for this version