Prisma 3.9.0stable Released Feb 01, 2022
Impact Score: 5/10

Prisma 3.9.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.

Compatibility not verified โ€” check source notes
$ npm install --save-dev --save-exact [email protected]
๐Ÿ“„ .MD
โšก Executive Summary (TL;DR)

Prisma 3.9.0. Source highlight: Today, we are excited to share the `3.9.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.

โœจ New Features & Capabilities (1)

  • Unhide `cockroachdb` provider and preview feature flag

โšก Performance & Enhancements (2)

  • `prisma migrate diff`
  • [[CDB] Test and improve Default Value Introspection](https://github.com/prisma/prisma/issues/11167)
๐Ÿ“„ View Raw Release Notes (Original Developer Log)
Today, we are excited to share the `3.9.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.9.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/3.9.0) about the release.** ๐ŸŒŸ ## Major improvements and new features ### Prisma Migrate improvements to troubleshoot migrations Last year, we released Prisma Migrate for General Availability. Since then, we've gotten feedback from you to understand the challenges you experience building, testing, and deploying migrations. We're thrilled to announce that we're introducing new CLI commands to improve the experience troubleshooting migrations: - `prisma migrate diff` - `prisma db execute` The `prisma migrate diff` command creates a diff of your database schema, Prisma schema file, or the migration history. All you would have to do is feed the command with a schema `from` state and a schema `to` state to get an SQL script or human-readable diff in return. As a companion to the `prisma migrate diff`, we also built `prisma db execute` to execute SQL scripts against a database. You can pipe the output from `prisma migrate diff` directly to `prisma db execute`. Both commands are non-interactive, so it's possible to build many new workflows such as forward and backward migrations with some automation tooling. Both commands are in Preview, and we are looking forward to learning how they work for you and how we could make them better. You can learn about them [here](https://www.prisma.io/docs/guides/database/production-troubleshooting#fixing-failed-migrations-with-migrate-diff-and-db-execute) and give us feedback on the [issue](https://github.com/prisma/prisma/issues/11514). ### Preview support for CockroachDB We are excited to announce [Preview](https://www.prisma.io/docs/about/prisma/releases#preview) support for CockroachDB :tada: [CockroachDB](https://www.cockroachlabs.com/) is a distributed SQL database that shines in its ability to scale efficiently while maintaining developer agility and reducing operational overhead. CockroachDB support in Prisma is the product of collaboration with the [Cockroach Labs](https://www.cockroachlabs.com/) team, and with this release you can use Prisma in existing CockroachDB projects with introspection. - Learn more in the [release blog post](https://www.prisma.io/blog/prisma-preview-cockroach-db-release) - Try it out with the [getting started guide](https://prisma.io/docs/getting-started/setup-prisma/add-to-existing-project/relational-databases-typescript-cockroachdb) - [Share your feedback](https://github.com/prisma/prisma/issues/11542) - Join us this Thursday for [What's new in Prisma 3.9.0](https://www.youtube.com/watch?v=lqiGj02WVqo) where [Aydrian Howard](https://twitter.com/itsaydrian) from Cockroach Labs will be joining us to discuss CockroachDB and give a demo. ### Raw query support for MongoDB Prisma version `3.9.0` introduces raw queries to the MongoDB (Preview) connector. Raw queries help writing queries that Prisma doesn't support yet, such as: ```ts // To find zero or more documents matching a filter const result = await prisma.user.findRaw({ filter: { age: { $gt: 25 } }, options: { projection: { _id: false } }, }) // To perform aggregation operations on a collection await prisma.user.aggregateRaw({ pipeline: [ { $match: { status: 'registered' } }, { $group: { _id: '$country', total: { $sum: 1 } } }, ], }) // To run a command against the database await prisma.$runCommandRaw({ aggregate: 'User', pipeline: [ { $match: { name: 'Bob' } }, { $project: { email: true, _id: false } }, ], explain: false, }) ``` The raw query API for MongoDB differs from Prisma's `$queryRaw` SQL API to handle some low-level differences between databases to give you a better API and developer experience. Learn more about Prisma's new raw query API and how you can use it in our [documentation](https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#raw-queries-with-mongodb). ### Concurrency issues with Interactive Transactions In `3.9.0`, we fixed a [number of issues](https://github.com/prisma/prisma/issues/8707) around timeouts and rollbacks when there were concurrent reads and writes. This is part of the [Interactive Transactions preview release](https://github.com/prisma/prisma/issues/8664), so you'll need to enable the `interactiveTransactions` preview feature to enable this feature. If you experienced timeouts or your interactive transactions weren't working quite as you expected, now's the time to upgrade and give it another go! Learn more about Interactive Transactions in [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/transactions#interactive-transactions-in-preview). ## Fixes and improvements ### Prisma Client - [Make the MongoDB Replica Set Requirement Optional in Development](https://github.com/prisma/prisma/issues/8266) - [Enable raw query support in MongoDB](https://github.com/prisma/prisma/issues/8270) - [interactiveTransactions: 2 concurrent writes to the same row will cause it to hang until expiring](https://github.com/prisma/prisma/issues/8707) - [interactiveTransactions rollback but don't error out if timeout is reached](https://github.com/prisma/prisma/issues/9533) - [PCO: Pass the trace ID through to an SQL comment](https://github.com/prisma/prisma/issues/10004) - [prisma.$transaction: Benchmark produces unexpected results](https://github.com/prisma/prisma/issues/10218) - [Snapshot serializer in CLI tests doesn't replace time durations >= 1s with a placeholder](https://github.com/prisma/prisma/issues/10896) - [@prisma/sdk v3.8.0: Cannot find module 'fs-jetpack'](https://github.com/prisma/prisma/issues/11126) - [Integrate MongoDB raw queries](https://github.com/prisma/prisma/issues/11136) - [Incorrect type for `DMMF.Field.type` field](https://github.com/prisma/prisma/issues/11202) - [Remove internal UDS option and tests from client](https://github.com/prisma/prisma/issues/11240) - [Internal request: have a way to get types string from dmmf](https://github.com/prisma/prisma/issues/11295) ### Prisma Migrate - [Unhide `cockroachdb` provider and preview feature flag](https://github.com/prisma/prisma/issues/10808) - [Cannot find module 'fs-jetpack' with prisma 3.8.0](https://github.com/prisma/prisma/issues/11112) - [[CDB] Test and improve Default Value Introspection](https://github.com/prisma/prisma/issues/11167) - [Migrate command does not create fulltext index [MySQL]](https://github.com/prisma/prisma/issues/11177) - [MySQL conversion issues on Windows with version 8.0.28](https://github.com/prisma/prisma/issues/11264) ### Prisma Studio - [Can't view any models: ENOENT error no such file or directory when the Prisma schema filename is not `schema.prisma`](https://github.com/prisma/studio/issues/819) ### Prisma Engines - [Update MongoDB to `2.1.0` (latest)](https://github.com/prisma/prisma-engines/issues/2596) ## Credits Huge thanks to @dusandz, @hyochan, @cesconix, @benkroeger, @YassinEldeeb, @chenkie, @Akxe, @safareli for helping! ## Change in release cadence We're making a slight change to our release cadence to every 3 weeks from every 2 weeks. ## ๐Ÿ“บ 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=lqiGj02WVqo) livestream. The stream takes place [on YouTube](https://www.youtube.com/watch?v=lqiGj02WVqo) on **Thursday, February 03** at **5 pm Berlin | 8 am San Francisco**.