Prisma

Latest version: v0.15.0

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

Scan your dependencies

Page 15 of 44

3.4.2

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

Fixes

Prisma Client

- [Data Proxy client fails when multi-byte chars are used](https://github.com/prisma/prisma/issues/10152)

3.4.1

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

Fixes

For MongoDB Preview Feature

- [MongoDB: Cannot create m-n relations](https://github.com/prisma/prisma/issues/10071)

3.4.0

Today, we are excited to share the `3.4.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%20v3.4.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.4.0) about the release.** 🌟 

Major improvements & new features

Support for PostgreSQL 14

We are pleased to announce that Prisma version `3.4.0` provides support for PostgreSQL 14. For a full list of our supported databases and their versions, see our [documentation](https://www.prisma.io/docs/reference/database-reference/supported-databases).

MongoDB

Support for Order By Aggregate Group

In Prisma version `3.4.0`, we add support on MongoDB databases for using `orderBy` with aggregate groups. This was previously available for relational databases.

For example, if the data about your application's users includes their city of residence, you can determine which cities have the largest user groups. The following query sorts each `city` group by the number of users in that group, and returns the results in descending order (largest group first):

ts
const groupBy = await prisma.user.groupBy({
by: ['city'],
_count: {
city: true,
},
orderBy: {
_count: {
city: 'desc',
},
},
})


For more information refer to our [documentation about ordering by groups](https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing#order-by-aggregate-group).

Initial support for MongoDB in `prisma db push`

The `prisma db push` command is used to sync your Prisma schema and your database schema in development.

Because MongoDB has a unique approach to database schema management, this initial release only syncs `unique`, `unique` and `index` annotations in your schema.

Let's look at a quick example using this Prisma schema:

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

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

model BlogPost {
id String id default(dbgenerated()) map("_id") db.ObjectId
title String unique
}


After running `prisma db push` the CLI will display which changes were made:


Applying the following changes:

[+] Unique index `BlogPost_title_key` on ({"title":1})


Let's keep iterating on the schema. We apply the following changes:

- remove the unique index from `title`
- add a compound unique index on the combination of `author` and `title`
- add an index to `title`

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

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

model BlogPost {
id String id map("_id") db.ObjectId
author String
title String

unique([author, title], map: "titleAuthorShouldBeUniqueUnique")
index([title])
}


and run `prisma db push` again, we see what changes were applied:


Applying the following changes:

[-] Unique index `BlogPost_title_key`
[+] Index `BlogPost_title_idx` on ({"title":1})
[+] Unique index `titleAuthorShouldBeUniqueUnique` on ({"author":1,"title":1})


And voilà, the index and unique definitions in our schema are reflected in the database.

There is a known limitation with _empty collections_: if you `db push` indexes or uniques on fields that do not have values in the collection (they are missing in all existing documents), and you use `db pull` after that, the indexes and uniques will not be pulled because the fields will not be in your schema.

Since this is a Preview feature, any feedback is very much appreciated. Please get in touch by opening a [GitHub issue](https://github.com/prisma/prisma/issues/new).

Introspection of embedded documents in MongoDB

For those interested in helping us getting introspection of embedded documents right, we packaged a first iteration into the CLI. More info in the Github [issue](https://github.com/prisma/prisma/issues/10016).

Prisma Client Go

Data Proxy Support

Connection limit issues got you down? By using Prisma's Data Proxy, you can pool your connections to avoid overloading your database.

With this release, Prisma Client Go can now read and write to the [Data Proxy](https://www.prisma.io/docs/concepts/components/prisma-data-platform#prisma-data-proxy).

You can generate a "Data Proxy"-enabled Go Client with the following command:

bash
PRISMA_CLIENT_ENGINE_TYPE='dataproxy' go run github.com/prisma/prisma-client-go generate


Then you can use the Go Client as you normally would:

go
amas, err := client.Ama.FindMany().Exec(ctx)
if err != nil {
return err
}
for _, ama := range amas {
fmt.Println(ama.Status, ":", ama.Question)
}

// ANSWERED : How did you build this AMA page?
// ANSWERED : What is zero-cost type safety?
// UNANSWERED : What developer tools do you like?


Please note that the Data Proxy is currently in Early Access and still under active development. We do not recommend using the Data Proxy for production loads. If you run into any issues while trying to use the Go Client with the Data Proxy, please leave us a note in [this issue](https://github.com/prisma/prisma-client-go/issues/663).

JSON Filtering Support

We've had JSON filtering support in the TypeScript Client since . In 3.4.0, we're bringing support to the Go Client. Let's take a look at an example.

Given the following Prisma schema:

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

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

model Log {
id Int id default(autoincrement())
level Level
message String
meta Json
}

enum Level {
INFO
WARN
ERROR
}


You can now write the following to query a specific service name inside inside the `meta` field:

go
logs, _ := client.Log.FindMany(
db.Log.Meta.Path([]string{"service"}),
db.Log.Meta.Equals(db.JSON("\"api\"")),
).Exec(ctx)


See some more examples of what you can do in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields). Note that the examples are written in Typescript, but the same concepts apply to Go as well!

Fixes and improvements

Prisma Client

- [Add test for custom engine location from the Prisma Client JS instance](https://github.com/prisma/prisma/issues/6171)
- [Importing prisma/client takes 6s (includes repro and which line causes it)](https://github.com/prisma/prisma/issues/8178)
- [CFW: Find cause and fix error 500](https://github.com/prisma/prisma/issues/9594)
- [PCO: Discuss high-level goals](https://github.com/prisma/prisma/issues/9602)
- [MongoDB: `orderByAggregateGroup` (since 2.21.0)](https://github.com/prisma/prisma/issues/9160)

Prisma Migrate

- [Test CLI database creation for all supported databases](https://github.com/prisma/prisma/issues/8615)
- [Add postgres 14 to databases tested in CI](https://github.com/prisma/prisma/issues/9545)
- [Validation: duplicate field name checks do not check if the field name is mapped](https://github.com/prisma/prisma/issues/9770)
- [Validate composite type cycles](https://github.com/prisma/prisma/issues/9782)
- [dbgenerated values are not created when pushing model](https://github.com/prisma/prisma/issues/9828)
- [Implement introspection of composite types on mongodb](https://github.com/prisma/prisma/issues/9864)
- [Implement reformatting for composite types](https://github.com/prisma/prisma/issues/10054)

Language tools (e.g. VS Code)

- [Send Slack message on failing CI tests](https://github.com/prisma/language-tools/issues/761)
- [Language tool support for named contraints/indexes](https://github.com/prisma/language-tools/issues/825)

The Prisma Serverless Data Conference is happening on November 18!

Make sure to claim your ticket for our free [Prisma Serverless Data Conference](https://www.prisma.io/serverless) about all things databases and serverless with fantastic speakers from companies like PlanetScale, MongoDB, Vercel, Netlify, Cloudflare and CockroachDB.

📺 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=xyJESipjfNQ&ab_channel=Prisma) livestream.

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

3.3.0

Today, we are excited to share the `3.3.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%20v3.3.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.3.0) about the release.** 🌟 

Major improvements & new features


Prisma **Data Proxy support in Prisma Client in Early Access, now with support for Cloudflare Workers**

In `3.3.0`, we're releasing [Early Access](https://www.prisma.io/docs/about/prisma/releases#early-access) support for Prisma Client connection pooling using Prisma Data Proxy. The Data Proxy feature of the Prisma Data Platform is now accessible to all users of the Prisma Data Platform (no need to request access).

Solving connection management for serverless environments

Prisma Data Proxy is an intermediary between your app and your database. It manages connection pooling, so you can reliably use traditional databases in Serverless environments.

Users can configure a Data Proxy for free on the Prisma Data Platform and connect their Prisma applications to the proxy by enabling the feature flag for it in their code.

For detailed documentation and instructions please refer to [pris.ly/data-proxy](https://pris.ly/data-proxy).

Running Prisma applications in Cloudflare Workers

Using this new feature in Prisma Client and leveraging the ~~Prisma~~ Data Proxy, developers can now deploy Prisma applications on [Cloudflare Workers](https://workers.cloudflare.com/). Here's what it looks like to use Prisma Client inside of this environment:

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

addEventListener('fetch', (event) => {
event.respondWith(handleRequest(event.request))
})

async function handleRequest(request: Request): Promise<Response> {
await prisma.log.create({
data: {
level: 'Info',
message: `${request.method} ${request.url}`,
},
})
return new Response(`request method: ${request.method}!`)
}


Follow [this deployment guide](https://www.prisma.io/docs/guides/deployment/deployment-guides/deploying-to-cloudflare-workers) to learn how to use Prisma Client with your own Cloudflare Workers. If you run into any problems, you can reach us in [this issue](https://github.com/prisma/prisma/issues/9841)!

MongoDB

Support for ordering by relation fields

In [`2.16.0`](https://github.com/prisma/prisma/releases/2.16.0), we first introduced ordering by a relation for relational databases. As of today's release, you can now order by a relation field in MongoDB as well:

ts
// Return a list of posts ordered by the author's email address
// in ascending order.
await prisma.post.findMany({
orderBy: {
author: {
email: "asc",
},
},
})


Learn more in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/filtering-and-sorting#sort-by-relation).

MongoDB 5 is now supported

Prisma now supports connecting to MongoDB 5 databases. Take advantage of the latest and greatest from the fine folks at MongoDB HQ!

Fixed optional timestamp column creation for MySQL in Prisma Migrate

When working with optional timestamp fields in MySQL, there were cases where the database implicitly set the column to `NOT NULL`. To fix this behavior, we are now explicitly creating the columns as nullable.

You can find the full details about this change [on GitHub](https://github.com/prisma/prisma/issues/9438).

Prisma Client Go now supports scalar list operations

With `3.3.0`, you can now filter and atomically update scalar lists with Prisma Client Go.

Given the following Prisma schema:

prisma
model User {
id Int id default(autoincrement())
name String
pets String[]
}


You can filter pets with the following code:

go
user, err := client.User.FindFirst(
db.User.Pets.HasSome([]string{"Fido", "Scooby"}),
).Exec(ctx)


And when you add a new furry addition to your family, you can update your list with `Push`:

go
user, err := client.User.FindUnique(
db.User.Name.Equals(1),
).Update(
db.User.Items.Push([]string{"Charlemagne"}),
).Exec(ctx)


Learn more about how to use this new feature in [our documentation](https://github.com/prisma/prisma-client-go/blob/main/docs/reference/12-scalar-lists.md). To dive deeper into the concept of scalar lists, you can read the guide on [Working with scalar lists](https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-scalar-lists-arrays).


Fixes and improvements

Prisma Migrate

- [Error: [libs/datamodel/connectors/dml/src/model.rs:161:64] Could not find relation field clubs_clubsTousers on model User. ](https://github.com/prisma/prisma/issues/6737)
- [Error: [libs/datamodel/connectors/dml/src/model.rs:161:64] Could not find relation field Trade_OrderToTrade on model Order. ](https://github.com/prisma/prisma/issues/7600)
- [Support for application_name argument in connection URL for postgres](https://github.com/prisma/prisma/issues/7804)
- [Revise CONTRIBUTING.md](https://github.com/prisma/prisma/issues/8457)
- [MDBE: Adjust the parser to support the new complex `type` construct](https://github.com/prisma/prisma/issues/8603)
- [Constraint names are not validated against different constraint types](https://github.com/prisma/prisma/issues/8760)
- [Patch releases: Creation of tags on prisma-engines fails](https://github.com/prisma/prisma/issues/9013)
- [thread '<unnamed>' panicked at 'Every RelationInfo should have a complementary RelationInfo on the opposite relation field.'](https://github.com/prisma/prisma/issues/9141)
- [Add ESM compatible TypeScript command for db seed help output](https://github.com/prisma/prisma/issues/9142)
- [Re-Introspection changes order of blocks in schema (e.g. in default `schema.prisma` from `prisma init`)](https://github.com/prisma/prisma/issues/9261)
- [Different drift/reset handling on first Migration/no migration table](https://github.com/prisma/prisma/issues/9310)
- [Constraint identifiers created by `prisma migrate dev` exceeding 63 characters causing errors due to truncating](https://github.com/prisma/prisma/issues/9415)
- ['DateTime?' does NOT create nullable field](https://github.com/prisma/prisma/issues/9438)
- [Remove SQL Server preview from `prisma init`](https://github.com/prisma/prisma/issues/9441)
- [Panicked on invalid Relation ](https://github.com/prisma/prisma/issues/9536)
- [MDBI: Update the inconsistent data warning to include an issue where people can discuss what they need](https://github.com/prisma/prisma/issues/9558)
- [Prisma generate started throwing that libssl.so.3 is missing (alpine 3.14, node 14)](https://github.com/prisma/prisma/issues/9624)

Prisma Client

- [`init --url ...` logs full connection URL when .env already exists](https://github.com/prisma/prisma/issues/7718)
- [JSON field can not query for "not equals"](https://github.com/prisma/prisma/issues/7836)
- [MBDGA: Support Order By Relations in MongoDB ](https://github.com/prisma/prisma/issues/9158)
- [Support MongoDB 5.0](https://github.com/prisma/prisma/issues/9230)
- [CFW: Add a preview feature guard in the Prisma CLI](https://github.com/prisma/prisma/issues/9618)

Language tools (e.g. VS Code)

- [Extension for 3.2.0 did not successfully get published](https://github.com/prisma/language-tools/issues/904)

📺 Join us for another "What's new in Prisma" live stream

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=Ufe_tI_jJs8) live stream.

The stream takes place [on Youtube](https://www.youtube.com/watch?v=Ufe_tI_jJs8) on **Thursday, October 21** at **5pm Berlin | 8am San Francisco**.


Credits

Huge thanks to otan for helping!

3.2.1

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

Fixes

Prisma Client

- [Prisma generate started throwing that libssl.so.3 is missing (alpine 3.14, node 14)
9624 ](https://github.com/prisma/prisma/issues/9624)

3.2.0

Today, we are excited to share the `3.2.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%20v3.2.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.2.0) about the release.** 🌟 

Major improvements & new features

MongoDB introspection support is now in Preview 🚀

In this version, we introduce support for introspecting MongoDB databases. If adding Prisma to an existing project, running `prisma db pull` against a MongoDB database with _existing data_ will sample the data and create a Prisma data model based on the stored documents.

This comes with a few caveats:

- The preview feature `mongoDb` must be enabled on the `generator` block in the Prisma schema.
- The MongoDB instance must have at least one collection with at least one document.
- To introspect indices, there must be at least one document in the collection with the indexed fields.
- If any fields have conflicting types, the most common type is chosen and the other types are written to a comment above the field in the Prisma schema.
- Relations must be added manually after introspection.
- Running `prisma db pull` multiple times will overwrite any manual changes to the data model for now.

We're constantly iterating on this feature, so please provide [feedback](https://github.com/prisma/prisma/issues/8241) for introspecting MongoDB databases!

Get the count of a relation in MongoDB

This release, we're giving MongoDB developers the ability to query the count of a relation. In the example below, we're getting the number of posts each user wrote:

js
const userWithPostsCount = await prisma.user.findMany({
include: {
_count: {
select: { posts: true },
},
},
})

// => [
// {
// email: "aliceprisma.io",
// _count: { posts: 3 }
// }
// ]


This feature was previously available for SQL databases and now it's also available in MongoDB. Learn more in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/aggregation-grouping-summarizing/#count).

Fixes and improvements

Prisma Migrate

- [MongoDB: Support introspection](https://github.com/prisma/prisma/issues/6787)
- [Inconsistent errors with different commands](https://github.com/prisma/prisma/issues/8013)
- [Drift detection makes CLI output where bold](https://github.com/prisma/prisma/issues/8063)
- [Unable to specify a double quote in a string default value](https://github.com/prisma/prisma/issues/8902)
- [On database reset in a new project, I get a seeding configuration warning](https://github.com/prisma/prisma/issues/9203)
- [Seeding seems to swallow errors](https://github.com/prisma/prisma/issues/9286)
- [Hit an unwrap() panic in datamodel-connector](https://github.com/prisma/prisma/issues/9308)
- [Running db pull after upgrading to 3.x removed name from unique](https://github.com/prisma/prisma/issues/9318)
- [`prisma db -h` still mentions `seed` as a preview feature](https://github.com/prisma/prisma/issues/9401)
- [MDBI: Show a helpful error message when developers try to re-introspect a MongoDB database](https://github.com/prisma/prisma/issues/9557)
- [(migrate) Print migration names as they are being applied](https://github.com/prisma/prisma/issues/9580)

Prisma Client

- [.gitignore is being overwrittern by `prisma init`](https://github.com/prisma/prisma/issues/8496)
- [CFW: Create a prototype of the generated Prisma Client that runs inside Cloudflare Workers](https://github.com/prisma/prisma/issues/8884)
- [Make engineType configurable via an environment variable](https://github.com/prisma/prisma/issues/9411)

Prisma

- [MongoDB: `selectRelationCount` (since 2.20.0)](https://github.com/prisma/prisma/issues/9159)

Prisma Studio

- [Studio should pin prisma dependencies to avoid problems during `prisma` patch releases.](https://github.com/prisma/studio/issues/766)

Credits

Huge thanks to otan, cbuchacher for helping out in this release!

CTA

📺 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=2TLyIvaiSCg&ab_channel=Prisma) livestream.

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

Page 15 of 44

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.