Prisma 3.12.0stable Released Apr 05, 2022
⚠️ Breaking Change Impact Score: 7/10

Prisma 3.12.0 β€” Release Notes & Engineering Impact

Source available β€” automated, not human-reviewed

Component: prisma Β· Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-01.

Breaking-change evidence from the source

  • 🚨 Please be aware that we made a few **breaking changes** to tie up loose ends before General Availability:
Read the original context β†—
Source flags breaking changes β€” review applicability
$ npm install --save-dev --save-exact [email protected]
πŸ“„ .MD
⚑ Executive Summary (TL;DR)

Prisma 3.12.0. Source highlight: Today, we are excited to share the `3.12.0` stable release πŸŽ‰

Who Does This Impact? (Role-Based Analysis)

πŸ’» Software Engineers & Devs

Check the source notes against the package and APIs you use before upgrading.

πŸ“Š Product & Engineering Leads

Use the documented changes to assess relevance to your product; release frequency alone is not a quality measure.

βš™οΈ DevOps & Security

Verify the target version, runtime requirements and rollback procedure in the official documentation.

⚠️ Breaking Changes & Deprecations (1)

  • 🚨 Please be aware that we made a few **breaking changes** to tie up loose ends before General Availability:

✨ New Features & Capabilities (2)

  • MongoDB GA: Remove Preview Feature checks and Preview mentions
  • `prisma-fmt` panic when `@db.Array()` is added in a MongoDB schema

⚑ Performance & Enhancements (2)

  • MongoDB: improve error message `Inconsistent column data: Malformed ObjectID` by including the field(s) in the message
  • [[Mongo] Improve native type validations in composite types](https://github.com/prisma/prisma/issues/12460)
πŸ“„ View Raw Release Notes (Original Developer Log)
Today, we are excited to share the `3.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%20@prisma%20release%20v3.12.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.12.0) about the release.** 🌟 ## Major improvements and new features ### MongoDB is now Generally Available If you’ve been using MongoDB since it was in Preview, we'd like to say: **Thank you!** Your testing and feedback has been essential during the preview phase, and our MongoDB support is much better because of it. Today we’re proud to announce that MongoDB is now stable and production-ready. After upgrading to `3.12.0`, you can remove the MongoDB preview flag in your schema: ```diff datasource db { provider = "mongodb" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" - previewFeatures = ["mongoDb"] } ``` We’ve been working hard towards this day ever since we launched MongoDB in [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) in July 2021. Here are some of the feature highlights we developed over this period: - Expressive and type-safe operations for querying MongoDB **embedded documents** - Thorough **introspection support** for using Prisma with existing MongoDB databases - **Declarative index management** right from your Prisma Schema with `db push` - Powerful **raw query APIs** to help you incrementally migrate to Prisma You can learn about these features in the [release blog post](https://prisma.io/blog/mongodb-general-availability-pixnun6mffmu), and more, in our freshly brewed [MongoDB Guide](https://prisma.io/docs/guides/database/using-prisma-with-mongodb). For newcomers to Prisma with MongoDB, we recommend you check out our [Getting Started Guide](https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/mongodb-typescript-mongodb). To celebrate this milestone, we invite you to join [Prisma’s MongoDB Launch Week](https://www.prisma.io/mongodb-launch/?utm_source=github&utm_medium=releasenotes&utm_campaign=mongodblaunch) starting on April 25th. Enjoy a jam-packed week of exclusive workshops with plenty of opportunities to win free MongoDB Atlas credits and swag. It’s free to [sign-up](https://www.prisma.io/mongodb-launch/?utm_source=github&utm_medium=releasenotes&utm_campaign=mongodblaunch) and available anywhere you have an internet connection. 🚨 Please be aware that we made a few **breaking changes** to tie up loose ends before General Availability: - [`@db.Array` replaced with `@db.ObjectId`](https://github.com/prisma/prisma/issues/11226) - [Removed Decimal support](https://github.com/prisma/prisma/issues/12637) We made some changes in the [`3.11.1` patch release](https://github.com/prisma/prisma/releases/tag/3.11.1) in case you missed it. ### Index support on composite type fields We also added support for adding indexes on embedded document fields in MongoDB. This means that you can now define a normal, unique, or full-text index in your schema. ```prisma type Address { street String number Int } model User { id Int @id email String address Address @@index([email, address.number]) /// normal index @@unique([email, address.street]) /// unique index @@fulltext([email, address.street]) /// full-text index } ``` > Note: Prisma Client does not yet fully support the feature for now. This will be rolled out in a future release. ### Improved Connection Pooling Resiliency In `3.12.0`, we busted a ghost that has been bugging teams since the early days of the Prisma ORM. Under certain amounts of load, some people reported that the connection pool would sometimes drop connections or deadlock and not recover. After many sightings and a lot of head-scratching, we were finally able to reproduce the issue. This allowed us to narrow down the problem to one of our dependencies and fix the problem. To read the nitty gritty details of the problem and our solution, check out [this issue](https://github.com/importcjj/mobc/issues/63#issuecomment-1060295772). ## Fixes and improvements ### Prisma Client - [Bundling fails on 2.21.0](https://github.com/prisma/prisma/issues/6564) - ["Timed out fetching a new connection from the pool" message is misleading](https://github.com/prisma/prisma/issues/6898) - [I get "Can't resolve '_http_common'" when I use NestJS with monorepo (webpack)](https://github.com/prisma/prisma/issues/6899) - [Broken on Next.js 10.2.0 which uses Webpack 5 when running a custom server to support HTTPS locally](https://github.com/prisma/prisma/issues/6925) - [Timed out fetching a new connection from the pool](https://github.com/prisma/prisma/issues/7249) - [Multiple prisma with nx workspaces and nestjs](https://github.com/prisma/prisma/issues/7470) - [Prisma Client (Binary): upgrade to undici@4](https://github.com/prisma/prisma/issues/7539) - [issue with connection pool ?](https://github.com/prisma/prisma/issues/7644) - [Prisma does not recover from PrismaClientInitializationError](https://github.com/prisma/prisma/issues/9420) - [Connection pool timeout errors when using higher connection_limit](https://github.com/prisma/prisma/issues/9622) - [DB connection retry not happening](https://github.com/prisma/prisma/issues/9967) - [Prisma does not recover from DB being down on start up](https://github.com/prisma/prisma/issues/10153) - [Prisma client never recovers from P1001 ](https://github.com/prisma/prisma/issues/10240) - [`new PrismaClient()` can not find `schema.prisma` file when use with pnpm workspace](https://github.com/prisma/prisma/issues/10361) - [Prisma client cannot find datamodel path ("schema.prisma")](https://github.com/prisma/prisma/issues/10512) - [Interactive Transaction concurrent writes cause Prisma to hang](https://github.com/prisma/prisma/issues/11750) - [MongoDB: improve error message `Inconsistent column data: Malformed ObjectID` by including the field(s) in the message ](https://github.com/prisma/prisma/issues/11885) - [Unable to establish a connection once database recovers](https://github.com/prisma/prisma/issues/12028) - [Composite Type should disallow null on a required contains one](https://github.com/prisma/prisma/issues/12078) - [Prisma 3.9.x+ multiple clients being generated, and in the wrong Yarn 1 workspace](https://github.com/prisma/prisma/issues/12083) - [MongoDB: `Inconsistent column data: Failed to convert ...` error on invalid data in properties does not mention affected field (and other useful information)](https://github.com/prisma/prisma/issues/12096) - [MongoDB findRaw doesn't seem to work](https://github.com/prisma/prisma/issues/12124) - [errorFormat:"minimal" or other options not working](https://github.com/prisma/prisma/issues/12130) - [Interactive transactions are not logging DB queries](https://github.com/prisma/prisma/issues/12145) - [Count action ends up being called aggregate when checking in middleware](https://github.com/prisma/prisma/issues/12222) - [MongoDB logging `QueryEvent` type `params` is `undefined`](https://github.com/prisma/prisma/issues/12319) - [MDBGA: Finish refactoring MongoDB queries to use boolean expressions](https://github.com/prisma/prisma/issues/12362) - [Re-evaluate and -confirm supported native types on MongoDB](https://github.com/prisma/prisma/issues/12382) - [Allow to filter by undefined fields in MongoDB](https://github.com/prisma/prisma/issues/12478) - [MongoDB GA: Remove Preview Feature checks and Preview mentions](https://github.com/prisma/prisma/issues/12628) ### Prisma - [Connection issues never seem to go away(how to deploy prisma live reliably) [MySQL, TypeGraphQL, EBS]](https://github.com/prisma/prisma/issues/7128) - [Error: [libs/datamodel/connectors/dml/src/model.rs:222:92] called `Option::unwrap()` on a `None` value ](https://github.com/prisma/prisma/issues/9546) - [Error: [libs\sql-schema-describer\src\lib.rs:171:32] Column id not found in Table videos ](https://github.com/prisma/prisma/issues/9791) - [Prisma Migrate shows warning when editing rolled-back migration](https://github.com/prisma/prisma/issues/9829) - [Prisma client not attempting to reconnect on "Can't reach database server"](https://github.com/prisma/prisma/issues/9902) - [Error: Error in migration engine. Reason: [libs\sql-schema-describer\src\walkers.rs:592:14] STATE ERROR BOOP ](https://github.com/prisma/prisma/issues/10454) - [Error report](https://github.com/prisma/prisma/issues/10577) - [MongoDB type inference mismatch](https://github.com/prisma/prisma/issues/11808) - [Error: [libs\datamodel\core\src\transform\dml_to_ast\mod.rs:74:59] called `Option::unwrap()` on a `None` value ](https://github.com/prisma/prisma/issues/12033) - [Cannot use `prisma db push` on MongoDB with `@unique` id](https://github.com/prisma/prisma/issues/12149) - [CockroachDB: Remove the Json native type](https://github.com/prisma/prisma/issues/12234) - [Error: [libs/datamodel/connectors/dml/src/model.rs:363:66] called `Option::unwrap()` on a `None` value ](https://github.com/prisma/prisma/issues/12259) - [Error: [libs/datamodel/core/src/transform/dml_to_ast/mod.rs:74:59] called `Option::unwrap()` on a `None` value ](https://github.com/prisma/prisma/issues/12261) - [Can `migrate diff` correctly resolve relative SQLite file path from schema? ](https://github.com/prisma/prisma/issues/12265) - [Introspection: MongoDB: Warnings mention Native Types instead of PSL types (e.g. Document instead of Json)](https://github.com/prisma/prisma/issues/12321) - [MongoDB: Mixed data comments should mention PSL types instead of Mongo Native Types (`Int32` => `Int`)](https://github.com/prisma/prisma/issues/12398) - [Composite Indices: Support in the PSL](https://github.com/prisma/prisma/issues/12406) - [Composite Indices: MongoDB Introspection Connector](https://github.com/prisma/prisma/issues/12407) - [Composite Indices: MongoDB Migration Connector](https://github.com/prisma/prisma/issues/12408) - [[MDB] Validate valid field / key names in the datamodel](https://github.com/prisma/prisma/issues/12410) - [Introspecting indexes on embedded documents leads to validation error](https://github.com/prisma/prisma/issues/12449) - [[Mongo] Improve native type validations in composite types](https://github.com/prisma/prisma/issues/12460) - [[Mongo] Too generic error messages in composite types](https://github.com/prisma/prisma/issues/12462) ### Prisma Migrate - [Unique/Index keeps getting recreated](https://github.com/prisma/prisma/issues/11631) - [Introspected CockroachDB schema has different field type than original Prisma schema that was migrated](https://github.com/prisma/prisma/issues/12281) ### Language tools (e.g. VS Code) - [`prisma-fmt` panic when `@db.Array()` is added in a MongoDB schema](https://github.com/prisma/language-tools/issues/1070) - [Embedded many-to-many relations do not suggest valid values in `references`](https://github.com/prisma/language-tools/issues/1075) - [@relation auto completion: fields and references are still suggested when already present (when trailing comma is missing)](https://github.com/prisma/language-tools/issues/1080) - [Native type `Array()` is still auto suggested](https://github.com/prisma/language-tools/issues/1081) ### Prisma Engines - [ [Composites] Implement `updateMany` write operation](https://github.com/prisma/prisma-engines/issues/2534) - [ [Composites] Implement `deleteMany` write operation](https://github.com/prisma/prisma-engines/issues/2535) - [Remove decimal support from MongoDB](https://github.com/prisma/prisma-engines/issues/2600) - [Investigate intermittently failing cockroachdb test suite on buildkite](https://github.com/prisma/prisma-engines/issues/2741) - [[MongoDB] Having filters don't work without selection](https://github.com/prisma/prisma-engines/issues/2768) ## Credits Huge thanks to @ever0de, @chronotc, @hayes, @maddhruv, @jasimon, @codesee-maps[bot], @andyrichardson, @xnerhu, @Josh-a-e, @dusandz for helping! ## πŸ’Ό We're hiring! If you're interested in joining our growing team to help empower developers build data-intensive applications, Prisma is the place for you. We're looking for a [Developer Success 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/TGMF8ykS29M) livestream. The stream takes place [on YouTube](https://youtu.be/TGMF8ykS29M) on **Thursday, April 7** at **5 pm Berlin | 8 am San Francisco**.