Prisma

Latest version: v0.15.0

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 12 of 44

4.0.0

We're excited to share the `4.0.0` stable release today. 🎉

Prisma `4.0.0` features a variety of improvements across Prisma Migrate, Prisma schema, and Prisma Client. These changes will impact most Prisma users, particularly those who used some of our most popular Preview features around advanced index management, raw SQL queries, and filtering rows by properties of JSON.

As this is a major release, we included many breaking bug fixes and other enhancements, but we believe upgrading is worthwhile. You can learn about upgrading in our [Prisma 4 Upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4) and the [Prisma 4 Upgrade video](https://www.youtube.com/watch?v=FSjkBrfaoEY).

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v4.0.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.0.0) about the release.** 🌟

Major improvements

Here's a TL;DR:
- **Preview features moved to [General Availability](https://www.prisma.io/docs/about/prisma/releases#generally-available-ga)**
- `extendedIndexes`
- `filterJson`
- `improvedQueryRaw`
- **Improvements to the Prisma Schema**
- Defaults values for scalar lists (arrays)
- Improved default support for embedded documents in MongoDB
- Explicit unique constraints for 1:1 relations
- Removed support for usage of `references` on implicit m:n relations
- Enforcing uniqueness of referenced fields in the `references` argument in 1:1 and 1:m relations for MySQL
- Removal of undocumented support for the `type` alias
- Removal of the `sqlite` protocol for SQLite URLs
- Better grammar for string literals
- **New Prisma Client APIs**
- `findUniqueOrThrow`
- `findFirstOrThrow`
- **General improvements**
- Deprecating `rejectOnNotFound`
- Fix rounding errors on big numbers in SQLite
- `DbNull`, `JsonNull`, and `AnyNull` are now objects
- Prisma Studio updates
- Dropped support for Node 12
- New default sizes for statement cache
- Renaming of `prisma/sdk` npm package to `prisma/internals`
- Removal of the internal `schema` property from the generated Prisma Client

`extendedIndexes` is now Generally Available

Starting with this release, we're excited to announce that `extendedIndexes` is now Generally Available! 🚀

diff
generator client {
provider = "prisma-client-js"
- previewFeatures = ["extendedIndexes"]
}


We introduced `extendedIndexes` in `3.5.0` and have constantly been shipping improvements in the subsequent releases to the configuration of indexes.

You can now configure indexes in your Prisma schema with the `index` attribute to define the kind of index that should be created in your database. You can configure the following indexes in your Prisma Schema:

<details>
<summary> Sort, sort order, and length</summary>

The `length` argument is available on MySQL on the `id`, `id`, `unique`, `unique`, and` index` fields. It allows Prisma to support indexes and constraints on `String` with a `TEXT` native type and `Bytes` types.

The `sort` argument is available for all databases on the `unique`, `unique`, and `index` fields. SQL Server also allows it on `id` and `id`.

prisma
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}

model Post {
title String db.VarChar(300)
abstract String db.VarChar(3000)
slug String unique(sort: Desc, length: 42) db.VarChar(3000)
author String
created_at DateTime

id([title(length: 100), abstract(length: 10)])
index([author, created_at(sort: Desc)])
}


</details>

<details>
<summary>
Hash indexes for PostgreSQL </summary>

prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model A {
id Int id
value Int

index([value], type: Hash)
}

</details>

<details>
<summary>
<code>GIN</code>, <code>GiST</code>, <code>SP-GiST</code> and <code>BRIN</code> indexes for PostgreSQL
</summary>

prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

model Post {
id Int id
title String
content String?
tags Json?

index([tags], type: Gin)
}

</details>

<details>
<summary> SQL Server index clustering </summary>

prisma
datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}

model Post {
id Int default(autoincrement()) id(clustered: false)
title String
content String?
}

</details>

Refer to our docs to learn how you can [configure indexes](https://www.prisma.io/docs/concepts/components/prisma-schema/indexes) in your Prisma schema and the [supported indexes for the different databases](https://www.prisma.io/docs/reference/database-reference/database-features).

**⚠️ Breaking change:** If you previously configured the index properties at the database level, refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#index-configuration) for a detailed explanation and steps to follow.


`filterJson` is now Generally Available

This release moves the `filterJson` Preview feature into General Availability! 🪄

diff
generator client {
provider = "prisma-client-js"
- previewFeatures = ["filterJson"]
}


JSON filtering allows you to filter rows by the data inside a `Json` type. For example:

ts
const getUsers = await prisma.user.findMany({
where: {
petMeta: {
path: ['cats', 'fostering'],
array_contains: ['Fido'],
},
},
})


The `filterJson` Preview feature has been around since May 2021, and we're excited to mark it ready for production use! Learn more in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filter-on-a-json-field).

`improvedQueryRaw` is now Generally Available

Prisma 4 now marks the `improvedQueryRaw` Preview feature as Generally Available! 🤩

diff
generator client {
provider = "prisma-client-js"
- previewFeatures = ["improvedQueryRaw"]
}


This change introduces two major improvements (both breaking, refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4) for a smooth upgrade) when working with raw queries with Prisma:

<details>
<summary>
1. Scalar values are de-serialized as their correct JavaScript types
</summary>

Raw queries now deserialize scalar values to their corresponding JavaScript types.

> **Note**: Types are inferred from the values and not from the Prisma Schema types.

Here's an example query and response:

ts
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>") }]


Below is a table that recaps the serialization type-mapping for raw results:

| Database Type | JavaScript Type |
| --- | --- |
| Text | String |
| Int32 | Number |
| Int64 | BigInt |
| Float | Number |
| Double | Number |
| Numeric | Decimal |
| Bytes | Buffer |
| Json | Object |
| DateTime | Date |
| Date | Date |
| Time | Date |
| Uuid | String |
| Xml | String |

</details>

<details>
<summary>
2. PostgreSQL type-casts
</summary>

Previously, PostgreSQL type-casts were broken. Here's an example query that used to fail:

ts
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 type-casts in your queries as follows:

ts
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:

ts
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 `LENGTH` PostgreSQL function only accept `text` as input. Prisma used to silently coerce `42` to `text` but won’t anymore. As suggested by the hint, cast `42` to `text` as follows:

ts
await prisma.$queryRaw`SELECT LENGTH(${42}::text);`

</details>

Refer to our docs to learn more on [raw query type mappings](https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#raw-query-type-mapping) in Prisma.

**⚠️ Breaking change:** To learn how you can smoothly upgrade to version `4.0.0`, refer to our upgrade guide: [Raw query type mapping: scalar values are now deserialized as their correct JavaScript types](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#raw-query-type-mapping-scalar-values-are-now-deserialized-as-their-correct-javascript-types) and [Raw query mapping: PostgreSQL type-casts](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#raw-query-mapping-postgresql-type-casts).

Defaults values for scalar lists (arrays)

Prisma 4 now introduces support for defining default values for scalar lists (arrays) in the Prisma schema.

You can define default scalar lists as follows:

prisma
model User {
id Int id default(autoincrement())
posts Post[]
favoriteColors String[] default(["red", "blue", "green"])
}


To learn more about default values for scalar lists, refer to [our docs](https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#define-a-scalar-list-with-a-default-value).

**⚠️ Breaking change:** Refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#scalar-list-defaults) for a detailed explanation and steps to follow.


Improved default support for embedded documents in MongoDB

From version `4.0.0`, you can now set default values on embedded documents using the `default` attribute. Prisma will provide the specified default value on reads if a field is not defined in the database.

You can define default values for embedded documents in your Prisma schema as follows:
prisma
model Product {
id String id default(auto()) map("_id") db.ObjectId
name String unique
photos Photo[]
}

type Photo {
height Int default(200)
width Int default(100)
url String
}


Refer to our docs to learn more on [default values for required fields on composite types](https://www.prisma.io/docs/concepts/components/prisma-client/composite-types#default-values-for-required-fields-on-composite-types).

**⚠️ Breaking change:** Refer to our [upgrade guide](https://www.prisma.io/docs/concepts/components/prisma-client/composite-types#default-values-for-required-fields-on-composite-types) for detailed explanation and steps when working with default fields on composite types in MongoDB from version `4.0.0`.

Explicit unique constraints for 1:1 relations

From version `4.0.0`, 1:1 relations are now required to be marked with the `unique` attribute on the side of the relationship that contains the foreign key.

Previously, the relation fields were implicitly treated as unique under the hood. The field was also added explicitly when `npx prisma format` was run.

prisma
model User {
id Int id default(autoincrement())
profile Profile? relation(fields: [profileId], references: [id])
profileId Int? unique // <-- include this explicitly
}

model Profile {
id Int id default(autoincrement())
user User?
}


**⚠️ Breaking change:** Refer to our [upgrade path](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#explicit-unique-constraints-on-one-to-one-relations) for a detailed explanation and steps to follow.

Removed support for usage of `references` on implicit m:n relations

This release removes the usage of the `references` argument, which was previously optional when using m:n relations.

diff
model Post {
id Int id default(autoincrement())
- categories Category[] relation("my-relation", references: [id])
+ categories Category[] relation("my-relation")
}

model Category {
id Int id default(autoincrement())
- posts Post[] relation("my-relation", references: [id])
+ posts Post[] relation("my-relation")
}


This is because the only valid value for `references` was `id`, so removing this argument clarifies what can and cannot be changed.

Refer to our docs to learn more about [implicit m:n relations](https://www.prisma.io/docs/concepts/components/prisma-schema/relations/many-to-many-relations#implicit-many-to-many-relations).

**⚠️ Breaking change:** Refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#remove-references-syntax-for-implicit-many-to-many-relations) for a detailed explanation and steps to follow.

Enforcing uniqueness of referenced fields in the `references` argument in 1:1 and 1:m relations for MySQL

From version `4.0.0`, Prisma will now enforce that the field on the `references` side of a `relation` is unique when working with MySQL.

To fix this, add the `unique` or `id` attributes to foreign key fields in your Prisma schema.

**⚠️ Breaking change:** To learn how to upgrade to version `4.0.0`, refer to our [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#enforced-use-of-unique-or-id-attribute-for-one-to-one-and-one-to-many-relations-mysql-and-mongodb).

Removal of undocumented support for the `type` alias

With `4.0.0`, we're deprecating the `type` keyword for string aliasing. The `type` keyword will now be exclusively used for defining embedded documents in MongoDB.

We encourage you to remove any usage of the `type` keyword from your Prisma schema for type aliasing.

Removal of the `sqlite` protocol for SQLite URLs

Starting from `4.0.0`, we are dropping support of the `sqlite://` URL prefix for SQLite. We encourage you to use the `file://` prefix when working with SQLite.

Better grammar for string literals

String literals in the Prisma schema now need to follow the same rules as strings in JSON. That changes mostly the escaping of some special characters.

You can find more details on the specification here:
- https://www.json.org/json-en.html
- https://datatracker.ietf.org/doc/html/rfc8259

To fix this, resolve the validation errors in your Prisma schema or run `npx prisma db pull` to get the current values from the database.

**⚠️ Breaking change:** To learn how to update your existing schema, refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#better-grammar-for-string-literals).

New Prisma Client APIs: `findUniqueOrThrow` and `findFirstOrThrow`

In this release, we're introducing two new APIs to Prisma Client:
- `findUniqueOrThrow` – retrieves a single record as `findUnique` but throws a `RecordNotFound` exception when no record is not found
- `findFirstOrThrow` – retrieves the first record in a list as `findFirst` but throws a `RecordNotFound` exception when no record is found

Here's an example of usage of the APIs:

ts
const user = await prisma.user.findUniqueOrThrow({
where: {
email: "aliceprisma.io",
},
})

user.email // You don't need to check if the user is null


The APIs will be convenient for scripts API routes where you're already handling exceptions and want to fail fast.

> **Note:** Please use the APIs with care. If you use these APIs, add the proper guardrails to your application.

Refer to the API reference in our docs to learn how [`findUniqueOrThrow`](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#finduniqueorthrow) and [`findFirstOrThrow`](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findfirstorthrow) differ from `findUnique` and `findFirst` respectively.


Deprecating `rejectOnNotFound`

We're deprecating the `rejectOnNotFound` parameter in favor of the new `findUniqueOrThrow` and `findFirstOrThrow` Prisma Client APIs.

We expect the new APIs to be easier to understand and more type-safe.

Refer to the [`findUniqueOrThrow`](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#finduniqueorthrow) and [`findFirstOrThrow`](https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findfirstorthrow) docs to learn how you can upgrade.

Fix rounding errors on big numbers in SQLite

SQLite is a loosely-typed database. While Prisma will prevent you from inserting values larger than integers, nothing prevents SQLite from accepting big numbers. These manually inserted big numbers cause rounding errors when queried.

Prisma will now check numbers in the query's response to verify they fit within the boundaries of an integer. If a number does not fit, Prisma will throw a [`P2023`](https://www.prisma.io/docs/reference/api-reference/error-reference#p2023) error:


Inconsistent column data: Conversion failed:
Value 9223372036854775807 does not fit in an INT column,
try migrating the 'int' column type to BIGINT


To learn more on rounding errors with big numbers on SQLite, refer to our [docs](https://www.prisma.io/docs/concepts/database-connectors/sqlite#rounding-errors-on-big-numbers).

`DbNull`, `JsonNull`, and `AnyNull` are now objects

Previously, `Prisma.DbNull`, `Prisma.JsonNull`, and `Prisma.AnyNull` used to be implemented using string constants. This meant their types overlapped with regular string data that could be stored in JSON fields.

We've now made them _special_ objects instead that don't overlap with string types.

Before `4.0.0` `DbNull` was checked as a string so you could accidentally check for a null as follows:

ts
import { PrismaClient, Prisma } from 'prisma/client'
const prisma = new PrismaClient()

const dbNull = "DbNull" // this string could come from anywhere!

await prisma.log.findMany({
data: {
meta: dbNull,
},
})


<details>
<summary>Expand to view the underlying Prisma schema</summary>

prisma

model Log {
id Int id
meta Json
}


</details>

Prisma 4 resolves this using constants guaranteed to be unique to prevent this kind of inconsistent queries.

You can now read, write, and filter JSON fields as follows:

ts
import { PrismaClient, Prisma } from 'prisma/client'
const prisma = new PrismaClient()


await prisma.log.create({
data: {
meta: Prisma.DbNull,
},
})


We recommend you double-check queries that use `Json` after upgrading to Prisma 4. Ensure that you use the `Prisma.DbNull`, `Prisma.JsonNull`, and `Prisma.AnyNull` constants from Prisma Client, not string literals.

Refer to the [Prisma 4 upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#dbnull-jsonnull-and-anynull-are-now-objects) in case you run into any type errors.

Prisma Studio updates

We've refined the experience when working with Prisma Studio with the following changes:
- Including a confirmation dialog before deleting records
- Adding a shortcut copy action on a cell – <kbd>CMD</kbd> + <kbd>C</kbd> on MacOS or <kbd>Ctrl</kbd> + <kbd>C</kbd> on Windows/ Linux

Dropped support for Node 12

The minimum version of Node.js Prisma will support is `14.17.x`. If you're using an earlier version of Node.js, you will need to update your Node.js version.

Refer to our [system requirements](https://www.prisma.io/docs/reference/system-requirements) for the minimum versions Prisma requires

New default sizes for statement cache

We had inconsistent and large default values (500 for PostgreSQL and 1000 for MySQL) for the `statement_cache_size`. The new shared default value is 100.

If the new default doesn't work for you, please [create an issue](https://github.com/prisma/prisma/issues/new) and use the `statement_cache_size=x` parameter in your connection string to override the default value.

Renaming of `prisma/sdk` npm package to `prisma/internals`

The internal package `prisma/sdk` is now available under the new, more explicit name `prisma/internals`.

We do not provide any API guarantees for `prisma/internals` as it might need to introduce breaking changes from time to time, and it does not follow semantic versioning.

This is technically not a breaking change as usage of the `prisma/sdk` package is neither documented nor supported.

If you're using `prisma/sdk` (now `prisma/internals`), it would be helpful if you could help us understand where, how, and why you are using it by giving us feedback in this [GitHub discussion](https://github.com/prisma/prisma/discussions/13877). Your feedback will be valuable to us in defining a better API.

Removal of the internal `schema` property from the generated Prisma Client

We've removed the internal `Prisma.dmmf.schema` to reduce the size of Prisma Client generated and improve boot times.

To access the `schema` property, you can use the `getDmmf()` method from `prisma/internals`.


Fixes and improvements

<details>
<summary> Prisma </summary>

- [PSL: define the grammar of string literals](https://github.com/prisma/prisma/issues/4167)
- [MySQL: Update default `statement_cache_size`](https://github.com/prisma/prisma/issues/7727)
- [You cannot define an index on fields with Native type Text of MySQL.](https://github.com/prisma/prisma/issues/8661)
- [Removal of undocumented support for `type` alias with Prisma 4.0.0](https://github.com/prisma/prisma/issues/9939)
- [`unique` is added during Re-Introspection](https://github.com/prisma/prisma/issues/11026)
- [[PSL] Do not allow `references` arg on Many2Many relations on SQL](https://github.com/prisma/prisma/issues/11241)
- [prisma migrate dev will not allow for db level default on scalar list](https://github.com/prisma/prisma/issues/11379)
- [Postgres Single Quote Escaping Breaking Migrations](https://github.com/prisma/prisma/issues/12095)
- [[Epic] `extendedIndexes` GA](https://github.com/prisma/prisma/issues/12376)
- [Remove preview feature `extendedIndexes`](https://github.com/prisma/prisma/issues/12777)
- [Epic: Scalar List Defaults](https://github.com/prisma/prisma/issues/13318)
- [Implement scalar lists defaults proposal in PSL](https://github.com/prisma/prisma/issues/13319)
- [Implement scalar list defaults proposal in introspection](https://github.com/prisma/prisma/issues/13320)
- [Implement scalar list defaults proposal in migrations](https://github.com/prisma/prisma/issues/13322)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/interpreter/query_interpreters/nested_read.rs:232:50](https://github.com/prisma/prisma/issues/13340)
- [Invalid `db pull` / `db push` flow](https://github.com/prisma/prisma/issues/13381)
- [Improve CLI output when using `db push` with MongoDB](https://github.com/prisma/prisma/issues/13464)
- [DB Pull Error](https://github.com/prisma/prisma/issues/13563)
- [MongoDB composite index crashes](https://github.com/prisma/prisma/issues/13618)
- [Error: Error in migration engine. Reason: [migration-engine/core/src/commands/diff.rs:127:22] internal error: entered unreachable code: no provider, no shadow database url for migrations target ](https://github.com/prisma/prisma/issues/13633)
- [Regression: Prisma 3.15.0 with macOS / Azure SQL Server errors at database connection](https://github.com/prisma/prisma/issues/13673)
- [Migrate internal duration/performance logging](https://github.com/prisma/prisma/issues/13693)
- [Fix CI support in prisma forks](https://github.com/prisma/prisma/issues/13775)
- [Allow setting the `length` prefix on `Unsupported` fields on MySQL](https://github.com/prisma/prisma/issues/13786)
- [CRDB: Handle unicode escaping in enum and string defaults in migrate/introspection](https://github.com/prisma/prisma/issues/13842)
- [Poor grammar and confusing language in Prisma CLI](https://github.com/prisma/prisma/issues/13925)
- [Datetime defaults: make sure we consume the whole expression](https://github.com/prisma/prisma/issues/13945)
- [prisma/engine-core uses vulnerable `undici 5.1.1` package](https://github.com/prisma/prisma/issues/14000)
- [getConfig/getDmmf: Clarify error messages on Rust panics](https://github.com/prisma/prisma/issues/14006)

</details>

<details>
<summary> Prisma Client </summary>

- [PANIC in libs/prisma-models/src/record.rs:161:30Invalid coercion encountered: ConversionFailure("Float(BigDecimal(\"519.05\"))", "Decimal")](https://github.com/prisma/prisma/issues/7061)
- [Set array default](https://github.com/prisma/prisma/issues/8179)
- [Allow setting scalar list default values](https://github.com/prisma/prisma/issues/8330)
- [test(client): happy blog-env test has no assertion](https://github.com/prisma/prisma/issues/8613)
- [Avoid using magic string values for JsonNull/DbNull](https://github.com/prisma/prisma/issues/9243)
- [`PrismaClientInitializationError` is missing expected error code](https://github.com/prisma/prisma/issues/10229)
- [Make the implicit unique constraints on 1:1 relations explicit](https://github.com/prisma/prisma/issues/10503)
- [PANIC: called `Result::unwrap()` on an `Err` value: FieldNotFound { name: "upsert", model: "CcStructureUnit" } in query-engine/core/src/query_graph_builder/write/write_args_parser.rs:24:62](https://github.com/prisma/prisma/issues/10636)
- [Consider renaming the `prisma/sdk` package to reduce confusion](https://github.com/prisma/prisma/issues/10725)
- [PANIC: JSON target types only accept strings or numbers, found: {"bytes":"05010000000473436170"} in query-engine/connectors/sql-query-connector/src/filter_conversion.rs:542:22](https://github.com/prisma/prisma/issues/10836)
- [Cannot pass Prisma.empty to $executeRaw function](https://github.com/prisma/prisma/issues/11233)
- [Numerics in Postgres bigger than 2<<128 crash Prisma/Quaint](https://github.com/prisma/prisma/issues/11312)
- [Remove `sqlite:` for defining a sqlite url](https://github.com/prisma/prisma/issues/11468)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/interpreter/query_interpreters/nested_read.rs:232:50](https://github.com/prisma/prisma/issues/12155)
- [findMany broken with many relations to same entity](https://github.com/prisma/prisma/issues/12206)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine\core\src\interpreter\query_interpreters\nested_read.rs:232:50](https://github.com/prisma/prisma/issues/12756)
- [Large decimals cause panick](https://github.com/prisma/prisma/issues/12761)
- [Misleading Error for non-unique relation names](https://github.com/prisma/prisma/issues/12986)
- [`thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', /Users/runner/.cargo/git/checkouts/quaint-9f01e008b9a89c14/479e08a/src/connector/postgres/conversion/decimal.rs:81:39`](https://github.com/prisma/prisma/issues/13219)
- [Implement scalar list defaults proposal in query engine and client](https://github.com/prisma/prisma/issues/13321)
- [`default(now())` on the same table sometimes yield different times](https://github.com/prisma/prisma/issues/13795)

</details>

<details>
<summary> Language tools (e.g. VS Code) </summary>


- [Completion for SQL Server Index Clustering](https://github.com/prisma/language-tools/issues/1138)
- [Completions for PostgreSQL GIN/GiST/SP-GiST/BRIN Indices](https://github.com/prisma/language-tools/issues/1139)
- [Implement scalar list defaults proposal in language tools](https://github.com/prisma/language-tools/issues/1159)
</details>

<details>
<summary> Prisma Engines</summary>

- [[improvedQueryRaw] Sqlite returns Decimal for Float columns](https://github.com/prisma/prisma-engines/issues/2991)
</details>

Credits

Huge thanks to shian15810, zifeo, ever0de, givensuman, peter-gy, rushabhhere, flatplate, njmaeff, tnzk, DePasqualeOrg, roboncode, jacobhq for helping!


📺 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"](https://youtu.be/acvjE2EpMbs) livestream.

The stream takes place [on YouTube](https://youtu.be/acvjE2EpMbs) on **Thursday, June 30** at **5 pm Berlin | 8 am San Francisco**.

📺 Learn how to upgrade in our webinar on July 12th

We're going to host a dedicated webinar with Prisma engineers to talk about the upgrade process. If you're unsure whether the breaking changes of this release affect you, be sure to not miss this livestream.

The stream takes place [on YouTube](https://www.youtube.com/watch?v=FSjkBrfaoEY&ab_channel=Prisma) on **Tuesday, July 12** at **5 pm Berlin | 8 am San Francisco**.

3.15.2

Today, we are issuing the `3.15.2` patch release.

Fixes

In order to use the [Prisma Data Proxy](https://www.prisma.io/docs/concepts/data-platform/data-proxy) via Prisma Client, you need to generate it with `prisma generate --data-proxy` as described in our [documentation](https://prisma.io/docs/concepts/data-platform/data-proxy#step-4-generate-the-client). We are introducing `PRISMA_GENERATE_DATAPROXY="true"` as an additional way to do the same thing, but [via an environment variable](https://prisma.io/docs/reference/api-reference/environment-variables-reference#prisma_generate_dataproxy).

This is necessary, for example, to reliably deploy a Prisma Client for Data Proxy on Vercel Serverless Functions, where it can be hard to update the build command to run `prisma generate --data-proxy`. Starting with this version you can just set `PRISMA_GENERATE_DATAPROXY="true"` as an environment variable the Vercel project settings.

If you are unfamiliar with the Data Proxy, read [how to get started](https://www.prisma.io/docs/concepts/data-platform/data-proxy).

3.15.1

Today, we are issuing the `3.15.1` patch release.

Fixes

- [Regression: Prisma 3.15.0 with macOS / Azure SQL Server errors at database connection](https://github.com/prisma/prisma/issues/13673)

3.15.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v3.15.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.15.0) about the release.** 🌟

Major improvements

Improvements to Prisma Client for Data Proxy

In this release, we're shipping a couple of improvements to Prisma Client for Data Proxy.

The [Prisma Data Proxy](https://www.prisma.io/docs/concepts/data-platform/data-proxy) provides connection management and pooling for database connections for efficiently scaling database connections in serverless environments. The Prisma Client for Data Proxy provides support for connecting to the Prisma Data Proxy using HTTP.

We introduced this feature in version [`3.3.0`](https://github.com/prisma/prisma/releases/tag/3.3.0) and constantly shipped features, fixes, and improvements.

One of the changes in this release is improving the Prisma Client for the Data Proxy generation step.

diff
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

generator client {
provider = "prisma-client-js"
- previewFeatures = ["dataProxy"]
}


You can generate Prisma Client for the Data Proxy it by using the `--data-proxy` flag:

bash
npx prisma generate --data-proxy


We also updated how you can run Prisma Client using the Data Proxy in [Cloudflare Workers and Edge](https://www.prisma.io/docs/guides/deployment/deployment-guides/deploying-to-cloudflare-workers) environments. You can now use `prisma/client/edge` instead of `prisma/client` in your application.

ts
import { PrismaClient } from 'prisma/client/edge'


To learn more, check out our [documentation](https://www.prisma.io/docs/concepts/data-platform/data-proxy).

Prisma Client Metrics is now in Preview

Metrics is a new Preview feature that allows you to monitor how Prisma Client interacts with your database. Metrics expose a set of counters, gauges, and histograms that can be labeled and piped into an external monitoring system like [Prometheus](https://prometheus.io/) or [StatsD](https://github.com/statsd/statsd).

You can use metrics in your project to help diagnose how your application's number of idle and active connections changes with counters, gauges, and histograms.

To get started using metrics in your project, enable the Preview feature flag in your Prisma schema:

prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["metrics"]
}


You can then get started using metrics in your project:

ts
import { PrismaClient } from 'prisma/client'

const prisma = new PrismaClient()

const metrics = await prisma.$metrics.json()
console.log(metrics)


To learn more, check out the metrics [documentation](https://www.prisma.io/docs/guides/performance-and-optimization/metrics). Give it a try and [let us know what you think](https://github.com/prisma/prisma/issues/13579).

Regression

Azure SQL on MacOS

This release includes a known regression when connecting to Azure SQL from MacOS only and will be resolved soon. Follow [this issue for updates and resolution](https://github.com/prisma/prisma/issues/13673).

Fixes and improvements

`migrate reset` returns with a non-0 exit code if the seed script returns with a non-0 exit code

This will help user scripts know more about the success of the command, but might break existing scripts.

Prisma

- [Schema validation does not accept absolute Windows style paths for SQLite database](https://github.com/prisma/prisma/issues/6472)
- [`introspect --url` throws error if existing schema file only contains `generator`](https://github.com/prisma/prisma/issues/8317)
- [`prisma migrate reset` always exits with `0`, needs to exit with `1` on errors](https://github.com/prisma/prisma/issues/9786)
- [Error: Error in migration engine. Reason: [migration-engine/connectors/sql-migration-connector/src/sql_schema_differ/differ_database.rs:111:9] no entry found for key ](https://github.com/prisma/prisma/issues/10557)
- [Error: Error in migration engine. Reason: [migration-engine/connectors/sql-migration-connector/src/sql_schema_differ/differ_database.rs:111:9] no entry found for key ](https://github.com/prisma/prisma/issues/10558)
- [Error: Error in migration engine. Reason: [migration-engine/connectors/sql-migration-connector/src/sql_schema_differ/differ_database.rs:111:9] no entry found for key ](https://github.com/prisma/prisma/issues/11011)
- [`Would you like to create a Github issue? » Yes` does nothing in terminal on Windows](https://github.com/prisma/prisma/issues/11373)
- [Error: [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/str/mod.rs:580:13] byte index 59 is not a char boundary; it is inside '....' (bytes 57..60) of `患者ID` ](https://github.com/prisma/prisma/issues/11456)
- [Schema Parsing/Validation error should include CLI version](https://github.com/prisma/prisma/issues/11908)
- [Prisma panic on invalid int](https://github.com/prisma/prisma/issues/12526)
- [Error: [/rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/str/mod.rs:584:13] byte index 47 is not a char boundary; it is inside '点' (bytes 46..49) of `AirbyteRawYuriPagesAirbyteDataProperties推荐点RichText` ](https://github.com/prisma/prisma/issues/12727)
- [Introspection: Make SQL in tests more advanced so that Introspection results will include native types, not just scalar types](https://github.com/prisma/prisma/issues/13180)
- [Add more integration tests for CockroachDB for `db` and `migrate` commands](https://github.com/prisma/prisma/issues/13268)
- [MongoDB - prisma db pull](https://github.com/prisma/prisma/issues/13294)
- [Multi-byte character truncation bug in mongo introspection connector](https://github.com/prisma/prisma/issues/13351)
- [MSSQL Docker Run Migration "The Trust Settings Record was corrupted"](https://github.com/prisma/prisma/issues/13371)
- [Running DB Pull on Remote MSSQL database](https://github.com/prisma/prisma/issues/13372)
- [Error: Error in migration engine. Reason: [libs/sql-schema-describer/src/postgres.rs:1039:28] no entry found for key ](https://github.com/prisma/prisma/issues/13520)
- [Error: [libs\sql-schema-describer\src\postgres.rs:1039:28] no entry found for key ](https://github.com/prisma/prisma/issues/13521)
- [prisma migrate deploy error](https://github.com/prisma/prisma/issues/13603)


Prisma Client

- [Support Bytes on SQLite](https://github.com/prisma/prisma/issues/6666)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/9896)
- [Huge Int value in `upsert` causes: "PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87"](https://github.com/prisma/prisma/issues/10049)
- [Data Proxy Client should't need to be re-generated after modifying `.env` files](https://github.com/prisma/prisma/issues/10187)
- [Data Proxy Client stopped working in Vercel Edge Functions / Next 12.0.4](https://github.com/prisma/prisma/issues/10305)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine\core\src\query_document\parser.rs:250:87](https://github.com/prisma/prisma/issues/10586)
- [Data Proxy: `prisma generate` errors with `Error: Error: ENOENT: no such file or directory, open '/[...]/prisma/schema.prisma'` when using a custom name for the Prisma schema file](https://github.com/prisma/prisma/issues/10936)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/11263)
- [DATABASE_URL is baked in Dataproxy client proxy.js ](https://github.com/prisma/prisma/issues/11458)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/11467)
- [Can't save string to Decimals list](https://github.com/prisma/prisma/issues/11674)
- [Sveltekit + Cloudflare adapter - "PrismaClient is unable to be run in the browser."](https://github.com/prisma/prisma/issues/11712)
- [`TypeError: at normalizeAndValidateHeaderValue` with data proxy in cloudflare workers/miniflare](https://github.com/prisma/prisma/issues/12356)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/12491)
- [Implement "CLI engine crash reporting" for Formatter Engine and `getConfig` and `getDmmf` of Query Engine](https://github.com/prisma/prisma/issues/12495)
- [Add test for internal engine port](https://github.com/prisma/prisma/issues/12507)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/12654)
- [DataProxy Client only works if I instantiate a normal Client first](https://github.com/prisma/prisma/issues/12682)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/12737)
- [Engine hard crashes on id values exceeding the Number.MAX_SAFE_INTEGER](https://github.com/prisma/prisma/issues/12841)
- [dbgenerated function cause Null constraint error in MySQL](https://github.com/prisma/prisma/issues/12850)
- [Expose Metrics in Prisma Client](https://github.com/prisma/prisma/issues/12875)
- [Improve the DX for enabling the data proxy](https://github.com/prisma/prisma/issues/12904)
- [Client crash on out-of-range integer update using Postgres](https://github.com/prisma/prisma/issues/12969)
- [Prisma Client has stopped working on Vercel Edge Functions](https://github.com/prisma/prisma/issues/13059)
- [PANIC: called `Option::unwrap()` on a `None` value in query-engine/core/src/query_document/parser.rs:250:87](https://github.com/prisma/prisma/issues/13293)
- [`InvalidDatasourceError` of Data Proxy Client outputs a code snippet](https://github.com/prisma/prisma/issues/13337)
- [A few small typos in the repo (unkown)](https://github.com/prisma/prisma/issues/13394)
- [Cloudflare Workers with PlanetScale db](https://github.com/prisma/prisma/issues/13474)

Credits

Huge thanks to shian15810, zifeo, ever0de, rushabhhere for helping!

Prisma Day

[Prisma Day](https://prisma.io/day) is back this year, and it'll be on June 15 - 16 at the James June 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 looking for a [Technical Support Engineer](https://grnh.se/ff0d8a702us) and [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us).

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"](https://youtu.be/B3Mh3yGRZ5U) livestream.

The stream takes place [on YouTube](https://youtu.be/B3Mh3yGRZ5U) on **Thursday, June 9** at **5 pm Berlin | 8 am San Francisco**.

3.14.0

🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20prisma%20release%20v3.14.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.14.0) 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](https://www.cockroachlabs.com/) 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 run `npx prisma db pull` and review the changes to your schema. To learn more about CockroachDB-specific native types we support, refer to [our docs](http://prisma.io/docs/concepts/database-connectors/cockroachdb#type-mapping-limitations-in-cockroachdb).

To learn more about the connector and how it differs from PostgreSQL, head to our [documentation](https://www.prisma.io/docs/concepts/database-connectors/cockroachdb).

PostgreSQL `GIN`, `GiST`, `SP-GiST`, and `BRIN` indexes support (Preview)
We introduced the `extendedIndexes` Preview feature in version `3.5.0`, and we have been adding new configuration options for indexes. We've expanded index type support with the `GIN`, `GiST`, `SP-GiST`, and `BRIN` indexes in this release.

To make use of an index type, you can update your Prisma schema by providing the `type` argument to the `index` attribute:

prisma
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`:

sql
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](https://prisma.io/docs/concepts/components/prisma-schema/indexes#configuring-the-access-type-of-indexes-with-type-postgresql).

Improved `queryRaw` API
In this release, we made improvements to the SQL raw API. Some improvements are breaking and will be available behind the new `improvedQueryRaw` Preview feature flag.

The `improvedQueryRaw` Preview 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:
prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}

generator client {
provider = "prisma-client-js"
previewFeatures = ["improvedQueryRaw"]
}


Here's a list of the improvements `improvedQueryRaw` comes with:

1. Raw scalar values are deserialized as their correct JavaScript types

Prisma Client queries such as `findMany` deserialize database scalar values to their corresponding JavaScript types. For example, a `DateTime` value is deserialized as a JavaScript `Date,` and a `Bytes` would be deserialized as a JavaScript `Buffer`.

Raw queries now implement the same behavior when the `improvedQueryRaw` Preview 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:

ts
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 `improvedQueryRaw` Preview feature flag.

Here's an example of a query that used to fail:

ts
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:

ts
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 `improvedQueryRaw` feature flag:

ts
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 `LENGTH` PostgreSQL function only accept `text` as input. Prisma used to coerce `42` to `text` silently, but won’t anymore. As suggested by the hint, cast `42` to `text` as follows:

ts
await prisma.$queryRaw`SELECT LENGTH(${42}::text);`


3. Query parameters are correctly sent to the database

> This improvement is available without the `improvedQueryRaw` Preview feature flag.

Before this release, query parameters of type `BigInt`, `Bytes`, and `Decimal` were incorrectly sent to the database leading to instances of unexpected inserts. Passing the types as query parameters now works:

ts
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](https://github.com/prisma/prisma/issues/4569)
- [Postgres parameterized interval is passed incorrectly in raw query](https://github.com/prisma/prisma/issues/4647)
- [queryRaw cannot handle some numbers](https://github.com/prisma/prisma/issues/6818)
- [Query raw run throws the following error incorrect binary data format in bind parameter 3](https://github.com/prisma/prisma/issues/7194)
- [BigInt becomes Number if queried with `$queryRaw`](https://github.com/prisma/prisma/issues/7395)
- [Weird behavior of raw query containing st_dwithin and radius parameter binding](https://github.com/prisma/prisma/issues/7799)
- [`generate` output with `output` has weird package path on Windows](https://github.com/prisma/prisma/issues/7809)
- [Casting error when using integers in raw query](https://github.com/prisma/prisma/issues/7839)
- [$queryRaw fails when passing bigint as parameter](https://github.com/prisma/prisma/issues/8121)
- [Decimal becomes Number if queried with $queryRaw](https://github.com/prisma/prisma/issues/9163)
- [$queryRaw doesn't allow for typecasts](https://github.com/prisma/prisma/issues/9197)
- [Raw sql Is not working as expected ](https://github.com/prisma/prisma/issues/9333)
- [Missing `$` from `executeRaw` in error message "Invalid \`prisma.executeRaw()\` invocation:"](https://github.com/prisma/prisma/issues/9388)
- [Parameterized ExecuteRaw breaks with Postgres Floats](https://github.com/prisma/prisma/issues/9949)
- [PANIC: called `Result::unwrap()` on an `Err` value: Any { .. } in query-engine/connectors/sql-query-connector/src/error.rs:58:51](https://github.com/prisma/prisma/issues/10224)
- [$queryRaw to Postgres failing to correctly insert/cast numeric parameters](https://github.com/prisma/prisma/issues/10424)
- [Compound primary key is not generated when a unique field has the same name](https://github.com/prisma/prisma/issues/10456)
- [`referentialIntegrity = prisma`: Broken query on `onUpdate: Cascade` | `symbol ... not found` | `The column ... does not exist in the current database.`](https://github.com/prisma/prisma/issues/10758)
- [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](https://github.com/prisma/prisma/issues/11339)
- [Planetscale not able to upsert with Prisma](https://github.com/prisma/prisma/issues/11469)
- [connectOrCreate deletes old relation and creates a new one](https://github.com/prisma/prisma/issues/11731)
- [referentialIntegrity=prisma causes P2022 (column not exist) on updating a record](https://github.com/prisma/prisma/issues/11792)
- [Unable to insert Buffer into Bytes pg field using $executeRaw](https://github.com/prisma/prisma/issues/11834)
- [CockroachDB: Figure out, test and document which versions we support](https://github.com/prisma/prisma/issues/12383)
- [Implement `debugPanic` like functionality for `getConfig` and `getDmmf` of Query Engine](https://github.com/prisma/prisma/issues/12494)
- [$queryRaw returning numbers for bigint fields](https://github.com/prisma/prisma/issues/12551)
- [Prisma returns sequence values with number type from Postgres while using queryRaw](https://github.com/prisma/prisma/issues/12583)
- [PANIC: called `Result::unwrap()` on an `Err` value: Any { .. } in query-engine/connectors/sql-query-connector/src/error.rs:58:51](https://github.com/prisma/prisma/issues/12641)
- [RQ: Properly coerce query raw input parameters in the Query Engine](https://github.com/prisma/prisma/issues/12795)
- [RQ: Properly coerce query raw result in the Client](https://github.com/prisma/prisma/issues/12796)
- [RQ: Send type-hinted query parameters for raw queries (Postgres)](https://github.com/prisma/prisma/issues/12797)
- [RQ: Integrate new QE result for query raw in the client](https://github.com/prisma/prisma/issues/12800)
- [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](https://github.com/prisma/prisma/issues/12929)
- [Exception when using Decimal.js instance in an input](https://github.com/prisma/prisma/issues/13213)

Prisma

- [Error: Error in migration engine. Reason: [migration-engine\cli\src/main.rs:68:41] called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: "stream did not contain valid UTF-8" } ](https://github.com/prisma/prisma/issues/5614)
- [Allow creating GIN index on JSONB fields in Postgres adapter](https://github.com/prisma/prisma/issues/7410)
- [`prisma format` panics when you use a colon to declare field type (`field: Type` syntax)](https://github.com/prisma/prisma/issues/9302)
- [Better error message if using `TEXT` or `BLOB` in MySQL id/index/unique](https://github.com/prisma/prisma/issues/10292)
- [Schema validation error mentions `Error parsing attribute "id"` but it's actually about `id`](https://github.com/prisma/prisma/issues/10566)
- [Support GiST Index type with Postgres](https://github.com/prisma/prisma/issues/10634)
- [MySQL 8 function as default not created in first migration](https://github.com/prisma/prisma/issues/10715)
- [Error: [introspection-engine/connectors/sql-introspection-connector/src/commenting_out_guardrails.rs:32:59] called `Option::unwrap()` on a `None` value ](https://github.com/prisma/prisma/issues/11008)
- [Nicer error message when you try to migrate a CockroachDB database with a `provider=posgresql` schema](https://github.com/prisma/prisma/issues/11350)
- [Using `--url` for `db pull` ignored/overwrites `provider=cockroachdb`](https://github.com/prisma/prisma/issues/11527)
- [CockroachDB: support more autoincrementing integer primary key representations](https://github.com/prisma/prisma/issues/12239)
- [Prisma migrate always DROP DEFAULT on CockroachDB](https://github.com/prisma/prisma/issues/12244)
- [Allow using a custom root certificate with SQL Server](https://github.com/prisma/prisma/issues/12672)
- [Write basic tests for cockroachdb in prisma/prisma](https://github.com/prisma/prisma/issues/12926)
- [CockroachDB: re-add Oid native type](https://github.com/prisma/prisma/issues/13003)
- [Support Generalized Inverted Indices on CockroachDB](https://github.com/prisma/prisma/issues/13065)
- [Missing validation on decimal defaults](https://github.com/prisma/prisma/issues/13074)
- [Log error details in console when we fail to submit an error report](https://github.com/prisma/prisma/issues/13256)


Prisma Migrate

- [CockroachDB session settings for migrations](https://github.com/prisma/prisma/issues/12113)

Language tools (e.g. VS Code)

- [Autocompletion support for composite type indexes](https://github.com/prisma/language-tools/issues/1102)
- [Add tests for new CockroachDB native types](https://github.com/prisma/language-tools/issues/1134)
- [Completion for new CockroachDB sequences](https://github.com/prisma/language-tools/issues/1144)

Credits

Huge thanks to ever0de, flatplate, njmaeff, tnzk, DePasqualeOrg for helping!

Prisma Day

[Prisma Day](https://prisma.io/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](https://grnh.se/ff0d8a702us), [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us), and a [Developer Advocate(Frontend/ Fullstack)](https://grnh.se/894b275b2us). You can find more jobs we're hiring for on our [jobs page](https://www.prisma.io/jobs).

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"](https://youtu.be/XoS8D8q8icE) livestream.

The stream takes place [on YouTube](https://youtu.be/XoS8D8q8icE) on **Thursday, May 12** at **5 pm Berlin | 8 am San Francisco**.

3.13.0

Major changes

* chore(prisma): upgrade prisma to 3.13.0 (737) steebchen

Changes

* chore(deps): bump actions/setup-go from 2 to 3 (733) dependabot

Contributors

dependabot, dependabot[bot] and steebchen

Page 12 of 44

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.