prisma
prisma (latest known version: 7.9.0) has 17 known breaking changes on record, each backed by a source URL.
Recent changes
Version 7.0.0 is a semver-major release over 6.19.3, but no breaking change was detected in the release notes text - flagged for manual review.
If you are using the `prismaSchemaFolder` Preview feature to split your Prisma schema into multiple files, you may encounter some breaking changes in this version.
⚠️ This section contains a list of breaking changes. If you upgrade your application to Prisma ORM v6 without addressing these, your application is going to break! **For detailed upgrade instructions, check out the [upgrade guide](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6).** ⚠️
Version 5.0.0 is a semver-major release over 4.16.2, but no breaking change was detected in the release notes text - flagged for manual review.
Version 4.0.0 is a semver-major release over 3.15.2, but no breaking change was detected in the release notes text - flagged for manual review.
Some of the features above introduce breaking changes. In this section, we cover the breaking changes in more detail with links to upgrade guides in the documentation. We recommend that you read through the breaking changes carefully and make sure that you've upgraded and tested your application.
We fixed two security issues: * [Command injection vulnerability in @prisma/sdk in getPackedPackage function](https://github.com/prisma/prisma/security/advisories/GHSA-pxcc-hj8w-fmm7) This is a low-severity issue and no users have been affected * [Visual Studio Code Prisma Extension Remote Code Execution Vulnerability](https://github.com/prisma/language-tools/security/advisories/GHSA-4rf9-43m7-x828) This is a high-severity issue and we recommend all Prisma VS Code extension users verify that they have automatically been upgraded to the latest version. There is no evidence that this vulnerability has been exploited. Big thanks to [@erik-krogh (Erik Krogh Kristensen)](https://github.com/erik-krogh) and [@Ry0taK](https://github.com/Ry0taK) for reporting these issues.
On MySQL _only_, fields of type `Boolean` are stored as `TINYINT(1)` in the database. We no longer coerce the value to a Boolean. That means `queryRaw` now returns integers of value `0` or `1` instead of `true` or `false` for `Boolean` fields.
- We've upgraded our RHEL base image from CentOS 6 to Amazon Linux 2. CentOS 6 reached end-of-life on November 30th, 2020. This may affect machines still running Amazon Linux 1. If you run into problems with this upgrade, please don't hesitate to [reach out](https://github.com/prisma/prisma/issues/new/choose). - We've renamed the `FindOneModelArgs` and `FindManyModelArgs` type definitions to improve consistency. See [this issue](https://github.com/prisma/prisma-client-js/issues/647) for more details. - Following the deprecation in [2.12.0](https://github.com/prisma/prisma/releases/tag/2.12.0), this release we've removed `findOne` and moved many of the Typescript types under the `Prisma` namespace.
This release introduces a **breaking change for TypeScript users**. Prisma Client now requires TypeScript v4.1 or above. You can read more about upgrading your TypeScript version on [their wiki](https://github.com/Microsoft/TypeScript/wiki/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.
We've removed the `autoConnect` property from the `Photon` constructor to make the connection behavior more explicit and improve error handling. Photon will continue to lazily connect if you do a query.
We have adjusted the way how the `Photon` constructor is exported from `@generated/photon`, it's not a _default export_ any more. Therefore, it now needs to be imported as follows: ```ts import { Photon } from '@generated/photon' // or const { Photon } = require('@generated/photon') ``` The previous import syntax is **not valid** any more: ```ts import Photon from '@generated/photon' // or const Photon = require('@generated/photon') ```
This version contains a breaking change in the `_Migrations` table that Lift uses to store the migration history of a project. Due to that change, you might encounter an error looking similar to this: ``` thread 'tokio-runtime-worker-0' panicked at 'Deserializing the database migration failed.: Error("missing field `original_steps`", line: 0, column: 0)', src/libcore/result.rs:999:5 ``` If you see that error, you need to **manually delete the `_Migration` table** from your database as a workaround.
Due to a major refactoring in Lift's migration engine, your migrations are likely going to break if you upgrade to `preview016` with an error similar to this: `Error parsing the migration steps: Error("unknown field 'name', expected 'model'", line: 1, column: 59)`. To get rid of this error, you'll need to manually delete the generated `migrations` folder from your file system and drop the `_Migration` table in your database.
We removed the `prisma2 convert` command from the Prisma Framework CLI. If you're upgrading from Prisma 1 to the Prisma Framework, you can use [introspection](https://github.com/prisma/prisma2/blob/master/docs/introspection.md) to generate your initial Prisma schema.
The property on the `PrismaClient` that exposes CRUD operations per model used to be lowercased and pluralized, the [**pluralization of that property is now removed**](https://github.com/prisma/prisma-client-js/issues/423). For example, for a `model User` you'd access a CRUD operation via the generated `prisma.users` property, as in `prisma.users.findMany()`. As of `preview021`, the pluralization has been removed and the property is called after the model (but lowercased), so it would now be `prisma.user.findMany()`. Here are few more examples showing how the calls to your `PrismaClient` instance must be adjusted: **Prisma schema** ```prisma model User { id Int @id @default(autoincrement()) name String } ``` **Generated Prisma Client API** ```diff const prisma = new PrismaClient() // CRUD operations are exposed via: - // prisma.users + // prisma.user // findMany - const users = await prisma.users.findMany() + const users = await prisma.user.findMany() // findOne - const user = await prisma.users.findOne({ where: { id: 1 }}) + const user = await prisma.user.findOne({ where: { id: 1 }}) // create - const user = await prisma.users.create({ data: { name: "Alice" }}) + const user = await prisma.user.create({ data: { name: "Alice" }}) // and so on ... ```
`MODELGetSelectPayload` and `MODELGetIncludePayload` have been merged into `MODELGetPayload`. More info [here](https://github.com/prisma/prisma-client-js/issues/564).
Check what changed for prisma since your installed version, live.
Open the playground →