# Migration Context: Prisma v3 -> v4 # Generated by Changelogs.us: 2026-11-30T03:04:33.365215+00:00 # Target Version: 4.16.2 # Upgrade Command: N/A # Breaking Changes: 8 # Security Fixes: 0 ## Executive Summary Upgrading Prisma from 3 to 4 involves 27 releases with risk rating Moderate. ## Breaking Changes List: - [v4.0.0] As this is a major release, we included many breaking bug fixes and other enhancements, but we believe upgrading is worthwhile. You can learn about upgrading in our [Prisma 4 Upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4) and the [Prisma 4 Upgrade video](https://www.youtube.com/watch?v=FSjkBrfaoEY).: - [v4.0.0] ⚠️ Breaking change:** If you previously configured the index properties at the database level, refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#index-configuration) for a detailed explanation and steps to follow.: - [v4.0.0] This change introduces two major improvements (both breaking, refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4) for a smooth upgrade) when working with raw queries with Prisma:: - [v4.0.0] ⚠️ Breaking change:** To learn how you can smoothly upgrade to version `4.0.0`, refer to our upgrade guide: [Raw query type mapping: scalar values are now deserialized as their correct JavaScript types](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#raw-query-type-mapping-scalar-values-are-now-deserialized-as-their-correct-javascript-types) and [Raw query mapping: PostgreSQL type-casts](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#raw-query-mapping-postgresql-type-casts).: - [v4.0.0] ⚠️ Breaking change:** Refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#scalar-list-defaults) for a detailed explanation and steps to follow.: - [v4.0.0] ⚠️ Breaking change:** Refer to our [upgrade guide](https://www.prisma.io/docs/concepts/components/prisma-client/composite-types#default-values-for-required-fields-on-composite-types) for detailed explanation and steps when working with default fields on composite types in MongoDB from version `4.0.0`.: - [v4.0.0] ⚠️ Breaking change:** Refer to our [upgrade path](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#explicit-unique-constraints-on-one-to-one-relations) for a detailed explanation and steps to follow.: - [v4.0.0] ⚠️ Breaking change:** Refer to the [upgrade guide](https://www.prisma.io/docs/guides/upgrade-guides/upgrading-versions/upgrading-to-prisma-4#remove-references-syntax-for-implicit-many-to-many-relations) for a detailed explanation and steps to follow.: ## Instructions for AI Assistant: When migrating user code from Prisma 3 to 4, scan for the deprecated APIs and breaking changes above and refactor code to use modern v4.16.2 idioms.