Change8

7.3.0

Breaking Changes
📦 prismaView on GitHub →
2 breaking2 features🐛 3 fixes🔧 8 symbols

Summary

Prisma 7.3.0 introduces performance tuning via the `compilerBuild` option for the ORM client and allows raw queries to bypass the query compiler. This release also reverts a breaking change related to mapped enums and fixes BigInt precision issues in PostgreSQL JSON aggregations.

⚠️ Breaking Changes

  • The behavior of `@map` enums has been reverted to v6.19.0 due to issues introduced in v7.0 where the generated enum value came from the value passed to `@map`. Users relying on the v7.0 behavior must adjust their schema or code.
  • When using `relationJoins` with BigInt fields in PostgreSQL, BigInt values were previously returned as JSON numbers, leading to precision loss in JavaScript after `parse` if the value exceeded `Number.MAX_SAFE_INTEGER`. This is fixed by casting BigInt columns to `::text` in `JSONB_BUILD_OBJECT` calls, meaning BigInts are now returned as JSON strings.

Migration Steps

  1. If you rely on the v7.0 behavior for `@map` enums, you must update your schema or code as this behavior has been reverted to v6.19.0.
  2. If using `@prisma/better-sqlite3`, upgrade to v7.3.0 to receive the pinned version that avoids SQLite bugs.
  3. Optionally, configure `compilerBuild = "fast"` or `compilerBuild = "small"` in your `generator client` block in `schema.prisma` to tune query compilation performance vs. client bundle size.

✨ New Features

  • Introduced a new `compilerBuild` option in the client generator block of `schema.prisma` with values `fast` (default, optimized for speed) and `small` (optimized for size) to select the underlying Query Compiler engine.
  • Raw queries (`$executeRaw`, `$queryRaw`) can now bypass the query compiler and interpreter infrastructure, sending queries directly to the driver adapter for reduced overhead.

🐛 Bug Fixes

  • Updated `@prisma/adapter-mssql` to use MSSQL v12.2.0.
  • Pinned the version of `better-sqlite3` used by `@prisma/better-sqlite3` to avoid an underlying bug present in SQLite 3.51.0.
  • Fixed precision loss for BigInt values larger than 2^53 - 1 when using `relationJoins` with PostgreSQL by casting BigInt columns to text within JSON aggregation functions.

Affected Symbols