Prisma

Latest version: v0.15.0

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

Scan your dependencies

Page 21 of 44

2.13.0

Today, we are excited to share the `2.13.0` stable release 🎉

🌟 **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%202.13.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.13.0) about the release.**

Major improvements

Prisma Migrate is now in Preview

We are releasing Prisma Migrate in Preview; read the [announcement blog post](https://www.prisma.io/blog/prisma-migrate-preview-b5eno5g08d0b) to learn more. This version is the evolution of the Experimental Prisma Migrate we released last year. We've changed Migrate to be more **predictable** and providing fine-grained **control** over how exactly database schema changes are carried out. You can learn more about the [Preview](https://www.prisma.io/docs/about/releases#preview) stage in the Prisma docs.

Please try out Prisma Migrate and share your feedback for it [here](https://github.com/prisma/prisma/issues/4531).

Auto-generated migrations files in plain SQL

Prisma Migrate still picks up the changes in your Prisma schema file to generate migration files. The main difference compared to the previous Migrate version is that these migration files are now plain SQL and fully customizable; this allows for:

- More control over how exactly schema changes are performed (e.g., renaming an existing column)
- Performing data migrations
- Using certain database features that can't be represented in the Prisma schema (e.g., creating stored procedures or triggers)
- Orchestration of complex changes (e.g., an expand and contract pattern)

Integrated workflows for development and production

This evolved version of Prisma Migrate is now deterministic making sure migrations are always executed in a predictable way. The tool supports both workflows for deploying migrations to production and other environments. It also comes with an interactive development command that not only helps to create and apply migrations, but also helps developers to get back on track when they run into certain issues.

Breaking changes when upgrading from the Experimental version

The new Preview version is not backward compatible with the previous Experimental version. You can learn more about the upgrade process in the [docs](https://www.prisma.io/docs/guides/prisma-guides/prisma-migrate-guides/add-prisma-migrate-to-a-project).

Import types and enums in the browser

Until now, you could not import any typings that are generated by Prisma Client in a browser application. This changed in this release! With 2.13.0, you can now import all your enums and all types from Prisma Client in any browser environment. This also works across all the universal Javascript frameworks like Next.js, Blitz, Gatsby, and Vue.js.

Let's take a look at an example of a React component utilizing the new exports. Assume you have the following Prisma schema:

prisma
model User {
id String id
hobbies Hobby[]
}

enum Hobby {
Tennis
Prisma
Basketball
}


Once you've generated the `prisma/client` node module, you can import the generated types in your frontend application as follows:

tsx
import { Hobby, User } from 'prisma/client'

type Props = {
user: User
}

export function HobbyComponent({ user }: Props) {
return (
<div>
Hello {user.name}! <br />
The available hobbies are: <br />
<ul>
{Object.values(Hobby).map(hobby => <li key={hobby}>{hobby}</li>)}
</ul>
</div>
)
}


Lots of improvements for Prisma Studio

New keyboard shortcuts in the standalone app

Navigating tabs

You can now use your keyboard to navigate between tabs in the Prisma Studio standalone app:

- <kbd>CMD</kbd>+<kbd>SHIFT</kbd>+<kbd>[</kbd> OR <kbd>CMD</kbd>+<kbd>OPTION</kbd>+<kbd>←</kbd>: Navigate to left tab
- <kbd>CMD</kbd>+<kbd>SHIFT</kbd>+<kbd>]</kbd> OR <kbd>CMD</kbd>+<kbd>OPTION</kbd>+<kbd>→</kbd>: Navigate to right tab

<details><summary>Expand to view Studio's keyboard shortcut cheatsheet</summary>

![](https://imgur.com/d99QNfL.png)

</details>

Zooming in and out

You can now use your keyboard to zoom in and out in the Prisma Studio standalone app:

- <kbd>CMD</kbd>+<kbd>+</kbd> OR <kbd>CMD</kbd>+<kbd>SHIFT</kbd>+<kbd>+</kbd> to zoom in
- <kbd>CMD</kbd>+<kbd>-</kbd> OR <kbd>CMD</kbd>+<kbd>SHIFT</kbd>+<kbd>-</kbd> to zoom out

Improved UX for inline editing of arrays

Inline editing of arrays (scalar lists) has sometimes been cumbersome with the Prisma Studio UI. With this release, we include a smoother UX for this.

<details><summary>Expand to view a demo of the new UX</summary>

![](https://imgur.com/haG0QNj.gif)

</details>

Note that you can try out Studio with some sample datasets [here](https://prisma-studio.now.sh/preview?project=capabilities).

Prisma Client Go now supports JSON

We've had JSON support in Prisma Client JS for quite a while, but we're pleased to announce that the Go version of Prisma Client now has JSON support as well. Head over to the [documentation](https://github.com/prisma/prisma-client-go/blob/master/docs/reference/12-json.md) to learn more!

🌎 Join us for the second Prisma Online Meetup

Join us online for the second [Prisma Meetup](https://www.meetup.com/Berlin-Prisma-Meetup/events/274941491/) and learn more about the Preview version of Prisma Migrate from Alberto Perdomo and Tom Houlé who have been deeply involved building it.

- When? *December 09, 2020 6pm CET*
- Where? **[Youtube](https://www.youtube.com/watch?v=nxfe34pWQ3E)**

Fixes and improvements
[`prisma`](https://github.com/prisma/prisma)

- [Expand --version command](https://github.com/prisma/prisma/issues/1196)
- [Generating client to custom location with Next.js is broken](https://github.com/prisma/prisma/issues/2195)
- [Expose types to the frontend for Next.js](https://github.com/prisma/prisma/issues/3252)
- [Adjust `prisma init` to write to .env instead of prisma/.env](https://github.com/prisma/prisma/issues/3721)
- [Native Types Postgres: Introspecting timestamp[] and time[] break client generation](https://github.com/prisma/prisma/issues/4051)
- [Understand Prisma $connect behavior](https://github.com/prisma/prisma/issues/4068)
- [`deleteMany` should be valid without parameters](https://github.com/prisma/prisma/issues/4302)
- [sqlserver Introspection Fails With "No such table: information_schema.columns" Based on Case Sensitive Database Collation](https://github.com/prisma/prisma/issues/4333)
- [Allow `deleteMany` without args in TypeScript](https://github.com/prisma/prisma/issues/4345)
- [Make Prisma Client (usage + generation) ASAR compatible](https://github.com/prisma/prisma/issues/4356)
- [Add `Symbol.toStringTag` to Prisma Client](https://github.com/prisma/prisma/issues/4357)
- [Breaking change: Error classes are exported as types](https://github.com/prisma/prisma/issues/4365)
- [Deprecated types are not seen as such](https://github.com/prisma/prisma/issues/4366)
- [Adjust wording of comment when `dbgenerated()` is added via introspection](https://github.com/prisma/prisma/issues/4369)
- [Hint for codemod should highlight command in backticks and/or colored](https://github.com/prisma/prisma/issues/4373)
- [XOR introduces regression in type safety](https://github.com/prisma/prisma/issues/4390)


[`migrate`](https://github.com/prisma/migrate)

- [Detect failure from insufficient privileges in introspection (and migrate?)](https://github.com/prisma/migrate/issues/649)


[`language-tools`](https://github.com/prisma/language-tools)

- [ Connection to server got closed. Server will restart](https://github.com/prisma/language-tools/issues/403)
- [VC Code extension stopped working](https://github.com/prisma/language-tools/issues/615)
- [Rename doesn't rename multiple models of the same relation](https://github.com/prisma/language-tools/issues/636)
- [Syntax highlighting broken for Json and Float field](https://github.com/prisma/language-tools/issues/638)


[`studio`](https://github.com/prisma/studio)

- [Editing of enum & boolean lists is sub-par](https://github.com/prisma/studio/issues/505)
- [Opened a non-existing project from the history and can't restart Studio](https://github.com/prisma/studio/issues/590)
- [Zoom in/out with keyboard shortcuts](https://github.com/prisma/studio/issues/591)


[`prisma-engines`](https://github.com/prisma/prisma-engines)

- [Supporting SQL Server in Migration Engine](https://github.com/prisma/prisma-engines/issues/813)
- [Return a user-facing error for database URL parsing errors.](https://github.com/prisma/prisma-engines/issues/1241)
- [CI: Find a reliable way to shut down docker after the tests have finished](https://github.com/prisma/prisma-engines/issues/1385)


Credits

Huge thanks to qsona for helping!

2.12.1

Today, we are issuing the `2.12.1` patch release.
Fixes

Client
- [Breaking change: Error classes are exported as types 4365](https://github.com/prisma/prisma/issues/4365)
- [Deprecated types are not seen as such 4366](https://github.com/prisma/prisma/issues/4366)

2.12.0

Today, we are excited to share the `2.12.0` stable release 🎉

🌟 **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%202.12.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.12.0) about the release.**

Major improvements

Standalone Prisma Studio app for macOS

We have repackaged Prisma Studio to work also as a standalone macOS application. This should help you run Studio with just a double click and without opening your terminal, just in case you quickly want to browse or edit your data.

Download the installation files from the [Studio release page](https://github.com/prisma/studio/releases). Support for more platforms (Windows and Linux) will come soon. Let us know if which one you would want first!

Prisma codemods help upgrading your codebase

With today's release, we took the opportunity to cleanup some rough edges in the Prisma Client API which partially results in _breaking changes_. To help you with upgrading your codebase to `2.12.0`, we're introducing [`prisma/codemods`](https://github.com/prisma/codemods).

The `prisma/codemods` package provides a powerful CLI that scans your codebase and automatically updates the code to the new API calls from the provided version.

The upgrade workflow looks like this:

bash
cd my-app
npm install prisma/cli prisma/client
npx prisma/codemods update-2.12 ./


Microsoft SQL Server now supports native database types (Preview)

Hot off the presses: You can now use database native types with Microsoft SQL Server! You'll need to specify both `previewFeatures = ["microsoftSqlServer", "nativeTypes"]` to get started:

prisma
generator js {
provider = "prisma-client-js"
previewFeatures = ["microsoftSqlServer", "nativeTypes"]
}

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

model User {
id BigInt id default(autoincrement()) ms.BigInt
name String? ms.VarChar(255)
}

model Post {
id BigInt id default(autoincrement()) ms.BigInt
title String ms.VarChar(100)
views BigInt default(0) ms.BigInt
wordCount Int default(0) ms.SmallInt
}


Note that Prisma Migrate does not yet work with Microsoft SQL Server, nor does Prisma Client Go.

Upcoming Prisma Migrate Preview Release

We’ve got a Preview release of Prisma Migrate nearing up with a large set of changes. You can test it in Early Access, see the upcoming changes, and provide feedback! Get started with the Early Access version [here](http://pris.ly/migrate-early-access).

To join the conversation, join the [`product-feedback`](https://app.slack.com/client/T0MQBS8JG/C01739JGFCM) channel on our [Slack](https://slack.prisma.io).

Breaking changes

As mentioned before, we're cleaning up the Prisma Client API which partially results in breaking changes. You can upgrade to the latest version using the new `prisma/codemods` package as explained above.

Remove non-`$` methods

A few months back, we began prefixing our top-level Prisma methods with `$`. For example, `prisma.transaction` became `prisma.$transaction`. We did this to avoid clashes with your application's model names.

The non-`$` methods were deprecated but continued to work until this release. In this release, we removed the deprecated methods.

This means **if you are still using calls like `prisma.transaction` or `prisma.disconnect` instead of `prisma.$transaction` or `prisma.$disconnect` in your code, your app is going to break after upgrading to `2.12.0`**.

The `prisma/codemods` workflow describe above will automatically fix any remaining non-$ methods in your codebase.

You can read more about this change in on [Github](https://github.com/prisma/prisma/issues/4206).

1-1-relations must now have an optional side

In this version, we're adding a new requirement for [1-1-relations](https://www.prisma.io/docs/concepts/components/prisma-schema/relations#one-to-one-relations) that you define in your Prisma schema. In previous versions, it used to be allowed to have both sides of the relation _required_. As of this release, the _virtual_ side of the relation (i.e. the side that does _not_ store the foreign key in the underlying database) must be optional.

**Before**

prisma
model User {
id Int id default(autoincrement())
name String?
profile Profile // ❌ this is not allowed as of 2.12.0
}

model Profile {
id Int id default(autoincrement())
user User relation(fields: [userId], references: [id])
userId Int
}


**After**

prisma
model User {
id Int id default(autoincrement())
profile Profile? // ✅ the virtual side of the relation needs to be optional
}

model Profile {
id Int id default(autoincrement())
user User relation(fields: [userId], references: [id])
userId Int
}


The easiest way to adjust your schema to these new requirements is by running the `introspect` command which will automatically make the virtual relation fields optional on 1-1-relations:


npx prisma introspect


Fix how data for `Json[]` fields is stored

We fixed how the `Json[]` type is stored in `2.12.0`. Previously, we were storing JSON arrays as a string inside a your database's `JSON` column. Now, we properly encode JSON arrays as `JSON` in the database. This fix will allow us to add database native JSON operations down the line.

If you are using the `Json[]` type in your schema, you'll need to migrate your data. We anticipate this breaking change will only affect a handful of folks. Please reach out to us in [this issue](https://github.com/prisma/prisma/issues/4346) and we'll help you with the migration.

Here is an overview of how the behaviour changes in `2.12.0`:

| Given | `2.11.0` | `2.12.0` |
| :-------------------------------------- | :-------------------------------------------------- | :------------------------------------- |
| `[]` | `[[]]` | `[]` |
| `[{test:"test"}]` | `["{\"test\":\"test\"}"]` | `[{"test":"test"}]` |
| `[{ test: "test" }, { test: "test2" }]` | `["[{\"test\": \"test\"}, {\"test\": \"test2\"}]"]` | `[{"test": "test"},{"test": "test2"}]` |
| `[3]` | `3` | `[3]` |

Deprecations

Rename `findOne` to `findUnique`

This release renames `findOne` to `findUnique` and deprecates `findOne`.

We made this change to reduce confusion. Many people expected `findOne` to be more loose, e.g: "Find the first record that matches my conditions.".

The `prisma/codemods` workflow describe above will automatically rename `findOne` to `findUnique` across your codebase.

Move most types under the `Prisma` namespace

We moved most of the generated types under a new `Prisma` namespace and are deprecating the top-level exports. This change also resolves some existing namespace clashes.

**Before**

ts
import { PrismaClient, User, UserCreateInput } from 'prisma/client'

async function createUser(input: UserCreateInput): Promise<User> {
return prisma.user.create(input)
}


**After**

ts
import { PrismaClient, User, Prisma } from 'prisma/client'

async function createUser(input: Prisma.UserCreateInput): Promise<User> {
return prisma.user.create(input)
}


This means that with this release, there are exactly three kinds of exports in `prisma/client`:

1. `PrismaClient` is the constructor your Prisma Client instance
1. Model types, e.g. `User` and `Post`
1. `Prisma` as the new namespace under which you can now access the remaining generarted types

The `prisma/codemods` workflow describe above will automatically fix the type names in your code!

With this change, we've greatly reduced the number of *reserved words* that could clash with your application's names. Go forth and add models with names like `Transaction` or `Aggregate`!

Fixes and improvements

[`prisma`](https://github.com/prisma/prisma)

- [Improve .raw`` template literal API with helpers](https://github.com/prisma/prisma/issues/1749)
- [Remove GraphQL related reserved words](https://github.com/prisma/prisma/issues/3223)
- [Collect `dbgenerated()` values in an issue via "warning" output in Introspection](https://github.com/prisma/prisma/issues/3290)
- [Json arrays are not properly stored in underlying postgres jsonb array type ](https://github.com/prisma/prisma/issues/3603)
- [Replace `findOne` with `findUnique`](https://github.com/prisma/prisma/issues/3697)
- [Schema validator is not validating optionality of relations on both ends](https://github.com/prisma/prisma/issues/3747)
- [Use TypeScript namespaces to separate Prisma & Application types](https://github.com/prisma/prisma/issues/3755)
- [Enable updating foreign keys in updateMany](https://github.com/prisma/prisma/issues/3887)
- [Json[] isn't working anymore](https://github.com/prisma/prisma/issues/3897)
- [Fields are ignored in WHERE clause](https://github.com/prisma/prisma/issues/3985)
- [Native Types Postgres: Creating a record with empty arrays for field types json[], jsonb[] not working](https://github.com/prisma/prisma/issues/4053)
- [Create codemod for namespace change](https://github.com/prisma/prisma/issues/4150)
- [Prisma2 blocks prisma generate on unsupported platforms, even when providing custom binaries](https://github.com/prisma/prisma/issues/4205)
- [Cleanup old non-$ methods](https://github.com/prisma/prisma/issues/4206)
- [Fix version pinning logic](https://github.com/prisma/prisma/issues/4213)
- [Warn, if more than `n` Prisma Client instances are instantiated](https://github.com/prisma/prisma/issues/4222)
- [Add codemod for $ deprecation](https://github.com/prisma/prisma/issues/4300)
- [SQL Server raw queries panic when having multiple result sets](https://github.com/prisma/prisma/issues/4332)

[`prisma-client-js`](https://github.com/prisma/prisma-client-js)

- [Improve debug output of array values](https://github.com/prisma/prisma-client-js/issues/312)
- [[Javascript] Better error message than `TypeError: Cannot read property 'findMany' of undefined` for non existing model?](https://github.com/prisma/prisma-client-js/issues/585)
- [Remove Aggregate as reserved word](https://github.com/prisma/prisma-client-js/issues/811)
- [Test and stabilize Unix Domain Sockets](https://github.com/prisma/prisma-client-js/issues/837)

[`migrate`](https://github.com/prisma/migrate)

- [ERROR: there is no unique constraint matching given keys for referenced table "User"](https://github.com/prisma/migrate/issues/418)
- [Suggest using `name` on index when creation fails because of length](https://github.com/prisma/migrate/issues/472)

[`language-tools`](https://github.com/prisma/language-tools)

- [Display relation fields differently than scalar fields](https://github.com/prisma/language-tools/issues/41)
- [Warn about provider array deprecation in the VSCode plugin](https://github.com/prisma/language-tools/issues/522)
- [Improve logging of language server](https://github.com/prisma/language-tools/issues/627)

[`studio`](https://github.com/prisma/studio)

- [When saving changes to the database, do it one transaction](https://github.com/prisma/studio/issues/578)
- [Studio server does not resolve environment variables correctly](https://github.com/prisma/studio/issues/579)
- [Focus first cell of a newly created record](https://github.com/prisma/studio/issues/580)
- [When you start typing in a number cell directly, it is considered an invalid change](https://github.com/prisma/studio/issues/581)

[`prisma-engines`](https://github.com/prisma/prisma-engines)

- [Send the "server listening" message only after the server has started](https://github.com/prisma/prisma-engines/issues/1173)
- [Supporting native types on SQL Server](https://github.com/prisma/prisma-engines/issues/1183)

Credits

Huge thanks to matt-eric, muxahuk for helping!

2.11.0

Today, we are excited to share the `2.11.0` stable release 🎉

🌟 **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%202.11.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/2.11.0) about the release.**

Major Improvements

Native database types in the Prisma schema (Preview)

We are super excited to share that this release brings you one of the most requested features since we released the initial version of Prisma: The representation of native database types in the Prisma schema.

Up to this release, the Prisma schema only allowed to represent a limited set of types: `String`, `Int`, `Float`, `Boolean`, `DateTime`, `Json`. Each of these types has a _default mapping_ to an underlying database type that's specified for each connector (see the mappings for [PostgreSQL](https://www.prisma.io/docs/reference/database-connectors/postgresql#type-mapping-between-postgresql-to-prisma-schema) and [MySQL](https://www.prisma.io/docs/reference/database-connectors/mysql#type-mapping-between-mysql-to-prisma-schema)).

With this release, you can now add an attribute to a field definition in order to determine which _specific_ database type it should be mapped to. Here is an example for a PostgreSQL database that specifies the underlying database types more specifically. Note that you also need to enable the feature via the the `nativeTypes` feature flag:

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

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

model User {
id Int id default(autoincrement())
name String? db.VarChar(255)
}

model Post {
id Int id default(autoincrement())
title String db.VarChar(100)
createdAt DateTime db.Timestamp(6)
wordCount Int db.SmallInt
}


In the above code snippet, all fields of the two Prisma models are annotated with attributes to diverge from the default mapping and determine the exact type that is used in the underlying database. For example, the `id` fields are represented as `db.BigInt` which maps to the `BIGINT` PostgreSQL type. You can find out more about which Prisma types can be annotated with which native type attributes in the docs for the [PostgreSQL](https://www.prisma.io/docs/reference/database-connectors/postgresql#type-mapping-between-postgresql-to-prisma-schema) and [MySQL](https://www.prisma.io/docs/reference/database-connectors/mysql#type-mapping-between-mysql-to-prisma-schema) connectors.

> **Note**: Native types don't work with Prisma Migrate yet. For the time being, you still need to configure the type manually in your database and pull it into your schema via introspection.

Please [share your feedback](https://github.com/prisma/prisma/issues/4045) on how this feature works for you. We are interested in both positive and negative feedback, so we know if this feature is already ready for production! (If encounter any problems, please open a new issue [here](https://github.com/prisma/prisma/issues/new/choose)).

📚 **Documentation**: [Extended native type support](https://www.prisma.io/docs/concepts/components/preview-features/native-types)

New types in the Prisma schema: `BigInt`, `Bytes` and `Decimal` (Preview)

With this release, we are further introducing three new _scalar types_ in the Prisma schema: `BigInt`, `Bytes` and `Decimal`. Here is an overview for how they map to the different databases that are supported by Prisma and how they're represented when queried with Prisma Client JS:

| Prisma | PostgreSQL | MySQL | SQLite | JavaScript / TypeScript |
| --------- | ---------------- | ---------------- | ------ | ---------------------------------------------------- |
| `Bytes` | `BYTEA` | `LONGBLOB` | n/a | `Buffer` |
| `Decimal` | `DECIMAL(65,30)` | `DECIMAL(65,30)` | n/a | [Decimal.js](https://github.com/MikeMcl/decimal.js/) |
| `BigInt` | `BIGINT` | `BIGINT` | n/a | `BigInt` |

To make use of these new types, you need to enable the `nativeTypes` feature flag in your Prisma schema:

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


Once you added the feature flag, be sure to run `prisma generate` again to update your local version of Prisma Client.

📚 **Documentation**: [Prisma types in the `nativeTypes` preview](https://www.prisma.io/docs/concepts/components/preview-features/native-types/native-types-mappings)

Set foreign keys directly (Preview)

We now support writing foreign keys (also known as [relation scalars](https://www.prisma.io/docs/concepts/components/prisma-schema/relations#annotated-relation-fields-and-relation-scalar-fields)) directly with the `uncheckedScalarInputs` preview feature.

Consider this sample Prisma schema:

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

model User {
id Int id default(autoincrement())
posts Post[]
}

model Post {
id Int id default(autoincrement())
authorId Int
author User relation(fields: [authorId], references: [id])
}


Instead of using `connect` when creating a new `Post` record to wire up a relation with a `User` record, you can now directly set the `authorId` value:

ts
await prisma.post.create({
data: {
// You can now set the foreign key directly...
authorId: 1,
// ... or connect the relationship...
// author: {
// connect: {
// id: 1
// }
// }
// ... but not both at the same time
},
});


We'd love for you to give it a try. You can give us feedback in [this issue](https://github.com/prisma/prisma/issues/4209).

The `$transaction` API is now stable

You can now use [`$transaction`](https://www.prisma.io/docs/concepts/components/prisma-client/transactions#the-transaction-api) API without the `transactionApi` feature flag.

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


The `connectOrCreate` API is now stable

The [`connectOrCreate`](https://www.prisma.io/docs/concepts/components/prisma-client/relation-queries#nested-writes) API offers a convenient way to link or insert nested records.

You can now use it without the `connectOrCreate` feature flag.

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


Middleware model parameter is now typed

This is a small quality-of-life improvement for developers using the Prisma [middleware](https://www.prisma.io/docs/concepts/components/prisma-client/middleware). The `params.model` parameter that's passed into a middleware function is now typed to your model so you can now reliably tie middleware to models:

ts
prisma.$use(async (params, next) => {
switch (params.model) {
case 'user':
// ...
case 'project:
// ...
}
})


If you need the old behavior you can cast `params.model` back to a `string` by wrapping it `String(params.model)`.

📚 **Documentation**: [Middleware](https://www.prisma.io/docs/concepts/components/prisma-client/middleware)

Deprecation of multi-provider array

You will now see a warning if you have multiple providers in your `datasource`. We recently realized that supporting an array of providers in the Prisma schema was premature, adding complexity in the process of improving the product, and causing some confusion about our intent.

You can read more about the decision and what to do about it in [this issue](https://github.com/prisma/prisma/issues/3834).

Validate `PrismaClient` inputs at runtime

We now validate the `parameters` we accept in `new PrismaClient(parameters)`. This is unlikely to affect you unless you were passing invalid parameters into `PrismaClient` before.

Prisma Client Go is now Early Access 🎉

We're happy to announce that [Prisma Client Go](https://github.com/prisma/prisma-client-go) has graduated from experimental to [Early Access](https://www.prisma.io/docs/about/releases#early-access).

You can [get started here](https://github.com/prisma/prisma-client-go/blob/master/docs/quickstart.md). We'd love to learn more about how you use the Go Client during Early Access. You can schedule a [call with us](https://calendly.com/c/DDAUQECG7NYIBU5Q) or [chat with us on Slack](https://slack.prisma.io/) in the #prisma-client-go channel. We're looking forward to hearing from you!

📺 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://www.youtube.com/watch?v=XFCGpwcVUCY&ab_channel=Prisma) livestream.

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

👀 Make your online talk recordings more accessible with subtitles

We'd love to help you make your talk recordings (no matter if Meetup or conference talk) more accessible by [adding subtitles](https://twitter.com/prisma/status/1325744486425780224) to it **for free**! Reach out to [sponsorshipsprisma.io](sponsorshipsprisma.io) if you are interested in getting subtitles for your videos!

Fixes and improvements
[`prisma`](https://github.com/prisma/prisma)

- [Can't create a record with only the foreign key to another table](https://github.com/prisma/prisma/issues/2152)
- [Foreign key field is not being set when using a nested create for a one-to-one relation](https://github.com/prisma/prisma/issues/3081)
- [Prisma Client is unable to fetch DateTime lists](https://github.com/prisma/prisma/issues/3517)
- [Middleware params model should be an enum or union of strings.](https://github.com/prisma/prisma/issues/3545)
- [vercel/pkg broken on windows](https://github.com/prisma/prisma/issues/3571)
- [vercel/pkg errors on windows](https://github.com/prisma/prisma/issues/3572)
- [Introspection fails instantly MariaDB](https://github.com/prisma/prisma/issues/3708)
- [DATABASE_URL verification still attempted when datasource override provided in PrismaClient constructor](https://github.com/prisma/prisma/issues/3750)
- [Introspection should try to preserve custom Enum names on MySQL even without map](https://github.com/prisma/prisma/issues/3802)
- [Mutliple 1-n self relations break migrations](https://github.com/prisma/prisma/issues/3805)
- [.transaction([]) fails with Request Timeout Error on large dataset](https://github.com/prisma/prisma/issues/3892)
- [JSON value truncate floating numbers](https://github.com/prisma/prisma/issues/3918)
- [Postgresql: Large double precision float values cause panic](https://github.com/prisma/prisma/issues/3923)
- [Error in prisma results in unhandled promise rejection](https://github.com/prisma/prisma/issues/3945)
- [Consolidate Undici error handling](https://github.com/prisma/prisma/issues/3989)
- [Internal: update our `pnpm` version used for development and CI](https://github.com/prisma/prisma/issues/3994)
- [Internal: Create new milestone check GitHub Action](https://github.com/prisma/prisma/issues/4000)
- [Prisma and Netlify, binary is not downloaded automatically since 2.8.0](https://github.com/prisma/prisma/issues/4011)
- [Detect and enforce Node Version in `preinstall` hook so pnpm fails clearly](https://github.com/prisma/prisma/issues/4035)
- [Package name reuse (.prisma/client) when generating multiple prisma clients causes issues with some other libraries (e.g. jest)](https://github.com/prisma/prisma/issues/4048)
- [Native Types: db.BigInt should be BigInt](https://github.com/prisma/prisma/issues/4050)
- [Prisma generate or introspect don't work when nativeTypes preview is enabled](https://github.com/prisma/prisma/issues/4064)
- [Cannot update a model with composite keys through a referenced model](https://github.com/prisma/prisma/issues/4082)
- [RangeError: Invalid count value during create](https://github.com/prisma/prisma/issues/4083)
- [Prisma Client doesn't load root .env](https://github.com/prisma/prisma/issues/4096)
- [You are trying to load env variables which are already present in your project root .env](https://github.com/prisma/prisma/issues/4098)
- [Stabilize connectOrCreate](https://github.com/prisma/prisma/issues/4125)
- [Stabilize transactionApi](https://github.com/prisma/prisma/issues/4126)
- [Add integration test to trigger env var warning in Prisma Client](https://github.com/prisma/prisma/issues/4144)
- [Improve error when using prisma migrate --experimental with native types](https://github.com/prisma/prisma/issues/4186)


[`prisma-client-js`](https://github.com/prisma/prisma-client-js)

- [Runtime validation for Prisma client constructor parameters](https://github.com/prisma/prisma-client-js/issues/889)
- [$transaction spread operator](https://github.com/prisma/prisma-client-js/issues/894)


[`language-tools`](https://github.com/prisma/language-tools)

- [Add Prisma icon to standard icon theme in VSCode](https://github.com/prisma/language-tools/issues/158)
- [Gitpod Support](https://github.com/prisma/language-tools/issues/424)
- [prisma.plugin.nextjs.addTypesOnSave broken](https://github.com/prisma/language-tools/issues/602)


[`studio`](https://github.com/prisma/studio)

- [Unable to view / edit DateTime lists](https://github.com/prisma/studio/issues/529)
- [Case insensitive searching](https://github.com/prisma/studio/issues/561)
- [npx prisma studio doesn't work on WSL 1](https://github.com/prisma/studio/issues/563)
- [Cannot type "." in a float column](https://github.com/prisma/studio/issues/571)
- [Websockets fails when studio is behind a reverse proxy](https://github.com/prisma/studio/issues/572)
- [[design] Cell overflow](https://github.com/prisma/studio/issues/576)


[`prisma-engines`](https://github.com/prisma/prisma-engines)

- [Introduce support for scalar type `BigInt`](https://github.com/prisma/prisma-engines/issues/1284)
- [Native Type Precisions](https://github.com/prisma/prisma-engines/issues/1291)
- [Remove Scalar Type `Duration`](https://github.com/prisma/prisma-engines/issues/1317)
- [Feature gate scalar types `Decimal` and `Bytes`](https://github.com/prisma/prisma-engines/issues/1318)
- [Remove TimestampWithTimeZone, TimeWithTimeZone and Intervall](https://github.com/prisma/prisma-engines/issues/1323)

2.10.2

Today, we are issuing the `2.10.2` patch release.
Fixes

Client
- [You are trying to load env variables which are already present in your project root .env 4098](https://github.com/prisma/prisma/issues/4098)

Language Tools
- [Prisma vscode extension is autoformating typescript react code on save 605](https://github.com/prisma/language-tools/issues/605)
- [Npm throws error on build creation while Prisma extension is enabled 606](https://github.com/prisma/language-tools/issues/606)

2.10.1

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


Fixes

CLI

- [prisma/engines are not used by CLI 4097](https://github.com/prisma/prisma/issues/4097)

Client

- [Prisma Client doesn't load root .env 4096](https://github.com/prisma/prisma/issues/4096)

Migrate

- [Prisma Migrate Crash on change required foreign key to not-required 626](https://github.com/prisma/migrate/issues/626)
- [v2.10.0 627](https://github.com/prisma/migrate/issues/627)
- [crashed after the first migration 625](https://github.com/prisma/migrate/issues/625)
- [Error in migration engine. 623](https://github.com/prisma/migrate/issues/623)
- [Migration issue on changing userId field to unique. related to 619 621](https://github.com/prisma/migrate/issues/621)
- [Migration crashed with code 619](https://github.com/prisma/migrate/issues/619)
- [Crash Report 618](https://github.com/prisma/migrate/issues/618)

Language Tools
- [prisma.plugin.nextjs.addTypesOnSave broken 602](https://github.com/prisma/language-tools/pull/603)

Page 21 of 44

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.