GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(adapter-pg): preserve constraint name for unique violations (23505) by DanielChernov7 · Pull Request #29587 · prisma/orm

Conversation

@DanielChernov7

@DanielChernov7 DanielChernov7 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Problem

The 23505 (unique violation) branch of mapDriverError in @prisma/adapter-pg extracted field names from error.detail via regex but ignored error.constraint, while the 23503 (foreign key) branch already prefers error.constraint as { index }.

This asymmetry means unique violations lose the constraint/index name. For partial unique indexes that share the same columns (e.g. a full unique on (user_id, account_id) and a partial unique on (account_id) WHERE role = 'owner'), the resulting errors become indistinguishable without reaching into non-public fields.

Fix

Align the 23505 handler with 23503: prefer error.constraint as { index }, falling back to the parsed { fields } when no constraint name is present. Added a regression test.

Fixes #29495

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@CLAassistant

CLAassistant commented May 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented May 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b4e508c3-893a-4a12-8364-d9e49da8137b

📥 Commits

Reviewing files that changed from the base of the PR and between 977c566 and 96d023d.

⛔ Files ignored due to path filters (4)
  • packages/client/tests/functional/extensions/__snapshots__/itx.ts.snap is excluded by !**/*.snap
  • packages/client/tests/functional/extensions/__snapshots__/tx.ts.snap is excluded by !**/*.snap
  • packages/client/tests/functional/interactive-transactions/__snapshots__/tests.ts.snap is excluded by !**/*.snap
  • packages/client/tests/functional/issues/11740-transaction-stored-query/__snapshots__/tests.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • packages/adapter-pg/src/__tests__/errors.test.ts

Summary by CodeRabbit

  • Bug Fixes

    • Improved PostgreSQL unique-constraint (23505) error reporting: if the database driver provides a constraint identifier, it’s preserved; otherwise the constraint is derived from the existing error details as before.
  • Tests

    • Extended test coverage for PostgreSQL 23505 cases to confirm constraint identifiers are retained when supplied, including scenarios where the driver includes only the identifier field.

Walkthrough

PostgreSQL 23505 unique-constraint error mapping now uses the driver-provided constraint name as { index: ... } when available. If absent, it continues parsing error.detail for constrained fields. Tests cover conversion of errors that include error.constraint with and without error.detail.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: preserving PostgreSQL 23505 constraint names.
Description check ✅ Passed The description accurately describes the 23505 fix, fallback behavior, and regression test.
Linked Issues check ✅ Passed The code and tests implement the linked issue requirements by preferring error.constraint and falling back to parsed fields.
Out of Scope Changes check ✅ Passed The changes stay within the adapter-pg error-mapping fix and its regression tests.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielChernov7
DanielChernov7 force-pushed the fix/adapter-pg-unique-constraint-index branch from 5ac8eb6 to ec08106 Compare May 24, 2026 22:21
@DanielChernov7
fix(adapter-pg): preserve constraint name for unique violations (23505)
ec08106
The 23505 handler in `mapDriverError` extracted field names from
`error.detail` via regex but ignored `error.constraint`, while the
23503 handler already preferred `error.constraint` as `{ index }`.

This asymmetry meant unique violations lost the constraint/index name,
making partial unique indexes that share the same columns (e.g. a full
unique on (user_id, account_id) and a partial unique on (account_id)
WHERE role = 'owner') indistinguishable without reaching into
non-public fields.

Align 23505 with 23503: prefer `error.constraint` as `{ index }`,
falling back to the parsed `{ fields }`. Add a regression test.

Fixes prisma#29495
coderabbitai[bot]
coderabbitai Bot reviewed May 24, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/adapter-pg/src/__tests__/errors.test.ts`:
- Around line 46-54: Add a missing unit test that verifies convertDriverError
handles a 23505 UniqueConstraintViolation when only the constraint field is
present (no parseable detail); create a new it block (e.g., "should handle
UniqueConstraintViolation (23505) with only constraint") that constructs an
error object with code '23505', message, severity and constraint:
'users_email_key' and assert convertDriverError(error) returns kind
'UniqueConstraintViolation', constraint { index: 'users_email_key' },
originalCode equal to error.code and originalMessage equal to error.message to
cover the constraint-only code path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1eee3635-efd3-4a22-9d94-d6828b91c5b8

📥 Commits

Reviewing files that changed from the base of the PR and between 5ac8eb6 and ec08106.

📒 Files selected for processing (2)
  • packages/adapter-pg/src/__tests__/errors.test.ts
  • packages/adapter-pg/src/errors.ts

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/adapter-pg/src/__tests__/errors.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@DanielChernov7

DanielChernov7 commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Hey, any updates?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tensordreams
tensordreams changed the base branch from main to v7 July 21, 2026 12:05
@tensordreams
tensordreams changed the base branch from v7 to main July 21, 2026 15:11
@aqrln
Merge branch 'main' into fix/adapter-pg-unique-constraint-index
977c566
@codspeed

codspeed Bot commented Jul 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 30 skipped benchmarks1


Comparing DanielChernov7:fix/adapter-pg-unique-constraint-index (96d023d) with main (5831990)

Open in CodSpeed

Footnotes

  1. 30 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tensordreams added 2 commits July 22, 2026 18:14
@tensordreams
test(client): update postgres unique constraint snapshots
9c86229
@tensordreams
test(adapter-pg): cover constraint-only unique violations
96d023d
coderabbitai[bot]
coderabbitai Bot approved these changes Jul 22, 2026
View reviewed changes
aqrln
aqrln approved these changes Jul 22, 2026
View reviewed changes
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 22, 2026
@aqrln
aqrln merged commit 800f1d1 into prisma:main Jul 22, 2026
254 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@aqrln aqrln mentioned this pull request Jul 22, 2026
fix(adapter-pg): preserve error.constraint on 23505 unique violations #29634
Closed
This was referenced Jul 23, 2026
fix(adapters): preserve constraint name in UniqueConstraintViolation error mapping for Postgres-based adapters #29522
Closed
fix(p2002): correct modelName in nested create unique constraint errors #29595 #29628
Merged
@aqrln aqrln mentioned this pull request Jul 27, 2026
fix(adapter-pg): preserve constraint name on 23505 unique-violation #29508
Closed
tensordreams added a commit to Yashsingh045/prisma that referenced this pull request Jul 27, 2026
@tensordreams
fix(adapter-neon): preserve constraint name for unique violations (23…
2d91de8
…505)

The `23505` (unique violation) branch of `mapDriverError` in
`@prisma/adapter-neon` extracted field names from `error.detail` via a
regex and ignored `error.constraint`, while the `23503` (foreign key)
branch already prefers `error.constraint` as `{ index }`.

`@prisma/adapter-pg` was aligned with `23503` in prisma#29587, but the
equivalent change was not made in `@prisma/adapter-neon`. Both adapters
talk to the same PostgreSQL server and receive the same error fields, so
they reported different `meta.target` values for the same violation:
adapter-pg returned the index name, adapter-neon the parsed field names.

Mirror the adapter-pg handler: prefer `error.constraint` as `{ index }`,
falling back to the parsed `{ fields }` when no constraint name is
present. Update the `js_neon` snapshots that recorded the field-name
message accordingly.
This was referenced Jul 27, 2026
fix(client-engine-runtime): populate standard meta fields in rethrowAsUserFacing #29349
Open
fix(adapter-ppg): report the constraint name for unique violations #29801
Merged
aqrln pushed a commit that referenced this pull request Jul 28, 2026
@tensordreams
fix(adapter-ppg): report the constraint name for unique violations (#…
4086bd5
…29801)

## Problem

`convertDriverError` in `packages/adapter-ppg/src/errors.ts` handles
`23505` (unique violation) by parsing the `Key (...)` list out of
`details.detail` and never looks at `details.constraint`. As a result,
P2002 errors raised through Prisma Postgres lose the name of the
violated constraint or index.

## Internal inconsistency

The same file already reads the reported constraint name in its
neighbouring handlers:

- `23503` (`ForeignKeyConstraintViolation`) falls back to `{ index:
error.details.constraint }`
- `23001` (`RestrictViolation`) does the same

Only `23505` ignored it. `adapter-pg` reports the constraint name for
`23505` (#29587), and `adapter-neon` follows the same shape, so Prisma
Postgres was the odd one out.

## Change

Prefer `details.constraint` when PostgreSQL reports it, and keep the
existing detail-parsed field list as the fallback. The structure and
naming mirror `adapter-pg`.

## Tests

Four cases added to `packages/adapter-ppg/src/errors.test.ts`:

- `23505` with both a constraint name and a detail -> `{ index:
'users_email_key' }`
- `23505` with only a constraint name -> `{ index: 'users_email_key' }`
- `23505` with only a detail -> falls back to `{ fields: ['first_name',
'last_name'] }`
- `23505` with neither -> `constraint: undefined`

The two constraint-name cases fail against the previous implementation
and pass with the fix; the two fallback cases pass either way,
confirming the existing behaviour is preserved.

`pnpm --filter @prisma/adapter-ppg test` passes (41 tests across 2
files).

## Scope

This PR covers `23505` only. The related `23502` / P2011 asymmetry in
this file (which parses `details.detail` for a `Key (...)` list that
PostgreSQL does not populate for not-null violations, instead of reading
`details.column`) is already addressed for this adapter by the open
#29484, so it is deliberately left untouched here to avoid a conflict.
lh0x00 pushed a commit to lh0x00/prisma that referenced this pull request Aug 9, 2026
@DanielChernov7 @aqrln @tensordreams
fix(adapter-pg): preserve constraint name for unique violations (2350…
c0dfc64
…5) (prisma#29587)

## Problem

The `23505` (unique violation) branch of `mapDriverError` in
`@prisma/adapter-pg` extracted field names from `error.detail` via regex
but **ignored `error.constraint`**, while the `23503` (foreign key)
branch already prefers `error.constraint` as `{ index }`.

This asymmetry means unique violations lose the constraint/index name.
For partial unique indexes that share the same columns (e.g. a full
unique on `(user_id, account_id)` and a partial unique on `(account_id)
WHERE role = 'owner'`), the resulting errors become indistinguishable
without reaching into non-public fields.

## Fix

Align the `23505` handler with `23503`: prefer `error.constraint` as `{
index }`, falling back to the parsed `{ fields }` when no constraint
name is present. Added a regression test.

Fixes prisma#29495

---------

Co-authored-by: Oleksii Orlenko <[email protected]>
Co-authored-by: Alexey Orlenko's AI Agent <[email protected]>
lh0x00 pushed a commit to lh0x00/prisma that referenced this pull request Aug 9, 2026
@tensordreams
fix(adapter-ppg): report the constraint name for unique violations (p…
c00b764
…risma#29801)

## Problem

`convertDriverError` in `packages/adapter-ppg/src/errors.ts` handles
`23505` (unique violation) by parsing the `Key (...)` list out of
`details.detail` and never looks at `details.constraint`. As a result,
P2002 errors raised through Prisma Postgres lose the name of the
violated constraint or index.

## Internal inconsistency

The same file already reads the reported constraint name in its
neighbouring handlers:

- `23503` (`ForeignKeyConstraintViolation`) falls back to `{ index:
error.details.constraint }`
- `23001` (`RestrictViolation`) does the same

Only `23505` ignored it. `adapter-pg` reports the constraint name for
`23505` (prisma#29587), and `adapter-neon` follows the same shape, so Prisma
Postgres was the odd one out.

## Change

Prefer `details.constraint` when PostgreSQL reports it, and keep the
existing detail-parsed field list as the fallback. The structure and
naming mirror `adapter-pg`.

## Tests

Four cases added to `packages/adapter-ppg/src/errors.test.ts`:

- `23505` with both a constraint name and a detail -> `{ index:
'users_email_key' }`
- `23505` with only a constraint name -> `{ index: 'users_email_key' }`
- `23505` with only a detail -> falls back to `{ fields: ['first_name',
'last_name'] }`
- `23505` with neither -> `constraint: undefined`

The two constraint-name cases fail against the previous implementation
and pass with the fix; the two fallback cases pass either way,
confirming the existing behaviour is preserved.

`pnpm --filter @prisma/adapter-ppg test` passes (41 tests across 2
files).

## Scope

This PR covers `23505` only. The related `23502` / P2011 asymmetry in
this file (which parses `details.detail` for a `Key (...)` list that
PostgreSQL does not populate for not-null violations, instead of reading
`details.column`) is already addressed for this adapter by the open
prisma#29484, so it is deliberately left untouched here to avoid a conflict.
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Server that referenced this pull request Sep 1, 2026
Renovate Bot git.oirnoir.dev Instance
Update prisma monorepo to v7.10.0 (#41)
bdb1583
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@prisma/adapter-pg](https://github.com/prisma/prisma) ([source](https://github.com/prisma/prisma/tree/HEAD/packages/adapter-pg)) | imports | minor | [`7.9.1` -> `7.10.0`](https://renovatebot.com/diffs/npm/@prisma%2fadapter-pg/7.9.1/7.10.0) |
| [@prisma/client](https://www.prisma.io) ([source](https://github.com/prisma/prisma/tree/HEAD/packages/client)) | imports | minor | [`7.9.1` -> `7.10.0`](https://renovatebot.com/diffs/npm/@prisma%2fclient/7.9.1/7.10.0) |

---

### Release Notes

<details>
<summary>prisma/prisma (@&#8203;prisma/adapter-pg)</summary>

### [`v7.10.0`](https://github.com/prisma/orm/releases/tag/7.10.0)

[Compare Source](prisma/orm@7.9.1...7.10.0)

##### Prisma ORM 7.10.0

Prisma ORM 7.10.0 introduces a compatibility package for running Prisma 7 alongside newer Prisma versions, secures Prisma Studio's local server, and includes fixes across Prisma Client and the PostgreSQL, MariaDB, Neon, SQLite, and Prisma Postgres Serverless adapters.

##### Highlights

##### Run Prisma 7 alongside Prisma 8

This release introduces `@prisma/prisma7`, a compatibility package that lets you retain a matching Prisma 7 CLI and configuration while installing Prisma 8 in the same project.

Once 7.10.0 is released, a side-by-side installation can use:

```sh
npm install --save-dev prisma@8 @prisma/[email protected]
npm install @prisma/[email protected]
```

Use `prisma` for the directly installed Prisma 8 CLI and `prisma7` for Prisma 7:

```sh
npx prisma --version
npx prisma7 --version

npx prisma7 generate
npx prisma7 migrate dev
npx prisma7 db push
```

Prisma 7 now prefers version-specific configuration files, allowing its configuration to coexist with Prisma 8's `prisma.config.*` files:

```ts
// prisma7.config.ts
import { defineConfig } from '@prisma/prisma7/config'

export default defineConfig({
  schema: 'prisma/schema.prisma',
  migrations: {
    path: 'prisma/migrations',
  },
})
```

Without an explicit `--config` option, Prisma 7 searches for:

1. Root-level `prisma7.config.*` files.
2. `.config/prisma7.*` files.
3. Existing `prisma.config.*` files as a backwards-compatible fallback.

The supported extensions are `.js`, `.ts`, `.mjs`, `.cjs`, `.mts`, and `.cts`. An explicit config path always takes precedence:

```sh
npx prisma7 generate --config ./custom/prisma7.config.ts
```

New projects initialized by the Prisma 7 CLI use `prisma7.config.ts`. Existing projects containing only `prisma.config.*` continue to work without migration or additional warnings. If a `prisma7.config.*` file exists but cannot be loaded, Prisma reports the error rather than silently falling back to another configuration.

The `prisma7` identity is carried through CLI help, version output, shell completion, initialization, migration, database, and generation guidance. Stable Prisma concepts such as `schema.prisma`, Prisma Migrate, `@prisma/client`, and `PRISMA_*` environment variables remain unchanged.

Together, the separate executable and configuration namespace make it possible to operate Prisma 7 and Prisma 8 side by side without command or config-file collisions.

[#&#8203;29949](prisma/orm#29949), [#&#8203;29969](prisma/orm#29969), [#&#8203;29994](prisma/orm#29994), [#&#8203;30000](prisma/orm#30000), [#&#8203;30002](prisma/orm#30002), [#&#8203;30020](prisma/orm#30020)

##### Prisma Studio security hardening

Prisma Studio's local HTTP server now:

- Binds explicitly to `127.0.0.1` instead of all network interfaces.
- Rejects browser requests from origins other than the active `localhost` or `127.0.0.1` Studio URL.
- No longer returns wildcard CORS headers.
- Applies the same protections across Node.js, Bun, and Deno.

This prevents network clients or malicious websites from accessing Studio's database endpoints while Studio is running.

[#&#8203;29890](prisma/orm#29890)

##### Prisma Client

- Fixed `P2002` errors from nested writes so `meta.modelName` identifies the model where the unique constraint violation occurred, including models using `@@map` and `@@schema`. [#&#8203;29628](prisma/orm#29628)
- Fixed automatically batched `findUniqueOrThrow()` calls so every missing record rejects with `P2025`; later misses no longer resolve to `undefined`. [#&#8203;29654](prisma/orm#29654)
- Parameter-chunked statements are now executed atomically in a transaction and rolled back if a later chunk fails. [#&#8203;29771](prisma/orm#29771)
- Improved interactive transaction cleanup during `$disconnect()`, including transactions whose driver-level startup is still in progress. [#&#8203;28768](prisma/orm#28768)
- Prevented transaction cleanup failures after a timeout or backend termination from becoming unhandled promise rejections. [#&#8203;29611](prisma/orm#29611)
- Fixed fluent relation queries when relation fields are literally named `select` or `include`. [#&#8203;29683](prisma/orm#29683)
- Fixed handling of `Date` and `Uint8Array` values created in other JavaScript realms, such as iframes, jsdom, and Node.js `vm` contexts. [#&#8203;29177](prisma/orm#29177)
- Invalid `Date` values passed to `$queryRaw` or `$executeRaw` now throw `PrismaClientValidationError` instead of a generic error. [#&#8203;29718](prisma/orm#29718)
- Fixed `moduleFormat` inference for the `prisma-client` generator in TypeScript projects using `module: "node16"` or `"nodenext"`. Generated output now follows the nearest `package.json` `type`, defaulting to CommonJS when absent. [#&#8203;29712](prisma/orm#29712)
- Deserialized `Bytes` values now own standalone `ArrayBuffer`s rather than exposing unrelated contents from Node.js's shared `Buffer` pool. This applies to both regular and raw query results. [#&#8203;29701](prisma/orm#29701)
- Fixed an incorrect logging context in the remote executor, including Accelerate-backed query execution. [#&#8203;28892](prisma/orm#28892)

##### Client extensions and observability

- Result-extension `compute` callbacks now receive the current model name as a typed second argument:

  ```ts
  compute(data, modelName) {
    // ...
  }
  ```

  The model name is also preserved when multiple extensions compose the same computed field. [#&#8203;29782](prisma/orm#29782)

- Improved OpenTelemetry context for remotely executed queries:

  - `$on('query')` callbacks run within the matching `db_query` span.
  - Events from one operation share the same trace.
  - Error events are recorded as span exceptions.
  - Log events continue to be emitted when tracing is disabled or their reported span is unavailable.

  [#&#8203;28892](prisma/orm#28892)

##### Driver adapters

##### MariaDB

- `@prisma/adapter-mariadb` now accepts an existing `mariadb` pool. External pools remain caller-owned unless `disposeExternalPool: true` is supplied. [#&#8203;27992](prisma/orm#27992)
- Fixed pooled connection leaks during commit, rollback, and failed transaction startup. Connections are now returned with `release()` and transaction-specific listeners are removed before reuse. [#&#8203;29612](prisma/orm#29612)
- Added support for bracketed IPv6 addresses in both `mysql://` and `mariadb://` connection strings. [#&#8203;29026](prisma/orm#29026)
- Prevented malformed connection strings from exposing embedded passwords in retained debug output and diagnostic reports. [#&#8203;27992](prisma/orm#27992)

##### PostgreSQL, Neon, and Prisma Postgres Serverless

- PostgreSQL deadlocks using SQLSTATE `40P01` are now reported as `P2034` transaction write conflicts. [#&#8203;29717](prisma/orm#29717)
- PostgreSQL `RESTRICT` violations using SQLSTATE `23001` are now reported as `P2003`, preserving an available field or constraint name. [#&#8203;29554](prisma/orm#29554)
- `@prisma/adapter-pg` now preserves database constraint names when reporting unique constraint violations through `P2002`. [#&#8203;29587](prisma/orm#29587)
- Prisma Postgres Serverless now prefers the named constraint for `P2002`, falling back to parsed field names when no constraint name is available. [#&#8203;29801](prisma/orm#29801)
- Fixed Neon HTTP adapter serialization for typed parameters such as `Bytes` and `DateTime`. [#&#8203;29747](prisma/orm#29747)

##### SQLite

- `@prisma/adapter-better-sqlite3` now converts previously unhandled SQLite result codes into typed database errors instead of exposing raw driver errors.
- The complete `SQLITE_BUSY` family is now mapped to socket timeout errors, with numeric extended result codes preserved where available.

[#&#8203;29794](prisma/orm#29794)

##### CLI and Migrate

- `prisma generate` can now offer to install Prisma's agent skills. The opt-in prompt:

  - Is shown at most once per machine.
  - Is skipped in CI, containers, Git hooks, npm lifecycle scripts, and watch mode.
  - Is skipped when `--no-hints` is used or Prisma skills are already installed.
  - Times out after 30 seconds.
  - Never causes generation to fail if installation is unsuccessful.

  [#&#8203;29690](prisma/orm#29690)

- A globally installed CLI now warns during `prisma generate` when its version differs from the project's local `prisma` or `@prisma/client`, and recommends running the local CLI. The check is best-effort and does not fail generation. [#&#8203;29593](prisma/orm#29593)

- `prisma version` and `prisma version --json` now include the resolved Prisma CLI package path, making global-versus-local installation issues easier to diagnose. [#&#8203;29573](prisma/orm#29573)

- Empty or generator-only schema files now report `Schema must contain a datasource block` from `db pull`, `db push`, and `migrate dev`, rather than reaching the schema engine and potentially producing inconsistent errors. [#&#8203;29657](prisma/orm#29657)

- CLI commands now tolerate corrupt, unreadable, or unwritable command-state files. Invalid state is reinitialized, writes are atomic, and persistence failures fall back to in-memory state. [#&#8203;29609](prisma/orm#29609)

- Studio now recognizes semicolon-delimited `sqlserver://` connection strings before reporting the existing explicit message that SQL Server is not supported by Studio. [#&#8203;29623](prisma/orm#29623)

- The AI-agent safety checkpoint now also covers interactive `prisma db push` confirmations involving data-loss warnings, rather than only invocations using `--accept-data-loss`. [#&#8203;29793](prisma/orm#29793)

##### Performance and reliability

- Optimized query-plan execution by eagerly evaluating plans with one unconditional database operation and synchronously interpreting the remaining pure plan. Cached plans remain immutable. [#&#8203;29004](prisma/orm#29004)
- Prevented call-stack overflows when rendering very large parameter lists or combining chunked results containing hundreds of thousands of rows. [#&#8203;29751](prisma/orm#29751)
- Reduced ordinary query setup overhead by constructing fluent-relation field maps lazily and in linear time. Non-fluent queries no longer build this map. [#&#8203;29752](prisma/orm#29752)

##### Dependencies

- Updated the transitive `fast-uri` dependency to a patched release addressing production audit advisories affecting versions through `3.1.3`. [#&#8203;29758](prisma/orm#29758)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMC4zIiwidXBkYXRlZEluVmVyIjoiNDQuMzAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Server/pulls/41
@github-actions github-actions Bot mentioned this pull request Sep 8, 2026
chore(deps): update prisma monorepo to v7.10.0 victoraugustoas/finance-manager#126
Merged
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tensordreams tensordreams tensordreams left review comments
@aqrln aqrln aqrln approved these changes
@coderabbitai coderabbitai[bot] coderabbitai[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

adapter-pg: mapDriverError drops error.constraint for 23505 but uses it for 23503

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@DanielChernov7 @CLAassistant @aqrln @tensordreams
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.