# Prisma ORM structured error registry — harvested verbatim from the provider docs. generated: '2026-09-17' method: searched source: https://www.prisma.io/docs/orm/reference/error-reference api: Prisma ORM (client, CLI, migrations, drivers) scheme: dotted NAMESPACE.SUBCODE structured error envelopes (ADR 239) note: Prisma ORM errors are structured envelopes, not HTTP problem documents. Each carries message and optionally why, fix, where, cause, docsUrl and a structured payload on error.meta or error.details. Match programmatically with isStructuredError from the facade package's utils/structured-error subpath and compare error.code -- never instanceof. The legacy P-numbered codes (P1001/P2002/P6009 and friends) were renamed at 0.16; ADR 239 carries the old->new crosswalk. This registry is generated in the prisma/prisma repository and its CI requires every code in production source to be documented before it ships. envelope_fields: - message - why - fix - where - cause - docsUrl - meta - details exit_codes: '1': internal error (a bug) '2': expected structured failure '3': user abort 4-99: completed with findings; per-command documented code (db verify, db sign, migration check, orm init) namespaces: - namespace: BUDGET code_count: 2 - namespace: CLI code_count: 30 - namespace: CONFIG code_count: 10 - namespace: CONTRACT code_count: 64 - namespace: DRIVER code_count: 4 - namespace: LINT code_count: 5 - namespace: MIGRATION code_count: 97 - namespace: ORM code_count: 28 - namespace: PARADEDB code_count: 1 - namespace: PLAN code_count: 2 - namespace: POSTGIS code_count: 1 - namespace: PSL code_count: 24 - namespace: RUNTIME code_count: 50 - namespace: SUPABASE code_count: 2 - namespace: TESTKIT code_count: 3 code_count: 323 codes: - code: CONFIG.CONTRACT_MISSING namespace: CONFIG meaning: 'The `contract` section is missing (or incomplete) in `prisma.config.ts` when a command needs it — raised by `prisma contract emit` when the config has no contract configuration, no schema path, or the referenced authoring entrypoint cannot be resolved. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.CONTRACT_MISSING - code: CONFIG.DB_CONNECTION_REQUIRED namespace: CONFIG meaning: 'A DB-connected command (`migrate`, `db init`, `db sign`, `db verify`, `db update`, `inspect-live-schema`, and the migration scaffold commands) was run with no database connection available — no `--db ` flag and no `db.connection` in `prisma.config.ts`. The fix text names the exact retry command when known. Payload: `missingFlags` (optional).' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.DB_CONNECTION_REQUIRED - code: CONFIG.DRIVER_REQUIRED namespace: CONFIG meaning: 'A DB-connected command was run but `prisma.config.ts` has no control-plane `driver` entry (e.g. `driver: postgresDriver`). Raised by the migration command scaffold, `migrate`, `db sign`, `db verify`, and `inspect-live-schema`. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.DRIVER_REQUIRED - code: CONFIG.EVALUATION_FAILED namespace: CONFIG meaning: The config module could not be evaluated at all — a syntax error in `prisma.config.ts`, or the module threw during import. Raised by the config loader for any command that needs config; loading fails outright (no per-section diagnostics are possible for a module that does not evaluate) and every command exits `2` with this error. The underlying evaluation error's message is carried in `why` and th docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.EVALUATION_FAILED - code: CONFIG.FAMILY_READ_MARKER_REQUIRED namespace: CONFIG meaning: 'Reserved: `db verify` needs the family package to export `verify.readMarker()` and it is absent. Declared in the shared error factories but not raised by any command today.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.FAMILY_READ_MARKER_REQUIRED - code: CONFIG.FILE_NOT_FOUND namespace: CONFIG meaning: 'No `prisma.config.ts` (or the explicitly passed config path) could be found when loading configuration — raised by the config loader for any command that needs config. The fix is to run `prisma orm init` to create one. The path, when known, is carried in `where.path`. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.FILE_NOT_FOUND - code: CONFIG.MISSING_EXTENSION_PACKS namespace: CONFIG meaning: 'The contract declares extension packs that the CLI config does not provide matching descriptors for; raised when resolving framework components for any command that loads the contract. The fix is to add the missing extension descriptors to `extensions` in `prisma.config.ts`. Payload: `missingExtensionPacks`, `providedComponentIds`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.MISSING_EXTENSION_PACKS - code: CONFIG.QUERY_RUNNER_FACTORY_REQUIRED namespace: CONFIG meaning: 'Reserved: `db verify` needs `db.queryRunnerFactory` in `prisma.config.ts` and it is absent. Declared in the shared error factories but not raised by any command today.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.QUERY_RUNNER_FACTORY_REQUIRED - code: CONFIG.VALIDATION_FAILED namespace: CONFIG meaning: '`prisma.config.ts` loaded but a config section is missing or malformed. The config loader validates the evaluated config and returns one diagnostic per problem, each tagged with the top-level config section it concerns (`meta.section`: `family`, `target`, `adapter`, `driver`, `extensions`, `db`, `contract`, `migrations`, or `formatter`); a command fails with the diagnostic (exit `2`) only when it ' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.VALIDATION_FAILED - code: CONFIG.VERSION_MARKER_MISSING namespace: CONFIG meaning: The config module evaluated, but its default export was not created by the current `defineConfig` — a plain object export, a spread copy of a `defineConfig` result, or a config produced by a different `defineConfig` (for example a classic Prisma ORM 7 config file). Raised by the config loader before validation; loading fails outright and every command exits `2` with this error. The fix is to creat docs: https://www.prisma.io/docs/orm/reference/error-reference#CONFIG.VERSION_MARKER_MISSING - code: CLI.CONFIG_ARG_MISSING_PATH namespace: CLI meaning: 'The migration-file CLI (`prisma migration`) received `--config` without a path argument — either a bare trailing `--config`, or `--config` immediately followed by another flag (e.g. `--config --dry-run`). The CLI fails fast instead of consuming the next flag as the config path or silently falling back to default config discovery. Payload: `nextToken` (present only when another flag followed `--con' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.CONFIG_ARG_MISSING_PATH - code: CLI.CONSENT_OPERATIONS_MISSING namespace: CLI meaning: '`db update` was told the plan is destructive but was given no operations to name, so the consent prompt would have asked you to authorise a list of nothing. The command refuses instead of prompting. This is an inconsistency between the CLI and the control API rather than something your project can be wrong about; run `prisma db update --dry-run` to see the plan, and report the run. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.CONSENT_OPERATIONS_MISSING - code: CLI.CONSENT_TOKEN_UNRESOLVED namespace: CLI meaning: '`db update` could not derive a name for the database it is about to change, so there is nothing for the consent prompt to ask you to type — and an empty token would let a bare Enter (or `--confirm ""`) authorise data loss. The name comes from the `database` a driver connection object carries, or from the connection URL (its first path segment, else its host), falling back to the target id. Name th' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.CONSENT_TOKEN_UNRESOLVED - code: CLI.CONTRACT_ARG_CONFLICT namespace: CLI meaning: '`prisma db sign` was given a contract reference twice — once as the positional argument and once as `--contract` — and there is no rule for which one wins. Pass it once. Payload: `positional`, `flag`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.CONTRACT_ARG_CONFLICT - code: CLI.ADVANCE_REF_ARG_CONFLICT namespace: CLI meaning: '`prisma db sign` was told both which ref to advance (`--advance-ref `) and not to advance any ref (`--no-advance-ref`), and there is no rule for which one wins. Pass one of them. Payload: `advanceRef`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.ADVANCE_REF_ARG_CONFLICT - code: CLI.FILE_NOT_FOUND namespace: CLI meaning: 'A file the command needs does not exist at the given path. Produced by several commands: the migration command scaffold, `migrate`, `migration plan`, `migration show`, `db sign`, `db update`, `db verify`, and `ref` all raise it when the emitted `contract.json` (or another required file) is missing from the expected location. Most sites carry the path in `where.path`; the `migration new` contract-f' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.FILE_NOT_FOUND - code: CLI.FILE_WRITE_FAILED namespace: CLI meaning: 'Writing a file failed — currently raised when `format` cannot write the formatted PSL source back to disk (e.g. the file is not writable). The underlying failure is attached as `cause`. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.FILE_WRITE_FAILED - code: CLI.INIT_AUTHORING_SCHEMA_PATH_MISMATCH namespace: CLI meaning: 'During `prisma orm init`, `--authoring` and `--schema-path` disagree on file extension — for example `--authoring psl` with a schema path ending in `.ts`. Raised before any scaffold files are written, so the project tree stays untouched. Payload: `authoring`, `schemaPath`, `actualExtension`, `expectedExtension`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_AUTHORING_SCHEMA_PATH_MISMATCH - code: CLI.INIT_EMIT_FAILED namespace: CLI meaning: 'During `prisma orm init`, the `prisma contract emit` step failed after a successful dependency install. Scaffolded files and installed dependencies remain on disk; the user fixes the contract file and re-runs the emit command. `init` completes with this as a finding and exits 5. Payload: `filesWritten`, `cause`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_EMIT_FAILED - code: CLI.INIT_INSTALL_FAILED namespace: CLI meaning: 'During `prisma orm init`, dependency installation failed and the pnpm-to-npm fallback either did not apply or also failed. Files scaffolded before the install step are already on disk; the next actions carry the install command that was attempted and the emit that was waiting on it. `init` completes with this as a finding and exits 4. Payload: `filesWritten`, plus `install` (the attempted command,' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_INSTALL_FAILED - code: CLI.INIT_INVALID_FLAG_VALUE namespace: CLI meaning: 'A flag passed to `prisma orm init` has a value outside its allowed set (for example `--target` with something other than `postgres` or `mongodb`). Maps to init exit code 2 (PRECONDITION). Payload: `flag`, `value`, `allowed`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_INVALID_FLAG_VALUE - code: CLI.INIT_INVALID_MANIFEST namespace: CLI meaning: '`prisma orm init` could not parse the project''s `package.json` as JSON. Init reads the manifest to merge scripts and to skip `@types/node` when already declared, so a malformed file is a hard precondition failure the user can fix and re-run. Maps to init exit code 2 (PRECONDITION). Payload: `path`, `cause`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_INVALID_MANIFEST - code: CLI.INIT_INVALID_OUTPUT_DOCUMENT namespace: CLI meaning: '`prisma orm init` completed but its own success output document failed schema validation. This indicates a bug in Prisma ORM itself, not user error. The engine-hosted `init` settles it as an errored envelope at exit 2 (the commander `init`, deleted in the S5 cutover, mapped it to exit 1), because the ORM''s error boundary converts every failure into a structured settlement and the engine reserves e' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_INVALID_OUTPUT_DOCUMENT - code: CLI.INIT_INVALID_TSCONFIG namespace: CLI meaning: '`prisma orm init` could not parse the project''s existing `tsconfig.json`, even with JSONC tolerance (comments and trailing commas). Init merges required compiler options into it, so an unreadable file blocks the run; raised before any scaffold file is written. Maps to init exit code 2 (PRECONDITION). Payload: `path`, `cause`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_INVALID_TSCONFIG - code: CLI.INIT_MISSING_FLAGS namespace: CLI meaning: '`prisma orm init` ran non-interactively (e.g. `--yes`, or stdin is not a TTY) but one or more required inputs (`--target`, `--authoring`, `--schema-path`) were not supplied as flags. Every missing flag is listed so scripts and agents can react without parsing English. Maps to init exit code 2 (PRECONDITION). Payload: `missingFlags`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_MISSING_FLAGS - code: CLI.INIT_PROBE_FAILED namespace: CLI meaning: '`prisma orm init --probe-db --strict-probe` was run and the database probe could not complete (no `DATABASE_URL`, network or auth error, driver not installed). Without `--strict-probe` these surface as warnings; strict mode escalates them to fatal. Scaffolded files are already on disk when this fires. Maps to init exit code 2 (PRECONDITION). Payload: `filesWritten`, `cause`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_PROBE_FAILED - code: CLI.INIT_REINIT_NEEDS_FORCE namespace: CLI meaning: '`prisma orm init` ran non-interactively in a directory that already has a `prisma.config.ts`, and consent to overwrite the existing scaffold was not given. Re-scaffolding is destructive, so it needs explicit consent: interactively, `init` asks the user to type the working directory''s name back; non-interactively, the same consent is granted by `--confirm `. Neither `--yes` nor any ' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_REINIT_NEEDS_FORCE - code: CLI.INIT_SKILL_INSTALL_FAILED namespace: CLI meaning: 'Retired. `prisma orm init` used to fetch the agent skills from GitHub with `skills add`, and raised this at exit `6` when that fetch failed. The skills now ship inside the `@prisma/orm-*` packages a project installs, and `orm init` no longer touches them at all: skills setup belongs to the family-level `prisma init` command, and `prisma skills sync` copies the skills out of the installed packages ' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_SKILL_INSTALL_FAILED - code: CLI.INIT_STRICT_PROBE_WITHOUT_PROBE namespace: CLI meaning: '`prisma orm init --strict-probe` was supplied without `--probe-db`. Init is offline-by-default, so no probe runs without `--probe-db`; rather than silently ignoring the strict flag, init errors and tells the user to add `--probe-db` or drop `--strict-probe`. Maps to init exit code 2 (PRECONDITION). Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_STRICT_PROBE_WITHOUT_PROBE - code: CLI.INIT_USER_ABORTED namespace: CLI meaning: 'The user cancelled an interactive `prisma orm init` prompt (Ctrl-C, escape, or declining a selection) before all required inputs were supplied. No files were modified. Severity is `info`, not `error`; maps to init exit code 3 (USER_ABORTED). Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_USER_ABORTED - code: CLI.INIT_WRITE_FAILED namespace: CLI meaning: '`prisma orm init` could not write one of the files it scaffolds — a directory sitting where the file goes, permissions, a full disk. Everything that can be read and parsed is checked before the first write, so this is the failure that survives that check; the files written before it are already on disk and are listed so a follow-up run or agent knows the state it is resuming from. Maps to init exi' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INIT_WRITE_FAILED - code: CLI.INVALID_OUTPUT_FORMAT namespace: CLI meaning: 'The main CLI received a `--format` value other than `pretty` or `json`. Raised during global-flag resolution, before any command logic runs. Payload: `value`, `allowed`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INVALID_OUTPUT_FORMAT - code: CLI.INVALID_VERIFY_MODE namespace: CLI meaning: '`prisma db verify` was given a contradictory mode combination: `--marker-only` together with `--schema-only`, or `--strict` together with `--marker-only` (strict requires schema verification, which marker-only skips). Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.INVALID_VERIFY_MODE - code: CLI.JSON_FORMAT_UNSUPPORTED namespace: CLI meaning: 'Reserved: a command was asked for a `--json` sub-format it does not support; the error lists the formats the command does accept. Declared in the shared error factories but not raised by any command today. Payload: `command`, `format`, `supportedFormats`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.JSON_FORMAT_UNSUPPORTED - code: CLI.OUTPUT_FORMAT_CONFLICT namespace: CLI meaning: 'The main CLI received mutually exclusive output flags: `--format pretty` together with `--json`. Use `--format json` or `--json` alone for JSON output. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.OUTPUT_FORMAT_CONFLICT - code: CLI.PROJECT_MANIFEST_INVALID namespace: CLI meaning: 'A `package.json` found while resolving the project import root is not valid JSON, or parses to something other than a JSON object. Emission reads the nearest manifest to decide which package names generated files should import; fix the manifest''s JSON and re-run. The parse failure (when there is one) is attached as `cause`. Payload: `path`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.PROJECT_MANIFEST_INVALID - code: CLI.PROJECT_MANIFEST_UNREADABLE namespace: CLI meaning: 'A `package.json` found while resolving the project import root exists but could not be read (e.g. a permissions failure). Absent manifests continue the walk up; a read failure stops it, because silently skipping would emit against the wrong project''s dependencies. The read failure is attached as `cause`. Payload: `path`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.PROJECT_MANIFEST_UNREADABLE - code: CLI.PROMPT_REQUIRED namespace: CLI meaning: 'Raised by `@prisma/cli-engine`, not by this repository: a command asked a question that has no default, and the session could not show it — stdin is not a terminal, `--no-interactive` was passed, or `--yes` was asked to answer a prompt that declares no default. The `CLI` namespace is shared with the engine (see ADR 239); it is listed here because it settles runs of the ORM''s commands. `prisma orm ' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.PROMPT_REQUIRED - code: CLI.UNEXPECTED namespace: CLI meaning: 'Catch-all for an unanticipated failure inside a CLI command — an unclassified exception is wrapped in this envelope with the original message as the `why`. Thrown across nearly every command (migrate, db init/sign/update/verify, migration plan/new/show/status/log, contract emit, ref, inspect-live-schema, config loading). Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.UNEXPECTED - code: CLI.UNKNOWN_FLAG namespace: CLI meaning: 'The migration-file CLI (`prisma migration`) received a flag it does not recognise; wraps clipanion''s unknown-syntax error at the parser boundary so consumers can build "did you mean" suggestions from meta instead of parsing the message. Payload: `flag`, `knownFlags`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CLI.UNKNOWN_FLAG - code: CONTRACT.ARGUMENT_INVALID namespace: CONTRACT meaning: 'A builder or helper on the contract-authoring surface is called with a bad argument: a composed authoring helper receives too many arguments or a malformed trailing options object, `field.sql({ id })` / `field.sql({ unique })` is used without a matching inline `.id(...)` / `.unique(...)` declaration, `model("Name", ...)` is called without a model definition, a nanoid ID generator is given a size o' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ARGUMENT_INVALID - code: CONTRACT.AGGREGATE_DESCRIPTOR_AMBIGUOUS namespace: CONTRACT meaning: 'The SQL emitter cannot name one result type for an aggregate: two trait-matching aggregate descriptors both claim a contributed codec, or a descriptor whose result reuses its input''s codec also answers calls that carry no input. Raised while generating `contract.d.ts`, so the emitted types can never disagree with what the runtime registry resolves. Payload: `operation`; plus `codecId` and `traits`' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.AGGREGATE_DESCRIPTOR_AMBIGUOUS - code: CONTRACT.AGGREGATE_DESCRIPTOR_DUPLICATE namespace: CONTRACT meaning: Two composed components contribute an aggregate descriptor for the same `(operation, input)` overload — keyed as `sum:trait:numeric`, `sum:codec:pg/int8@1`, or `count:none`. Each overload resolves to exactly one result codec, so exactly one target, adapter, or extension may claim it. Raised while the control stack collects contributions (e.g. during `contract emit`); the runtime plane enforces the docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.AGGREGATE_DESCRIPTOR_DUPLICATE - code: CONTRACT.AGGREGATE_DESCRIPTOR_INVALID namespace: CONTRACT meaning: 'A composed component contributes an aggregate descriptor whose shape the framework cannot read: a missing or empty `operation`, an `input` match that is not `none` / `any` / `codec` / `trait`, an `output` that is not `self` / `codec`, a non-boolean `nullable`, a `nullable: false` descriptor with no `emptyResultJson` (a non-nullable result must declare the value it answers with over no result row),' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.AGGREGATE_DESCRIPTOR_INVALID - code: CONTRACT.AGGREGATE_OUTPUT_CODEC_MISSING namespace: CONTRACT meaning: 'The SQL emitter is asked to emit an aggregate result row whose declared result codec the composed stack does not contribute — the emitted type would name a codec absent from the contract''s codec map, and every consumer reading it would resolve `never`. Contribute the codec, or declare a result codec the stack contributes. Raised while generating `contract.d.ts`. Payload: `operation`, `outputCodecI' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.AGGREGATE_OUTPUT_CODEC_MISSING - code: CONTRACT.CODEC_DESCRIPTOR_MISSING namespace: CONTRACT meaning: 'The control plane resolves a codec referenced by the contract (a `CodecRef.codecId`) against the contract''s pack stack and finds no registered codec descriptor for that id. Hit during control-plane operations (emit, migration tooling) when a contract references a codec no composed pack provides. Payload: `codecId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.CODEC_DESCRIPTOR_MISSING - code: CONTRACT.CHECK_NAME_RESERVED namespace: CONTRACT meaning: An authored `@@check` / `check()`'s `name:` prefix matches the shape a derived enforcement check would use for a column of the same table (`__check` or `
__elem_not_null`), so it cannot be told apart from a derived check once a non-`managed` table strips those. The message and `collidingColumns` meta name the column(s) whose derived-check shape the prefix matches. Rais docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.CHECK_NAME_RESERVED - code: CONTRACT.CHECK_ON_STI_VARIANT namespace: CONTRACT meaning: A model declares `@@check` / `check()` but is a single-table-inheritance variant (`@@base` with no own `@@map`), so it shares its base model's storage table and has no table of its own to declare the check on. Raised while building a SQL contract, as a backstop for the TS authoring path — the PSL surface refuses this earlier, at interpretation, with a span-anchored `PSL_CHECK_ON_STI_VARIANT` diagn docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.CHECK_ON_STI_VARIANT - code: CONTRACT.CHECK_OPTOUT_INVALID namespace: CONTRACT meaning: 'A `@noCheck` / `.noCheck(...)` declaration is invalid. Either it does not apply to the column — the named kind is not derivable for the column''s shape (`membership` on a column with no domain-enum value set, `elementNotNull` on a column that is not a list of scalars), or the bare form waives nothing because the column derives no generated checks — or the declaration is malformed: a kind is named t' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.CHECK_OPTOUT_INVALID - code: CONTRACT.COLLECTION_INVALID namespace: CONTRACT meaning: 'A Mongo model''s collection attachment is wrong: the model declares `indexes`, `collectionOptions`, or `controlPolicy` but has no collection, or a single collection has `collectionOptions` / `controlPolicy` declared by more than one model. Raised by the Mongo `defineContract` builder. Payload: `modelName`, `collection`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.COLLECTION_INVALID - code: CONTRACT.CONSTRAINT_INVALID namespace: CONTRACT meaning: 'A model declares an empty unique constraint (a unique with no fields), raised during SQL contract lowering (meta: `modelName`). Also raised when a CHECK constraint reaches SQLite migration DDL rendering — the SQLite target does not support CHECK constraints, and `sql.checkConstraint` is a Postgres-only capability. A `@@check` is refused earlier, by the PSL capability gate; a `check()` declared thr' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.CONSTRAINT_INVALID - code: CONTRACT.DEFAULT_INVALID namespace: CONTRACT meaning: 'A field''s default declaration is invalid: `defaultSql` is used on an enum field, a field declares both `default` and `executionDefaults`, or a field is nullable while carrying `executionDefaults`. Raised while authoring/building a SQL contract. Payload: `modelName`, `fieldName`, `reason`. Also raised by the Postgres adapter''s DDL renderer when a hand-authored `col(...)` pairs an `autoincrement()` ' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.DEFAULT_INVALID - code: CONTRACT.ENTITY_KIND_INVALID namespace: CONTRACT meaning: 'An entity attached to the contract declares a framework-wire namespace entry kind (`table` or `valueSet`), which only the framework itself may mint. Raised while building a SQL contract with pack-contributed entities. Payload: `entityKind`, `namespaceId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ENTITY_KIND_INVALID - code: CONTRACT.ENTITY_KIND_UNKNOWN namespace: CONTRACT meaning: 'An entity handle passed to the contract has an `entityKind` that no composed pack registers, so the builder cannot lower it — or contract entries carry a kind no composed pack recognizes when the framework hydrates entities from an emitted contract. Raised during SQL contract lowering and entity hydration. Payload: `entityKind`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ENTITY_KIND_UNKNOWN - code: CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK namespace: CONTRACT meaning: 'An enum declares a `codecId` that no family, target, or extension pack in the contract provides, so its member values cannot be encoded. Raised by both authoring paths (TS `defineContract` and PSL interpretation) when the codec lookup built from the contract''s packs has no descriptor for the id. Payload: `codecId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK - code: CONTRACT.ENUM_INVALID namespace: CONTRACT meaning: 'An enum declaration is malformed: it has no members, a duplicate member name or value, or the declaration key in `defineContract({ enums })` does not match the `enumType` name. Raised while authoring a contract (framework `enumType`, SQL and Mongo builders). Payload: `enumName`, `member`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ENUM_INVALID - code: CONTRACT.ENUM_UNKNOWN namespace: CONTRACT meaning: 'A Mongo field references an enum that is not declared in `defineContract({ enums })`. Raised by the Mongo contract builder. Payload: `modelName`, `fieldName`, `enumName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ENUM_UNKNOWN - code: CONTRACT.EXPORT_INVALID namespace: CONTRACT meaning: 'The TS contract module''s export is not a plain JSON-serializable contract object: a non-object export, circular references, getters, or function-valued properties. Raised by the CLI while loading a TypeScript contract source. Payload: `path`, `reason`, `key`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.EXPORT_INVALID - code: CONTRACT.FIELD_UNKNOWN namespace: CONTRACT meaning: 'An index or column mapping references a field the model does not declare (unknown field in the contract definition, or a Mongo model index over an undeclared field). Raised while lowering/building the contract. Payload: `modelName`, `fieldName`, `indexSignature`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.FIELD_UNKNOWN - code: CONTRACT.FOREIGN_KEY_INVALID namespace: CONTRACT meaning: 'A foreign key''s target refs are empty or inconsistent: no target ref given, refs point at different models, or compound refs disagree on `spaceId`, `namespaceId`, or `tableName`. Raised by the SQL contract DSL while declaring the FK. Payload: `mismatch`, `first`, `second`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.FOREIGN_KEY_INVALID - code: CONTRACT.IDENTITY_INVALID namespace: CONTRACT meaning: 'A model''s identity is wrong: multiple fields marked `.id()`, identity declared both inline and in `.attributes(...)`, an empty identity, a model with non-owning relations but no id to anchor them, or an M:N target with no primary/unique key to derive junction columns from. Raised while lowering/building a SQL contract. Payload: `modelName`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.IDENTITY_INVALID - code: CONTRACT.IDENTIFIER_INVALID namespace: CONTRACT meaning: 'A SQL identifier or literal fails escaping-safety checks while rendering DDL/SQL: an empty identifier, a null byte in an identifier or string literal, or a native enum label exceeding PostgreSQL''s 63-byte limit. Raised by the Postgres and SQLite SQL utilities (formerly the `SqlEscapeError` class, removed at 0.17). Payload: `value`, `context`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.IDENTIFIER_INVALID - code: CONTRACT.INDEX_INVALID namespace: CONTRACT meaning: 'A Mongo variant model declares an index that conflicts with the discriminator scope of its variant, or a SQL index option value is not a string, finite number, or boolean. Raised by the Mongo contract builder and the Postgres index DDL renderer. Payload: `variantName`, `indexLabel`, `reason`, `key`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.INDEX_INVALID - code: CONTRACT.INFER_UNSUPPORTED namespace: CONTRACT meaning: '`contract infer` is not available: either the configured family does not implement the `PslContractInferCapable` capability (no meta at that site), or the family supports inference but the database shape cannot be expressed yet — duplicate table names across schemas, a column typed by a native enum that an extension pack space already describes in another schema, or native enum adoption with conte' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.INFER_UNSUPPORTED - code: CONTRACT.INTROSPECTION_UNSUPPORTED namespace: CONTRACT meaning: 'Introspection read an unrecognized or malformed database shape — an unknown referential action rule, or a malformed index reloption entry. Raised by the Postgres and SQLite control adapters. Payload: `rule`, `entry`, `indexName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.INTROSPECTION_UNSUPPORTED - code: CONTRACT.MARKER_MISMATCH namespace: CONTRACT meaning: 'The contract hash does not match the marker (signature) stored in the database. `db verify` reports it as an `error` diagnostic on a completed run that exits `4`; the SQL runtime reports it as a warning during startup marker verification. Fix path: migrate the database or re-sign if the divergence is intentional. Payload: `expected`, `actual`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MARKER_MISMATCH - code: CONTRACT.MARKER_MISSING namespace: CONTRACT meaning: 'No contract marker (database signature) is found in the database at all. `db verify` reports it as an `error` diagnostic on a completed run that exits `4`; the runtime reports it as a warning during startup marker verification. Fix path: `prisma db sign`. Payload: none notable.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MARKER_MISSING - code: CONTRACT.MARKER_READ_FAILED namespace: CONTRACT meaning: 'A driver-level failure occurred while reading the contract marker table — connectivity, permissions, or locking problems rather than bad marker content. Raised whenever a CLI/control operation reads the marker. Payload: `space`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MARKER_READ_FAILED - code: CONTRACT.MARKER_REQUIRED namespace: CONTRACT meaning: A command that requires a pre-signed database (marker present) as a precondition found none; also the default failure code stamped onto a non-ok verify result when no more specific code applies, which is how `db verify --strict` reports a database holding elements no contract declares. On `db verify` it is an `error` diagnostic on a completed run that exits `4`; everywhere else it is a preconditio docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MARKER_REQUIRED - code: CONTRACT.MARKER_ROW_CORRUPT namespace: CONTRACT meaning: 'The marker row exists but its column values fail schema validation — the row is corrupt or written by an incompatible version. Fix path: delete the row and re-sign with `prisma db sign`. Payload: `space`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MARKER_ROW_CORRUPT - code: CONTRACT.MODEL_BASE_MISSING namespace: CONTRACT meaning: 'A variant model names a `base` that is not a model in the contract, so its type in `contract.d.ts` cannot include the base''s fields. Raised while emitting `contract.d.ts`. Payload: `variant`, `base`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_BASE_MISSING - code: CONTRACT.MODEL_RELATION_TARGET_MISSING namespace: CONTRACT meaning: 'A same-space relation points at a model the contract does not declare. Raised while emitting the `Models` namespace in `contract.d.ts`; only cross-space relations may reference models outside the contract. Payload: `owner`, `relationName`, `target` (`namespaceId`, `modelName`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_RELATION_TARGET_MISSING - code: CONTRACT.MODEL_TOKEN_INVALID namespace: CONTRACT meaning: 'A model token is misused in the TS authoring DSL: an unnamed token is used in `.ref(...)` or as a relation target (tokens need `model("Name", ...)`), or a token is assigned under a `models` key that does not match its name. Payload: `tokenModelName`, `assignedKey`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_TOKEN_INVALID - code: CONTRACT.MODEL_TYPE_NAME_COLLISION namespace: CONTRACT meaning: 'Two models produce the same emitted type name in the `Models` namespace of `contract.d.ts`, formed as `_`, for example a `public_User` model beside a `public` namespace holding `User`, or a model named `AnyTask` beside a polymorphic base `Task`. Raised while emitting `contract.d.ts`. Payload: `memberName`, `sources`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_TYPE_NAME_COLLISION - code: CONTRACT.MODEL_TYPE_NAME_INVALID namespace: CONTRACT meaning: 'An emitted model type name, formed as `_`, is not a TypeScript identifier, for example because the namespace contains a hyphen. Raised while emitting `contract.d.ts`. Payload: `memberName`, `source`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_TYPE_NAME_INVALID - code: CONTRACT.MODEL_UNKNOWN namespace: CONTRACT meaning: 'A relation, foreign key, junction (`through`) reference, or context declaration names a model that is not declared in the contract. Raised while lowering/building a SQL contract. Payload: `sourceModel`, `relationName`, `targetModel`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_UNKNOWN - code: CONTRACT.MODEL_VARIANT_MISSING namespace: CONTRACT meaning: 'A polymorphic base names a variant that is not a model in the same namespace, so the `Any` union in `contract.d.ts` cannot be formed. Raised while emitting `contract.d.ts`. Payload: `base`, `variantName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODEL_VARIANT_MISSING - code: CONTRACT.MODULE_EXPORT_MISSING namespace: CONTRACT meaning: 'The contract module at the configured path loads but exposes neither a `default` nor a `contract` export, so the CLI cannot obtain the contract from it. Raised when resolving a TS contract from config (SQL and Mongo). Payload: `path`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.MODULE_EXPORT_MISSING - code: CONTRACT.NAME_DUPLICATE namespace: CONTRACT meaning: 'Two declarations claim the same name: duplicate namespace entries, model names, value objects, relations, tables (two models mapping to one table, or duplicate table in a namespace), column mappings (two fields to one column), indexes, value-sets (enum and pack entity minting the same value-set), or pack entities of the same kind and name in one namespace. Raised while authoring/building a contrac' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.NAME_DUPLICATE - code: CONTRACT.NAMESPACE_INVALID namespace: CONTRACT meaning: 'A namespace name is empty, whitespace-only, or a reserved sentinel (`__unbound__`, `__unspecified__`, or Postgres''s reserved `unbound`), either in the declared `namespaces` list or on a model. Raised by the SQL contract builder. Payload: `namespace`, `reason`, `modelKey`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.NAMESPACE_INVALID - code: CONTRACT.NAMESPACE_UNKNOWN namespace: CONTRACT meaning: 'A model references a namespace that is not in the contract''s declared `namespaces` list. Raised by the SQL contract builder. Payload: `modelKey`, `namespace`, `declared`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.NAMESPACE_UNKNOWN - code: CONTRACT.NAMESPACE_UNSUPPORTED namespace: CONTRACT meaning: 'Namespaces are declared (contract-level list or a model-level `namespace`) on a target that has no schema/namespace concept, i.e. SQLite. Raised by the SQL contract builder. Payload: `namespaces`, `modelKey`, `targetId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.NAMESPACE_UNSUPPORTED - code: CONTRACT.NATIVE_TYPE_INVALID namespace: CONTRACT meaning: 'A native type name in the contract fails the identifier-safety pattern required to render it into DDL. Raised by the Postgres and SQLite migration planners while building column DDL. Payload: `nativeType`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.NATIVE_TYPE_INVALID - code: CONTRACT.PACK_CONTRIBUTION_INVALID namespace: CONTRACT meaning: 'A composed pack''s contribution is malformed or collides with another contribution — this is the extension-author-facing bucket. Covers: entity types colliding with reserved helper keys, duplicate entity kinds or index-type registrations, a registered entity kind with no `lowerEntityHandles` lowering, an invalid `indexTypes` shape, entries-slot collisions between a model attribute and a block entry' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.PACK_CONTRIBUTION_INVALID - code: CONTRACT.PACK_FAMILY_MISMATCH namespace: CONTRACT meaning: 'A pack passed to `defineContract` belongs to the wrong family: a non-SQL pack in a SQL contract (or non-Mongo in a Mongo contract), a target pack whose family disagrees with the contract''s, or an extension pack from another family. Payload: `packId`, `packFamilyId`, `contractFamilyId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.PACK_FAMILY_MISMATCH - code: CONTRACT.PACK_MISSING namespace: CONTRACT meaning: 'A cross-space reference names a contract space that is not declared in the contract''s `extensions`, so the space cannot be resolved. Raised during SQL contract lowering. Payload: `spaceId`, `context`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.PACK_MISSING - code: CONTRACT.PACK_REF_INVALID namespace: CONTRACT meaning: 'Something other than an extension pack reference was passed in `defineContract`''s `extensions` list (e.g. a family or target pack). Payload: `packId`, `kind`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.PACK_REF_INVALID - code: CONTRACT.PACK_TARGET_MISMATCH namespace: CONTRACT meaning: 'An extension pack targets a different database target than the contract does (e.g. a Postgres-only extension pack in a SQLite contract). Raised by the SQL and Mongo contract builders. Payload: `packId`, `packTargetId`, `contractTargetId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.PACK_TARGET_MISMATCH - code: CONTRACT.POLICY_INVALID namespace: CONTRACT meaning: 'An RLS policy declaration is invalid: it targets a model in another contract space, its prefix exceeds the length limit or is declared twice in one namespace, or it targets a table that is not RLS-enabled or not present in the namespace. Raised by the Postgres `defineContract` builder and while deriving the Postgres schema tree from the contract. Payload: `prefix`/`policyName`, `tableName`, `names' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.POLICY_INVALID - code: CONTRACT.RELATION_INVALID namespace: CONTRACT meaning: 'A relation''s shape is wrong: `.sql(...)` on a non-belongsTo relation, mismatched field counts between the two sides, an N:M relation without `through` metadata, or a relation target referencing a field of another model. Raised while authoring/building a contract (SQL and Mongo). Payload: `modelName`, `relationName`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.RELATION_INVALID - code: CONTRACT.ROLE_INVALID namespace: CONTRACT meaning: 'A role entity is declared more than once in the entities list, or a role name is not a plain SQL identifier. Raised by the Postgres contract builder and RLS DDL rendering. Payload: `role`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.ROLE_INVALID - code: CONTRACT.SCHEMA_VERIFICATION_FAILED namespace: CONTRACT meaning: 'Schema verification found that the live database schema does not satisfy the contract — missing/extra/mismatched tables, columns, or other elements. `db verify` and `db sign` both report it as an `error` diagnostic on a completed run that exits `4`: for `db verify` that is the drift verdict, and for `db sign` it is the reason no signature was written. `db verify` raises one such diagnostic per con' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.SCHEMA_VERIFICATION_FAILED - code: CONTRACT.SOURCE_IMPORT_DISALLOWED namespace: CONTRACT meaning: 'The TypeScript contract module imports something outside the contract-source import allowlist; contract sources must stay pure so they can be bundled and evaluated deterministically. Raised by the CLI while loading a TS contract source. Payload: `allowlist`, `disallowed`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.SOURCE_IMPORT_DISALLOWED - code: CONTRACT.SOURCE_DIAGNOSTIC namespace: CONTRACT meaning: 'One finding a contract source reported with a code that is not yet dotted, such as the Prisma ORM PSL interpreter''s `PSL_UNSUPPORTED_FIELD_TYPE` or a parser''s `PSL_PARSE_ERROR`. This is its only producer case: it exists until those codes convert to dotted ones, and a source code that is already dotted, such as `PSL.PRISMA7_VIEW_UNSUPPORTED`, is reported under its own code instead. Never raised on ' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.SOURCE_DIAGNOSTIC - code: CONTRACT.SOURCE_LOAD_FAILED namespace: CONTRACT meaning: 'Loading the contract source failed: bundling or evaluating the TypeScript contract module (esbuild bundle error, or the module threw on import), the contract source provider returning a failure or a malformed result during `contract emit`, or `format` failing to read the PSL source file. The underlying failure is attached as `cause` where one exists. Payload: `path`, `stage` (`bundle` or `import`)' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.SOURCE_LOAD_FAILED - code: CONTRACT.TABLE_AMBIGUOUS namespace: CONTRACT meaning: 'A storage table name resolves in more than one namespace of the contract and needs namespace qualification to disambiguate. Raised whenever a bare table name is resolved against contract storage (authoring and runtime paths). Payload: `tableName`, `candidates`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.TABLE_AMBIGUOUS - code: CONTRACT.TABLE_MISMATCH namespace: CONTRACT meaning: 'A foreign key or index references a table name that disagrees with the table the target model is actually mapped to. Raised while building a SQL contract. Payload: `sourceModel`, `referencedTable`, `mappedTable`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.TABLE_MISMATCH - code: CONTRACT.TARGET_MISMATCH namespace: CONTRACT meaning: 'The contract''s target does not match the target configured in `prisma.config.ts` (e.g. a Postgres contract with a SQLite config). `db verify` reports it as an `error` diagnostic on a completed run that exits `4`. Payload: `expected`, `actual`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.TARGET_MISMATCH - code: CONTRACT.TYPE_UNKNOWN namespace: CONTRACT meaning: 'A field references a storage type that cannot be resolved: a storage type instance not in `definition.types`, an unknown storage type name, or a field that never resolves to a storage descriptor. Raised during SQL contract lowering. Payload: `modelName`, `fieldName`, `typeRef`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.TYPE_UNKNOWN - code: CONTRACT.UNREADABLE namespace: CONTRACT meaning: 'The emitted contract file could not be read or parsed while computing `migration status`; reported as a warn-severity diagnostic on the status result rather than a thrown error, with the hint to re-run `prisma contract emit`. Payload: none (diagnostic carries `message` and `hints`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.UNREADABLE - code: CONTRACT.TYPES_RENDER_FAILED namespace: CONTRACT meaning: 'A command advancing a ref (`db sign`, `db init`, `db update`, `migrate --advance-ref`) could not render the `contract.d.ts` of the contract it is about to snapshot: the family accepted the JSON but the emitter refused it (for example a to-one relation with no declared nullability). Raised before the command touches the database, so nothing is migrated and no ref or snapshot is written; run `prisma' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.TYPES_RENDER_FAILED - code: CONTRACT.VALIDATION_FAILED namespace: CONTRACT meaning: 'Aggregate contract validation failed: structural validation of the contract JSON (`ContractValidationError` with a `phase` of structural/domain/storage), semantic validation during `buildContract`, or storage/model validators rejecting the built contract. Raised at emit/authoring time and whenever a contract is loaded and validated. Also raised by `migration new` when the emitted contract has no `' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.VALIDATION_FAILED - code: CONTRACT.VERIFY_FAILED namespace: CONTRACT meaning: '`db verify` failed for a reason the verify result did not classify under a more specific code (marker, target, or schema-verification codes). Reported as an `error` diagnostic on a completed run that exits `4`, with the verify result''s own text as the summary. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.VERIFY_FAILED - code: CONTRACT.WIRE_NAME_PREFIX_TOO_LONG namespace: CONTRACT meaning: 'An authored wire-name prefix (an index name, an RLS policy prefix, or a check''s `name:` prefix) exceeds the 54-byte maximum — Postgres identifiers cap at 63 bytes and the wire name appends a 9-byte `_<8hex>` content-hash suffix. Raised at contract lowering. Payload: `prefix`, `maxBytes`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#CONTRACT.WIRE_NAME_PREFIX_TOO_LONG - code: PSL.FORMAT_OPTION_INVALID namespace: PSL meaning: '`resolveFormatOptions` was given an invalid formatting option — a non-positive/non-integer `indent` or an unrecognized `newline` value. Raised before any PSL source is read. Payload: `option`, `received`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.FORMAT_OPTION_INVALID - code: PSL.PARSE_FAILED namespace: PSL meaning: '`format()` was asked to format PSL source that has parse errors; formatting refuses to run on an unparseable document. The message carries the first diagnostic and a count of the rest; the CLI `format` command wraps this into a structured failure telling the user to fix the parse errors, attaching the parser error as `cause`. Payload: `diagnostics`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PARSE_FAILED - code: PSL.PRISMA7_CONTRACT_INVALID namespace: PSL meaning: 'The Prisma ORM 7 schema gives a contract that Prisma ORM rejects, for a cause the source has no specific diagnostic for: a structured error was thrown while the contract was built, or the contract failed the domain, storage consistency, or model storage reference check. This is a bug in Prisma ORM; the message names the cause, and the user should report it with the schema. Reported at the schema p' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_CONTRACT_INVALID - code: PSL.PRISMA7_ENUM_NAMESPACE_MISMATCH namespace: PSL meaning: A field uses an enum declared under a different `@@schema`; a Postgres enum lives in one schema and a Prisma ORM column references the enum of its own namespace. Declare the enum in the model's schema, or move the model. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. ` docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_ENUM_NAMESPACE_MISMATCH - code: PSL.PRISMA7_IGNORED_FIELD_REFERENCED namespace: PSL meaning: An `@ignore`d field is used by `@id`, `@unique`, `@@id`, `@@unique`, `@@index`, or a relation's `fields:`, and Prisma ORM 7 still creates that key, index, or foreign key over its column. Remove `@ignore` from the field. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `s docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_IGNORED_FIELD_REFERENCED - code: PSL.PRISMA7_INDEX_ARGUMENT_UNSUPPORTED namespace: PSL meaning: 'An index argument Prisma ORM indexes cannot carry (`sort`, `length`, `ops`, an unknown index type), or an indexed field that is not a column. Remove the argument. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only ' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_INDEX_ARGUMENT_UNSUPPORTED - code: PSL.PRISMA7_JSON_NULL_DEFAULT_UNSUPPORTED namespace: PSL meaning: 'A `Json` default of `"null"`, or a `Json[]` default holding it: the contract cannot tell the JSON value null apart from SQL `NULL`. Remove the `@default` or give it another JSON value. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: ' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_JSON_NULL_DEFAULT_UNSUPPORTED - code: PSL.PRISMA7_JUNCTION_ID_UNSUPPORTED namespace: PSL meaning: An implicit many-to-many relation on a model without a single-field `@id`. Give the model a single-field `@id`, or write the junction model out. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when ther docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_JUNCTION_ID_UNSUPPORTED - code: PSL.PRISMA7_JUNCTION_NAME_COLLISION namespace: PSL meaning: A model in the same schema as an implicit many-to-many junction has the junction model's name (`PostToTag`, or the relation name). Rename the model and keep its table with `@@map`. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: :: `, with only the file when there docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_OPTIONAL_GENERATED_FIELD_UNSUPPORTED - code: PSL.PRISMA7_PROVIDER_MISMATCH namespace: PSL meaning: The Prisma ORM 7 schema has no `datasource` block, or its `provider` is not one the target accepts (`postgresql` or `postgres` for Postgres). Use the source only with a schema for the configured target. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_REFERENTIAL_ACTION_UNSUPPORTED - code: PSL.PRISMA7_RELATION_MODE_UNSUPPORTED namespace: PSL meaning: '`relationMode = "prisma"`, or the older `referentialIntegrity = "prisma"`. Remove it or set `relationMode = "foreignKeys"`. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when there is no position (the' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_RELATION_MODE_UNSUPPORTED - code: PSL.PRISMA7_RELATION_NAME_SHARED namespace: PSL meaning: Two or more implicit many-to-many relations in the same schema use the same relation name; Prisma ORM 7 creates one table for all of them, wired to only one. Give each relation its own name. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:::: `, with only the file when there is no position (the termin docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_SCHEMA_READ_FAILED - code: PSL.PRISMA7_TABLE_COLLISION namespace: PSL meaning: 'Two models map to the same table in one schema, or a model maps to the table of an implicit many-to-many relation. Give each model its own table with `@@map`. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the ' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_TABLE_COLLISION - code: PSL.PRISMA7_UNKNOWN_ATTRIBUTE namespace: PSL meaning: 'An attribute Prisma ORM 7 for the target does not have, or one the source does not read (`@@fulltext`, `@shardKey`). Remove it. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when there is no position ' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_UNKNOWN_ATTRIBUTE - code: PSL.PRISMA7_UNKNOWN_DEFAULT namespace: PSL meaning: 'A `@default` value the source cannot read: an unknown function, an enum member on a non-enum field or a non-member, a number with a fraction on an `Int` or `BigInt` field, a malformed JSON or base64 literal, or `dbgenerated()` with no expression on a required field. Use a literal, an enum member, or a supported function. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contra' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_UNKNOWN_DEFAULT - code: PSL.PRISMA7_UNSUPPORTED_TYPE namespace: PSL meaning: '`Unsupported("...")` or an unknown field type. Add `@@ignore` to the model, or correct the type name. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when there is no position (the terminal prints the c' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_UNSUPPORTED_TYPE - code: PSL.PRISMA7_UPDATED_AT_TYPE_UNSUPPORTED namespace: PSL meaning: '`@updatedAt` on a column whose codec has no "now" generator in the target, such as `@db.Date`. Remove `@updatedAt`. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when there is no position (the termina' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_UPDATED_AT_TYPE_UNSUPPORTED - code: PSL.PRISMA7_UPDATED_AT_WITH_DEFAULT_UNSUPPORTED namespace: PSL meaning: '`@updatedAt` combined with `@default`. Remove the `@default`; `@updatedAt` still sets the value on create and update. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when there is no position (the termi' docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_UPDATED_AT_WITH_DEFAULT_UNSUPPORTED - code: PSL.PRISMA7_VIEW_UNSUPPORTED namespace: PSL meaning: A `view` block; Prisma ORM has no views. Remove the view, or replace it with a model over the underlying table. Reported by the Prisma ORM 7 contract source (`prisma7Schema`) during `contract emit`, as a finding in the `diagnostics` list of `CONTRACT.SOURCE_LOAD_FAILED`, never on its own. `summary` is `:: `, with only the file when there is no position (the terminal pr docs: https://www.prisma.io/docs/orm/reference/error-reference#PSL.PRISMA7_VIEW_UNSUPPORTED - code: ORM.AGGREGATE_OPERATION_RESERVED namespace: ORM meaning: 'A contributed aggregate operation carries a name a collection builder member already owns (`select`, `include`, `where`, `combine`, `aggregate`, …, or a collection instance field). Aggregate operations surface as reducer methods on the ORM collection, in one flat namespace with the query-builder members, so a same-named operation would shadow the member it collides with. Raised at ORM composition ' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.AGGREGATE_OPERATION_RESERVED - code: ORM.AGGREGATE_PROJECTION_ONLY namespace: ORM meaning: An aggregate operation contributed from outside the closed SQL aggregate alphabet (`count`, `sum`, `avg`, `min`, `max`) was used in HAVING, ORDER BY, or another comparison position. Such an operation reaches SQL only through its descriptor's lowering hook — a rendering meant for the SELECT projection, where the value crosses the driver boundary. HAVING and ORDER BY compare the value inside the dat docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.AGGREGATE_PROJECTION_ONLY - code: ORM.AGGREGATE_SELECTOR_INVALID namespace: ORM meaning: 'An `aggregate()` or `groupBy().aggregate()` selector is not a valid aggregation descriptor, or an aggregate function that requires a column/field (e.g. sum, avg) was given none. Thrown when the ORM client builds the aggregate query plan. Payload: `method`, `model`, `alias`, `fn`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.AGGREGATE_SELECTOR_INVALID - code: ORM.AGGREGATE_SELECTOR_MISSING namespace: ORM meaning: '`aggregate()` or `groupBy().aggregate()` was called with zero aggregation selectors; at least one is required. Payload: `method`, `model` (or `namespaceId`, `tableName`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.AGGREGATE_SELECTOR_MISSING - code: ORM.AGGREGATE_UNSUPPORTED namespace: ORM meaning: An aggregate was invoked for an operation/input pair the composed target declares no descriptor for — an undeclared pair has no result identity to type or decode, so it is rejected before any SQL is built rather than executed into a driver-native value. Raised by ORM aggregate planning and decoding, and by the SQL-builder lane's aggregate functions; the typed surfaces already make such a call a ty docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.AGGREGATE_UNSUPPORTED - code: ORM.ARGUMENT_INVALID namespace: ORM meaning: 'A method argument on the ORM client — or on the `sql()` / Mongo query-builder DSLs — is malformed or missing a required part: a `null` where-arg, `upsert()` without conflict columns or without a create value for a conflict column, a custom collection registered as an instance / against a nonexistent model in `orm({ collections })`, invalid builder argument shapes, `$and`/`$or` with no expressions,' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.ARGUMENT_INVALID - code: ORM.CAPABILITY_MISSING namespace: ORM meaning: 'The requested operation requires a contract capability the contract does not declare — currently the `returning` capability needed for mutations that read back the affected row. Raised by the ORM client and the `sql()` builder. Payload: `capability`, `action`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.CAPABILITY_MISSING - code: ORM.COLUMN_UNKNOWN namespace: ORM meaning: 'A mutation payload or where-expression references a column that does not exist on the resolved table. Thrown while compiling the query plan or binding the where clause — by the ORM client and by the `sql()` builder DSL. Payload: `namespaceId`, `tableName`, `column`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.COLUMN_UNKNOWN - code: ORM.CURSOR_VALUE_MISSING namespace: ORM meaning: 'Cursor pagination was requested but the cursor object lacks a value for one of the `orderBy` columns, so the position cannot be anchored. Payload: `column`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.CURSOR_VALUE_MISSING - code: ORM.FIELD_IMMUTABLE namespace: ORM meaning: 'A Mongo mutation payload attempts to write `_id`, which is immutable. Thrown by the Mongo ORM client for create/update/upsert payloads. Payload: `field`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.FIELD_IMMUTABLE - code: ORM.FIELD_UNKNOWN namespace: ORM meaning: 'A shorthand relation filter references a field that is not defined on the related model. Thrown by the SQL ORM client while resolving the filter. Payload: `model`, `field`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.FIELD_UNKNOWN - code: ORM.FILTER_UNSUPPORTED namespace: ORM meaning: 'A shorthand equality filter targets a field whose codec does not support equality comparisons (lacks the equality trait). Payload: `model`, `field`, `trait`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.FILTER_UNSUPPORTED - code: ORM.GROUP_BY_FIELD_MISSING namespace: ORM meaning: '`groupBy()` was called with zero fields; at least one grouping field is required. Payload: `namespaceId`, `tableName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.GROUP_BY_FIELD_MISSING - code: ORM.HAVING_EXPRESSION_UNSUPPORTED namespace: ORM meaning: 'A `groupBy().having()` expression uses a kind the grouped-having compiler does not allow: `ParamRef`/`PreparedParamRef`, list values, non-aggregate expressions, or another unsupported comparable kind. Only aggregate metric expressions are supported. Payload: `kind`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.HAVING_EXPRESSION_UNSUPPORTED - code: ORM.INCLUDE_INVALID namespace: ORM meaning: 'An `include()` usage is structurally invalid: the refinement callback returned something that is not a collection, include-scalar selector, or `combine()` descriptor; a `combine()` branch is invalid or empty; or an include-only action was called outside an `include()` refinement callback. Payload: `relation`, `branch`, `action`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.INCLUDE_INVALID - code: ORM.INCLUDE_UNSUPPORTED namespace: ORM meaning: 'The include is well-formed but not supported in this position: scalar aggregations or `combine()` on a to-one relation (SQL), or including an embed relation / compound reference (Mongo — only reference relations can be included). Payload: `relation`, `kind`, `model`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.INCLUDE_UNSUPPORTED - code: ORM.MODEL_UNKNOWN namespace: ORM meaning: 'The Mongo ORM client was asked to operate on a model name that is not in the contract (collection compile, or a raw-pipeline root bound to an unknown model). Payload: `model`, `root`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.MODEL_UNKNOWN - code: ORM.MUTATION_DATA_MISSING namespace: ORM meaning: '`create()` or `createAndCount()` was called with zero rows; at least one row of data is required. Payload: `method`, `namespaceId`, `tableName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.MUTATION_DATA_MISSING - code: ORM.MUTATION_ROW_MISSING namespace: ORM meaning: 'A mutation that expected the database to return a row got none — `create()`/`upsert()` read-back, MTI base or variant INSERT, or a nested create. The Prisma-classic analogue of P2025. Payload: `operation`, `model`, `tableName`, `phase`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.MUTATION_ROW_MISSING - code: ORM.OPERATION_UNSUPPORTED namespace: ORM meaning: 'A valid ORM method was called in a configuration that does not support it: mutating an MTI variant collection with a method that requires `createAll()`, Mongo `upsert()` with dot-path field operations, or a Mongo mutation carrying windowing (`orderBy`/`offset`/`limit`) or includes. Payload: `method`, `model`, `reason`, `field`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.OPERATION_UNSUPPORTED - code: ORM.RELATION_LINK_DUPLICATE namespace: ORM meaning: 'A `connect()` nested mutation violated a unique constraint on the junction table — the junction link is likely already present. The original driver error is preserved as `cause`. Payload: `relation`, `junction`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.RELATION_LINK_DUPLICATE - code: ORM.RELATION_MUTATION_INVALID namespace: ORM meaning: 'A nested relation mutation''s input is malformed: a relation field without a mutator callback or returning an invalid descriptor, `create` without data, `connect`/`disconnect` with a missing or empty criterion, duplicate connect criteria resolving to the same junction link, or conflicting values for a junction column. Payload: `kind`, `relation`, `model`, `problem`, `junction`, `column`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.RELATION_MUTATION_INVALID - code: ORM.RELATION_MUTATION_UNSUPPORTED namespace: ORM meaning: 'A nested relation mutation kind is not supported in this position: `disconnect()` outside `update()` nested mutations, or `create()`/`connect()` through a junction table with required columns the relation API cannot populate (`disconnect()` stays available). Payload: `kind`, `relation`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.RELATION_MUTATION_UNSUPPORTED - code: ORM.RELATION_ROW_MISSING namespace: ORM meaning: 'A `connect()`/`disconnect()` nested mutation''s criterion matched no row on the related model. Payload: `kind`, `relation`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.RELATION_ROW_MISSING - code: ORM.RELATION_UNKNOWN namespace: ORM meaning: 'A referenced relation name does not exist on the model — in `include()` (SQL and Mongo) or when resolving relation metadata from the contract. Payload: `model`, `relation`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.RELATION_UNKNOWN - code: ORM.ROW_IDENTITY_MISSING namespace: ORM meaning: 'The operation needs a primary key or unique constraint the table does not have: `update()`/`delete()` targeting a single row, or keying the include read-back after a mutation. Payload: `model`, `table`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.ROW_IDENTITY_MISSING - code: ORM.TABLE_UNKNOWN namespace: ORM meaning: 'The table a collection resolves to does not exist in the contract''s storage for the namespace. Thrown during storage resolution or query planning. Payload: `namespaceId`, `tableName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.TABLE_UNKNOWN - code: ORM.WHERE_MISSING namespace: ORM meaning: 'A Mongo mutation method (e.g. update/delete variants) requires a prior `.where()` filter and none was set. Payload: `method`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#ORM.WHERE_MISSING - code: RUNTIME.ABORTED namespace: RUNTIME meaning: 'An in-flight `query()` or `execute()` operation was cancelled via the per-operation `AbortSignal` passed as the call''s `{ signal }` option. `details.phase` says where the abort was observed: `encode`, `decode`, `stream`, or the middleware phases `beforeQuery` / `beforeExecute` / `afterQuery` / `afterExecute` / `onRow`; the envelope''s `cause` carries `signal.reason` verbatim. Payload: `phase`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.ABORTED - code: RUNTIME.AGGREGATE_DESCRIPTOR_INVALID namespace: RUNTIME meaning: 'A component contributed an aggregate descriptor whose shape the SQL aggregate registry cannot read: a missing or empty `operation`, an `input` that is not `none` / `any` / `codec` / `trait` (including an unknown trait name), an `output` that is not `self` / `codec`, a non-boolean `nullable`, a `nullable: false` descriptor with no `emptyResultJson`, a `self` output on an operation that consumes no ' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.AGGREGATE_DESCRIPTOR_INVALID - code: RUNTIME.AGGREGATE_LOWERING_MISSING namespace: RUNTIME meaning: An aggregate descriptor declares an operation outside the closed SQL aggregate alphabet (`count`, `sum`, `avg`, `min`, `max`) and carries no `lower` hook. An alphabet operation lowers to a plain aggregate call by default; renderers know no other operation, so any other name must build its expression through a lowering hook from existing AST nodes. Raised while the execution context assembles the a docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.AGGREGATE_LOWERING_MISSING - code: RUNTIME.AGGREGATE_OUTPUT_CODEC_MISSING namespace: RUNTIME meaning: An aggregate descriptor names a result codec the composed stack does not register — either its `output` names the codec outright, or a `self` output over an exact input match reuses an input codec the stack never composes. A resolved aggregate decodes its result through the declared codec, so an unregistered one could never decode anything. Raised while the execution context assembles the aggregat docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.AGGREGATE_OUTPUT_CODEC_MISSING - code: RUNTIME.AMBIGUOUS_AGGREGATE_DESCRIPTOR namespace: RUNTIME meaning: 'Two trait-matching aggregate descriptors for one operation both claim a registered codec — the codec advertises both traits, so the result codec is undetermined. Contribute an exact codec descriptor for that operation, or narrow the overlapping trait contributions. Raised while the execution context assembles the aggregate registry, so it never surfaces mid-query. Payload: `operation`, `codecId`, ' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.AMBIGUOUS_AGGREGATE_DESCRIPTOR - code: RUNTIME.ANNOTATION_INAPPLICABLE namespace: RUNTIME meaning: 'A lane terminal (SQL DSL `.build()`, ORM collection terminal) received an annotation whose declared `applicableTo` set does not include the operation kind being built — the runtime check that backs up the type-level annotation validation when it is bypassed via casts or dynamic invocation. Payload: `namespace`, `terminalName`, `kind`, `applicableTo`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.ANNOTATION_INAPPLICABLE - code: RUNTIME.AST_INVALID namespace: RUNTIME meaning: 'A lowered SQL AST is structurally invalid: a subquery projecting other than one column, an INSERT with zero rows, a missing column value, an empty onConflict column list or do-update-set, an UPDATE with no SET assignments, an INSERT target table absent from contract storage, or an AST node constructed with invalid arguments (empty FunctionSource column aliases, a CaseExpr with no branches, a raw q' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.AST_INVALID - code: RUNTIME.AST_UNSUPPORTED namespace: RUNTIME meaning: 'The authored SQL AST uses a feature this target cannot render — e.g. DEFAULT as a value in INSERT … VALUES, WITH ORDINALITY on function sources, or returned-column aliases on function sources, all on SQLite. Raised by the target adapters'' renderers. Payload: `node` (INSERT DEFAULT site); `target`, `feature` (function-source sites).' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.AST_UNSUPPORTED - code: RUNTIME.BINDING_INVALID namespace: RUNTIME meaning: 'A target facade client (`@prisma/orm-postgres`, `@prisma/orm-sqlite`, `@prisma/orm-mongo`) received a connection binding whose shape is wrong for the target — malformed connection string, unsupported binding kind, or missing required fields. Raised at `connect(...)` / client construction. Payload: `received`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.BINDING_INVALID - code: RUNTIME.BINDING_MISSING namespace: RUNTIME meaning: 'A target facade client was asked to connect with no binding at all (no connection string, no environment fallback). Payload: `expected`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.BINDING_MISSING - code: RUNTIME.CODEC_DESCRIPTOR_ARRAY_UNSUPPORTED namespace: RUNTIME meaning: 'A codec projection used `CodecRef.many` against a SQLite codec descriptor — SQLite has no stored scalar-array codec protocol, so projecting the whole stored array would be ambiguous. Use a scalar CodecRef or an explicit target representation. Payload: `codecId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CODEC_DESCRIPTOR_ARRAY_UNSUPPORTED - code: RUNTIME.CODEC_DESCRIPTOR_INVALID namespace: RUNTIME meaning: 'A codec descriptor handed to a target codec-descriptor registry (Postgres, SQLite) is not a valid descriptor for that target: wrong discriminant, missing target descriptor methods, or a malformed params schema. Extend the target''s descriptor class or adapt a generic descriptor with the target''s wrapper (`postgresCodec()` / `sqliteCodec()`). Payload: `codecId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CODEC_DESCRIPTOR_INVALID - code: RUNTIME.CODEC_DESCRIPTOR_MISSING namespace: RUNTIME meaning: 'A column (or AST-carried CodecRef) references a `codecId` for which no runtime component registered a codec descriptor — usually the extension pack that owns the codec is missing from the runtime stack. Surfaces at SQL context construction during the contract codec walk, or lazily when the AST codec resolver materializes a codec at query time. Payload: `codecId`; on the column path also `table`, `' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CODEC_DESCRIPTOR_MISSING - code: RUNTIME.CODEC_MISSING namespace: RUNTIME meaning: 'Runtime validation of the contract found columns whose `codecId` has no implementation in the codec registry; the error lists every affected column. Surfaces when the codec registry''s completeness is validated at context/runtime setup. Payload: `contractTarget`, `invalidCodecs` (list of `{ namespaceId, table, column, codecId }`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CODEC_MISSING - code: RUNTIME.CODEC_PARAMETERIZATION_MISMATCH namespace: RUNTIME meaning: 'A column''s codec reference disagrees with the codec''s parameterization: a parameterized codec is used with no `typeParams` (and its schema requires some), or `typeParams` are supplied to a non-parameterized codec. Surfaces during the SQL context''s contract codec walk. Payload: `table`, `column`, `codecId`, `expected`, `actual`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CODEC_PARAMETERIZATION_MISMATCH - code: RUNTIME.CONTENT_HASH_REQUIRES_RESOLVED_COMMAND namespace: RUNTIME meaning: 'Mongo middleware called `ctx.contentHash(plan)` (or `computeMongoContentHash`) during `beforeExecute`, when `plan.command` is still an unresolved lowered draft rather than a resolved wire command. Compute the hash from `afterExecute`, or use the param mutator instead of reading `plan.command` structurally. Payload: `phase`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CONTENT_HASH_REQUIRES_RESOLVED_COMMAND - code: RUNTIME.CONTRACT_FAMILY_MISMATCH namespace: RUNTIME meaning: 'At SQL context construction, the contract''s target family (e.g. `mongo`) does not match the runtime stack''s family (`sql`) — the contract was emitted for a different database family than the stack being assembled. Payload: `actual`, `expected`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CONTRACT_FAMILY_MISMATCH - code: RUNTIME.CONTRACT_TARGET_MISMATCH namespace: RUNTIME meaning: 'At SQL context construction, the contract''s target (e.g. `sqlite`) does not match the runtime stack''s target descriptor (e.g. `postgres`) — the contract and the adapter/driver stack disagree about the database target. Payload: `actual`, `expected`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.CONTRACT_TARGET_MISMATCH - code: RUNTIME.DDL_UNSUPPORTED namespace: RUNTIME meaning: '`lower()` was asked to lower DDL on a surface that cannot do it: the runtime adapter (DDL lowering is a control-plane concern), or the synchronous control lowering path (DDL default literals require async codec encoding — use `lowerToExecuteRequest()`). Raised by the Postgres and SQLite adapters. Payload: `surface`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.DDL_UNSUPPORTED - code: RUNTIME.DECODE_FAILED namespace: RUNTIME meaning: 'A codec''s `decode` threw while converting a wire value into its output type during result decoding — surfaces per column (SQL), per document field (Mongo), or per included-relation column (ORM client), with the original error attached as `cause`. Also thrown when a returned row is missing an expected projection alias, or when the JSON array for an include alias fails to parse. Payload: `table`, `c' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.DECODE_FAILED - code: RUNTIME.DUPLICATE_AGGREGATE_DESCRIPTOR namespace: RUNTIME meaning: 'Two components claim the same aggregate overload — the same `(operation, input)` pair, keyed as `sum:trait:numeric`, `sum:codec:pg/int8@1`, or `count:none`. Each overload resolves to exactly one result codec, so exactly one target, adapter, or extension may contribute it. Payload: `key`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.DUPLICATE_AGGREGATE_DESCRIPTOR - code: RUNTIME.DUPLICATE_AUTHORING_DISCRIMINATOR namespace: RUNTIME meaning: 'Two authoring contributions register the same discriminator key — the same `entityType` key or the same `pslBlock` parser keyword — when the framework authoring surface assembles its descriptor registry. Each contribution must use a unique key. Payload: `label`, `key`, `existingPath`, `path`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.DUPLICATE_AUTHORING_DISCRIMINATOR - code: RUNTIME.DUPLICATE_CODEC namespace: RUNTIME meaning: 'Two runtime stack contributors (target pack, extension packs) register a codec with the same id — while the SQL context or Mongo execution stack collects codecs, or while a target codec-descriptor registry (Postgres, SQLite) is composed. Remove the duplicate contribution. Payload: `codecId`; on the Mongo path also `existingOwner`, `incomingOwner`; on the target registry path also `target`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.DUPLICATE_CODEC - code: RUNTIME.DUPLICATE_MUTATION_DEFAULT_GENERATOR namespace: RUNTIME meaning: 'Two runtime stack contributors register a mutation default generator with the same id while the SQL context collects them. Payload: `id`, `existingOwner`, `incomingOwner`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.DUPLICATE_MUTATION_DEFAULT_GENERATOR - code: RUNTIME.ENCODE_FAILED namespace: RUNTIME meaning: 'A codec''s `encode` threw while converting a user-supplied parameter value to driver wire format during query execution (SQL param encoding, or Mongo param-ref resolution), with the original error attached as `cause`. Payload: `label`, `codec`; SQL path also `paramIndex`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.ENCODE_FAILED - code: RUNTIME.EXECUTION_RESULT_MISSING namespace: RUNTIME meaning: 'A statistics execution completed without returning statement statistics. This indicates a runtime or middleware implementation violated the execution contract instead of returning `{ affectedRows }`. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.EXECUTION_RESULT_MISSING - code: RUNTIME.ITERATOR_CONSUMED namespace: RUNTIME meaning: 'An `AsyncIterableResult` (the return value of `query()`) was iterated a second time — each result can be consumed only once, whether via a `for await` loop or via `toArray()`/`await`. Store the array from `toArray()` if you need to reuse the rows. Payload: `consumedBy`, `suggestion`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.ITERATOR_CONSUMED - code: RUNTIME.JSON_SCHEMA_VALIDATION_FAILED namespace: RUNTIME meaning: 'The `arktype-json` codec rejected a JSON value that does not satisfy the column''s arktype schema, on encode (writing) or decode (reading). Also thrown when the schema itself cannot be rehydrated from the contract''s stored JSON IR. Payload: `codecId`, `issues` (validation) or `jsonIr` (rehydration).' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.JSON_SCHEMA_VALIDATION_FAILED - code: RUNTIME.MIDDLEWARE_FAMILY_MISMATCH namespace: RUNTIME meaning: 'A middleware registered on the runtime declares a `familyId` (e.g. `sql`) that differs from the runtime''s family — e.g. a SQL-only middleware added to a Mongo runtime. Checked when the runtime validates its middleware list. Payload: `middleware`, `middlewareFamilyId`, `runtimeFamilyId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MIDDLEWARE_FAMILY_MISMATCH - code: RUNTIME.MIDDLEWARE_INCOMPATIBLE namespace: RUNTIME meaning: 'A middleware declares a `targetId` without also declaring a `familyId` — an invalid combination, since target scoping only makes sense within a family. Checked when the runtime validates its middleware list. Payload: `middleware`, `targetId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MIDDLEWARE_INCOMPATIBLE - code: RUNTIME.MIDDLEWARE_RESULT_MISMATCH namespace: RUNTIME meaning: 'Middleware returned a query result for a statistics operation, or statistics for a row query. Middleware interception results must carry the same `operation` discriminant as the operation they intercept. Payload: `expected`, `received`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MIDDLEWARE_RESULT_MISMATCH - code: RUNTIME.MIDDLEWARE_TARGET_MISMATCH namespace: RUNTIME meaning: 'A middleware declares a `targetId` (e.g. `postgres`) that differs from the runtime''s configured target. Checked when the runtime validates its middleware list. Payload: `middleware`, `middlewareTargetId`, `runtimeTargetId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MIDDLEWARE_TARGET_MISMATCH - code: RUNTIME.MISSING_EXTENSION_PACK namespace: RUNTIME meaning: 'At SQL context construction, the contract requires one or more extension packs that no component in the runtime stack provides. Add the missing pack(s) to the stack. Payload: `packIds`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MISSING_EXTENSION_PACK - code: RUNTIME.MONGO_STATISTICS_RESULT_INVALID namespace: RUNTIME meaning: 'A Mongo update or delete command did not return exactly one result object with the required numeric native count field. Updates require `modifiedCount`; deletes require `deletedCount`. Payload: `commandKind`, `countField`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MONGO_STATISTICS_RESULT_INVALID - code: RUNTIME.MONGO_STATISTICS_UNSUPPORTED namespace: RUNTIME meaning: 'Statistics execution was requested for a Mongo command that does not expose affected-row statistics. Only update and delete command kinds provide the native counts used by this operation. Payload: `commandKind`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MONGO_STATISTICS_UNSUPPORTED - code: RUNTIME.MUTATION_DEFAULT_GENERATOR_MISSING namespace: RUNTIME meaning: 'The contract declares column defaults produced by a mutation default generator (e.g. a nanoid/uuid generator) that no runtime component provides — detected up front when the SQL context validates generator coverage, or at mutation time when a generator-kind default spec is resolved. Payload: `ids` (validation pass) or `id` (resolution).' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.MUTATION_DEFAULT_GENERATOR_MISSING - code: RUNTIME.NAMESPACE_UNKNOWN namespace: RUNTIME meaning: 'At query-render time a table references a namespace that is not present, or not materialised as a database schema, on the contract. Raised by the Postgres and SQLite SQL renderers. Payload: `table`, `namespaceId`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.NAMESPACE_UNKNOWN - code: RUNTIME.NO_ROWS namespace: RUNTIME meaning: '`firstOrThrow()` was called on a query result that returned no rows. Use `first()` if an empty result is acceptable.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.NO_ROWS - code: RUNTIME.PARAM_REF_CODEC_REQUIRED namespace: RUNTIME meaning: While building a query expression, a plain JS value was passed where no codec could be derived — `toExpr` cannot construct a ParamRef for a bare value without an explicit `CodecRef`. Provide a codec at the call site or use a column-bound builder path. docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.PARAM_REF_CODEC_REQUIRED - code: RUNTIME.PARAM_REF_MISSING_CODEC namespace: RUNTIME meaning: 'The Postgres SQL renderer reached lowering with a ParamRef that carries no bound `CodecRef` — an internal invariant of the AST-bound codec contract, usually indicating a builder path that constructed a ParamRef without threading the column codec. Payload: `paramIndex`, `name`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.PARAM_REF_MISSING_CODEC - code: RUNTIME.PREPARE_BIND_ON_ADHOC namespace: RUNTIME meaning: 'An AST containing a prepared-statement bind-site reference (`PreparedParamRef`) was submitted to the ad-hoc `execute()` path. Bind-site references are only valid inside `runtime.prepare(...)`. Payload: `name`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.PREPARE_BIND_ON_ADHOC - code: RUNTIME.PREPARE_MISSING_PARAM namespace: RUNTIME meaning: 'Executing a prepared statement without supplying a value for one of its declared parameters — the lookup fails rather than silently binding `undefined`. Payload: `name`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.PREPARE_MISSING_PARAM - code: RUNTIME.PREPARE_UNUSED_PARAM namespace: RUNTIME meaning: '`runtime.prepare(declaration, callback)` found declared parameter names that the callback''s plan never references. Remove the unused declarations or reference them in the plan. Payload: `unused`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.PREPARE_UNUSED_PARAM - code: RUNTIME.RAW_ROW_COLUMN_MISSING namespace: RUNTIME meaning: A whole-query raw statement returned a result that omits a column its row spec declares. The runtime never parses the SQL, so the spec is its only description of the result — a column the spec names and the statement does not return is a mismatch the caller has to resolve, by correcting the spec or the statement. Distinct from `RUNTIME.DECODE_FAILED`, which means a codec rejected a value the runti docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.RAW_ROW_COLUMN_MISSING - code: RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION namespace: RUNTIME meaning: A raw-SQL tagged template interpolated a JS value whose type cannot be auto-inferred to a codec (anything other than number, bigint, string, boolean, or Uint8Array). Wrap the value in `param(...)` with an explicit codec. docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.RAW_SQL_UNSUPPORTED_INTERPOLATION - code: RUNTIME.TEMPORAL_UNAVAILABLE namespace: RUNTIME meaning: 'A value that only a global `Temporal` implementation can produce or read was needed in a runtime that has none. Two paths raise it, and they carry different metadata:' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.TEMPORAL_UNAVAILABLE - code: RUNTIME.TRANSACTION_CLOSED namespace: RUNTIME meaning: A query result created inside a transaction was read after the transaction ended. Await the result or call `.toArray()` inside the transaction callback. docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.TRANSACTION_CLOSED - code: RUNTIME.TRANSACTION_COMMIT_FAILED namespace: RUNTIME meaning: 'Committing a transaction failed; the runtime attempts a cleanup rollback and destroys the connection if that also fails. The driver''s commit error is attached as `cause`. Payload: `commitError`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.TRANSACTION_COMMIT_FAILED - code: RUNTIME.TRANSACTION_ROLLBACK_FAILED namespace: RUNTIME meaning: 'Rolling back a transaction after the callback threw itself failed; the connection is destroyed rather than returned to the pool. The original callback error is attached as `cause`. Payload: `rollbackError`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.TRANSACTION_ROLLBACK_FAILED - code: RUNTIME.TYPE_PARAMS_INVALID namespace: RUNTIME meaning: 'A parameterized codec''s `paramsSchema` rejected the `typeParams` carried by a codec reference (or the schema returned a Promise — runtime validation requires a synchronous Standard Schema validator). The `arktype-json` codec also throws it when the contract''s serialized schema expression does not match the rehydrated schema, indicating a stale or hand-edited contract. Payload: `codecId`, `typePara' docs: https://www.prisma.io/docs/orm/reference/error-reference#RUNTIME.TYPE_PARAMS_INVALID - code: DRIVER.ALREADY_CONNECTED namespace: DRIVER meaning: 'Calling `connect(binding)` on a driver — or `connect()` on a target facade client (Postgres, SQLite, Mongo) or the CLI control client — that is already connected. Close with `close()` before reconnecting with a new binding. Payload: `bindingKind`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#DRIVER.ALREADY_CONNECTED - code: DRIVER.CONNECTION_FAILED namespace: DRIVER meaning: 'A control-plane driver could not establish a database connection (`driver.create(url)` in the SQLite, Postgres, and Mongo control drivers). The `why` carries the underlying driver message and the original error is attached as `cause`; connection URLs in meta are redacted. Payload: `path` (SQLite); `sqlState` plus redacted URL fields (Postgres); redacted URL fields (Mongo).' docs: https://www.prisma.io/docs/orm/reference/error-reference#DRIVER.CONNECTION_FAILED - code: DRIVER.NOT_CONNECTED namespace: DRIVER meaning: Using a driver, a target facade client, or the CLI control client before `connect(...)` has been called (or after it was closed) — surfaces from runtime `query` / `execute`, a prepared statement's `query(target, params, options?)`, `acquireConnection`, or `explain`, including lazily when iterating a query result. docs: https://www.prisma.io/docs/orm/reference/error-reference#DRIVER.NOT_CONNECTED - code: DRIVER.PREPARE_FAILED namespace: DRIVER meaning: 'A prepared statement failed again after the PostgreSQL driver discarded a stale handle and retried with a fresh handle. The normalized PostgreSQL error is attached as `cause`. Payload: `handle`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#DRIVER.PREPARE_FAILED - code: MIGRATION.AMBIGUOUS_MIGRATION_REF namespace: MIGRATION meaning: 'A migration reference (directory name or hash prefix) passed to a CLI command matches migrations in more than one contract space, so the command cannot tell which one you mean. Re-run with `--space ` to pick a space. Payload: `ref`, `spaceIds`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.AMBIGUOUS_MIGRATION_REF - code: MIGRATION.AMBIGUOUS_TARGET namespace: MIGRATION meaning: 'The on-disk migration history has diverged into multiple branch tips (typically two developers planned migrations from the same starting point), so commands that auto-resolve a target cannot choose one. Fix by targeting a branch with `ref set`, deleting one of the conflicting migration directories, or passing `--from `. Payload: `branchTips`, and when divergence context is known `divergenceP' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.AMBIGUOUS_TARGET - code: MIGRATION.BUNDLE_NOT_FOUND_FOR_GRAPH_NODE namespace: MIGRATION meaning: 'A hash resolves to a node in the migration graph, but no on-disk migration package has that hash as its destination (`to`), so there is no bundle to read for it. Hit when resolving a ref or hash to a migration bundle (e.g. `migration show`, contract-at resolution). Payload: `hash`, `explicitLabel` (when the user supplied a named reference).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.BUNDLE_NOT_FOUND_FOR_GRAPH_NODE - code: MIGRATION.CHECK_CONTRACT_UNREADABLE namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: the `contract.json` for a contract space cannot be read or validated. Re-emit the extension contract artifacts or fix the descriptor producing the invalid contract.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_CONTRACT_UNREADABLE - code: MIGRATION.CHECK_DANGLING_REF namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a ref file points at a contract hash that does not exist in the space''s migration graph. Update the ref with `prisma ref set ` or delete it.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_DANGLING_REF - code: MIGRATION.CHECK_DECLARED_BUT_UNMIGRATED namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: an extension is declared in `extensions` but has no on-disk migrations directory under `migrations/`. Re-emit the extension''s contract-space artifacts, or remove the extension from `extensions`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_DECLARED_BUT_UNMIGRATED - code: MIGRATION.CHECK_DUPLICATE_MIGRATION_HASH namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: multiple migration packages in the same contract space share the same `migrationHash`, so the packages are not uniquely content-addressed. Re-emit one of the conflicting packages.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_DUPLICATE_MIGRATION_HASH - code: MIGRATION.CHECK_FILE_MISSING namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a required file (`migration.json` or `ops.json`) is missing from a migration package directory. Re-emit the package or restore it from version control.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_FILE_MISSING - code: MIGRATION.CHECK_HASH_MISMATCH namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: the `migrationHash` stored in `migration.json` does not match the hash recomputed from the package contents — the package was edited or partially written since emit. Re-emit the package or restore it from version control.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_HASH_MISMATCH - code: MIGRATION.CHECK_HEAD_REF_MISSING namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a contract space has no `refs/head.json`. Re-emit the contract-space migrations and head-ref artifacts, or restore the file from version control.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_HEAD_REF_MISSING - code: MIGRATION.CHECK_HEAD_REF_NOT_IN_GRAPH namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: the hash in a space''s `refs/head.json` is not a node in that space''s migration graph. Re-emit the space''s migrations or restore the missing migration package.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_HEAD_REF_NOT_IN_GRAPH - code: MIGRATION.CHECK_NOOP_SELF_EDGE namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a migration has identical source and target hashes and declares no data invariant — a true no-op self-edge. Add a data operation if it was meant to carry one, or delete the migration.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_NOOP_SELF_EDGE - code: MIGRATION.CHECK_ORPHAN_SPACE_DIR namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a contract-space directory exists under `migrations/` but no declared extension claims it. Remove the directory or declare the extension in `extensions`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_ORPHAN_SPACE_DIR - code: MIGRATION.CHECK_PACKAGE_UNLOADABLE namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a migration package directory exists but could not be loaded (parse or validation failure); the row''s detail names the underlying cause. Re-emit the package or restore it from version control.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_PACKAGE_UNLOADABLE - code: MIGRATION.CHECK_PROVIDED_INVARIANTS_MISMATCH namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: the `providedInvariants` list stored in `migration.json` disagrees with the one derived from `ops.json`. Re-emit the package so the two files agree.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_PROVIDED_INVARIANTS_MISMATCH - code: MIGRATION.CHECK_REF_UNREADABLE namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a ref file in a space''s `refs/` directory cannot be read or parsed. Repair or remove the corrupt ref file.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_REF_UNREADABLE - code: MIGRATION.CHECK_SNAPSHOT_HASH_MISMATCH namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a migration declares a destination hash `to` but the contract snapshot stored for that hash has a different inner `storage.storageHash`. Re-emit the package so `migration.json` and its snapshot agree.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_SNAPSHOT_HASH_MISMATCH - code: MIGRATION.CHECK_SNAPSHOT_UNPARSEABLE namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: either the migration''s `to` value is not a well-formed 64-hex hash, or the contract snapshot stored for it exists but cannot be parsed. Re-emit the package, or restore `migrations/snapshots/` from version control.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_SNAPSHOT_UNPARSEABLE - code: MIGRATION.CHECK_SPACE_DISJOINTNESS_VIOLATION namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a storage element (table/collection) is claimed by more than one contract space. Update the contracts so each storage element is owned by exactly one space.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_SPACE_DISJOINTNESS_VIOLATION - code: MIGRATION.CHECK_TARGET_MISMATCH namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a contract space''s declared database target differs from the project''s configured target. Update the extension to target the configured database, or change the project target.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_TARGET_MISMATCH - code: MIGRATION.CHECK_UNREACHABLE_MIGRATION namespace: MIGRATION meaning: 'A `migration check` finding, carried as an `error` diagnostic on a completed run that exits `4`: a migration''s `from` hash is not produced by any other migration (and is not the empty state), so the migration is unreachable in the graph. Delete it or re-emit a connecting migration.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CHECK_UNREACHABLE_MIGRATION - code: MIGRATION.CONSENT_PLAN_MISMATCH namespace: MIGRATION meaning: An apply carrying consent was refused because the plan recomputed for it is not the plan that was consented to. `db update` recomputes the plan at apply time and compares its hash against the one the consent was given for; a mismatch means the schema, the contract, or the database moved in between, so applying would carry out operations nobody agreed to. Re-run the command and review the freshly p docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONSENT_PLAN_MISMATCH - code: MIGRATION.CONTRACT_DESERIALIZATION_FAILED namespace: MIGRATION meaning: 'A contract JSON on disk failed to deserialize into a valid contract: either a snapshot-store entry read while migration tooling resolved a contract at a ref or hash, or the emitted `contract.json` read as the fallback source by `db sign` / `db update --to` (invalid JSON, or a value that is not a JSON object). Re-emit the owning migration package (or re-run `prisma contract emit` for the emitted co' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONTRACT_DESERIALIZATION_FAILED - code: MIGRATION.CONTRACT_SNAPSHOT_HASH_MISMATCH namespace: MIGRATION meaning: 'While writing a contract snapshot, the contract JSON''s inner `storage.storageHash` does not equal the storage hash the snapshot is being filed under — the two must agree by construction. Primarily an authoring/tooling invariant rather than something a user causes directly. Payload: `storageHash`, `actualHash`, `dir`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONTRACT_SNAPSHOT_HASH_MISMATCH - code: MIGRATION.CONTRACT_SNAPSHOT_MISSING namespace: MIGRATION meaning: 'A contract snapshot expected under `migrations/snapshots/` for a given storage hash does not exist on disk, so commands that need the contract at that hash (`migration plan`, `ref`-based resolution, `migration check`) cannot proceed. Re-run the command that authored the referencing migration to regenerate the snapshot, or restore `migrations/snapshots/` from version control. Payload: `storageHash`' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONTRACT_SNAPSHOT_MISSING - code: MIGRATION.CONTRACT_SPACE_LAYOUT_VIOLATION namespace: MIGRATION meaning: 'The on-disk `migrations/` directory and the `extensions` declaration in config disagree: an orphan space directory exists with no declaring extension, or a declared extension has no migrations directory. All layout offences are bundled into one envelope. Raised when db commands load the contract-space aggregate. Payload: `violations` (list of `{kind, spaceId}`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONTRACT_SPACE_LAYOUT_VIOLATION - code: MIGRATION.CONTRACT_SPACE_VIOLATION namespace: MIGRATION meaning: 'A contract-space check raised under one code, in two lanes with different exits. As an error at exit `2` when the check could not run: a space''s target mismatches the project target, two spaces claim the same storage element, a space contract is unreadable, or aggregate introspection failed (`db verify`, `db run`). As an `error`-severity diagnostic on a completed `db verify` run that exits `4` — i' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONTRACT_SPACE_VIOLATION - code: MIGRATION.CONTRACT_VIEW_MISSING namespace: MIGRATION meaning: 'A migration object''s `endContract`/`startContract` accessor was read, but the instance carries no `endContractJson`/`startContractJson` to build the contract view from — typically a migration that overrides `describe()` and carries no contract. Payload: `className`, `accessor`, `jsonField`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.CONTRACT_VIEW_MISSING - code: MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH namespace: MIGRATION meaning: 'At migration authoring/emit time, a `dataTransform(endContract, …)` produced a query plan whose storage hash does not match the contract passed to `dataTransform` — the query builder was configured with a different contract reference than the migration itself. Make both use the same imported `endContract`. Payload: `dataTransformName`, `expected`, `actual`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH - code: MIGRATION.DESCRIBE_INVALID namespace: MIGRATION meaning: 'A migration author class''s `describe()` result is unusable: it carries neither an `endContractJson` nor an override, or the returned metadata fails validation. Raised while loading/describing an authored migration. Payload: `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DESCRIBE_INVALID - code: MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH namespace: MIGRATION meaning: 'An extension descriptor publishes a `contractSpace` whose `headRef.hash` does not match the hash recomputed from its `contractJson` — the descriptor was published with a stale head hash, typically because the contract was bumped without rerunning the extension''s emit pipeline. Payload: `extensionId`, `recomputedHash`, `headRefHash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH - code: MIGRATION.DESTINATION_CONTRACT_MISMATCH namespace: MIGRATION meaning: 'Runner-level failure during apply (`db init`, `db update`, `migrate`): the plan''s destination storage hash (or profile hash) does not match the destination contract handed to the runner alongside it. Indicates the plan and contract came from different emits. Payload: `planStorageHash`/`contractStorageHash` (or `planProfileHash`/`contractProfileHash`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DESTINATION_CONTRACT_MISMATCH - code: MIGRATION.DESTRUCTIVE_CHANGES namespace: MIGRATION meaning: 'The planned operations include destructive changes (e.g. DROP) and the command was run without explicit consent. `db update` asks for that consent instead of failing: interactively it asks you to type the name of the database it is about to change, and outside an interactive terminal it is granted by `--confirm ` (`--yes` accepts declared prompt defaults and never grants consent; `--conf' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DESTRUCTIVE_CHANGES - code: MIGRATION.DIR_EXISTS namespace: MIGRATION meaning: '`migration new`/`migration plan` refused to scaffold because the target migration directory already exists — each migration needs a unique directory. Pick a different `--name` or delete the existing directory. Payload: `dir`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DIR_EXISTS - code: MIGRATION.DUPLICATE_INVARIANT_IN_EDGE namespace: MIGRATION meaning: 'Two `dataTransform` operations on the same migration declare the same `invariantId`. Invariants are stored per-migration as a set, so two operations cannot share a routing identity; rename one, or drop the `invariantId` on the operation that need not be routing-visible. Payload: `invariantId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DUPLICATE_INVARIANT_IN_EDGE - code: MIGRATION.DUPLICATE_MIGRATION_HASH namespace: MIGRATION meaning: 'While reconstructing the migration graph, two migrations were found sharing the same `migrationHash`; each migration must have a unique content-addressed identity. Regenerate one of the conflicting migrations. Payload: `migrationHash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DUPLICATE_MIGRATION_HASH - code: MIGRATION.DUPLICATE_SPACE_ID namespace: MIGRATION meaning: 'The per-space migration planner received the same contract-space id more than once, usually a repeated entry in `extensions`. Deduplicate the inputs. Payload: `spaceId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.DUPLICATE_SPACE_ID - code: MIGRATION.EXECUTION_FAILED namespace: MIGRATION meaning: 'A migration operation''s SQL step failed while being executed against the database during apply (`db init`, `db update`, `migrate`). The envelope carries the database error detail so you can see which statement failed and why. Payload: `operationId`, `stepDescription`, `sql`, `sqlState`, `constraint`, `table`, `column`, `detail`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.EXECUTION_FAILED - code: MIGRATION.FILE_MISSING namespace: MIGRATION meaning: 'A required migration file is absent: either an on-disk package is missing `migration.json`/`ops.json` (migration-tools loader — re-emit via the package''s `migration.ts`), or a `migration.ts` source file was expected at a package directory and not found (scaffold one with `migration new` or `migration plan`). Payload: `file`, `dir` (loader variant) or `dir` (source-file variant).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.FILE_MISSING - code: MIGRATION.FOREIGN_KEY_VIOLATION namespace: MIGRATION meaning: 'SQLite only: after applying migration plans with `PRAGMA foreign_keys` temporarily off (needed for recreate-table operations), the post-apply `PRAGMA foreign_key_check` reported broken references, and the whole transaction is rolled back. Payload: `violations` (rows from the pragma).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.FOREIGN_KEY_VIOLATION - code: MIGRATION.HASH_MISMATCH namespace: MIGRATION meaning: 'A migration package on disk is corrupt: the `migrationHash` stored in `migration.json` does not match the hash recomputed from the package contents. Raised whenever migration tooling loads packages (plan, list, apply). Re-emit the package via its `migration.ts` or restore from version control. Payload: `dir`, `storedHash`, `computedHash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.HASH_MISMATCH - code: MIGRATION.HASH_NOT_IN_GRAPH namespace: MIGRATION meaning: 'A contract hash the user supplied (or that a ref resolved to) is not a node in the on-disk migration graph — raised during plan resolution (`migration plan --from`), `ref set`, and `migration new --from`. The envelope lists the reachable hashes and suggests a valid one or running `migration plan` to introduce it. Payload: `hash`/`resolvedHash`, `reachableHashes` or `reachableRefs`, sometimes `grap' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.HASH_NOT_IN_GRAPH - code: MIGRATION.INVALID_DEFAULT_EXPORT namespace: MIGRATION meaning: 'The `migration.ts` in a package directory does not default-export a valid migration: it must export a `Migration` subclass or a factory function returning a plan-shaped object (`operations` array plus `targetId` and `destination`). Payload: `dir`, `actualExport` (when known).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_DEFAULT_EXPORT - code: MIGRATION.INVALID_DEST_NAME namespace: MIGRATION meaning: 'A copy-destination name in a migration package''s copy list is not a single path segment (contains `..` or directory separators). Use a simple file name such as `contract.json`. Payload: `destName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_DEST_NAME - code: MIGRATION.INVALID_INVARIANT_ID namespace: MIGRATION meaning: 'An `invariantId` on a `dataTransform` is empty or contains whitespace/control characters. Pick an id without spaces, tabs, newlines, or control characters. Payload: `invariantId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_INVARIANT_ID - code: MIGRATION.INVALID_JSON namespace: MIGRATION meaning: 'A migration file (`migration.json` or `ops.json`) exists but is not parseable JSON. Re-emit the package via its `migration.ts` or restore from version control. Payload: `filePath`, `parseError`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_JSON - code: MIGRATION.INVALID_MANIFEST namespace: MIGRATION meaning: 'A `migration.json` manifest parsed as JSON but failed schema validation. Re-emit the package or restore from version control. Payload: `filePath`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_MANIFEST - code: MIGRATION.INVALID_NAME namespace: MIGRATION meaning: 'The migration name given to `migration new`/`migration plan --name` contains no valid characters after sanitization (only a-z and 0-9 are kept). Provide a name with at least one alphanumeric character. Payload: `slug`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_NAME - code: MIGRATION.INVALID_OPERATION_ENTRY namespace: MIGRATION meaning: 'An operation returned by an authored migration class failed schema validation during emit — each entry of `operations` must carry `id`, `label`, and an `operationClass` of `additive`, `widening`, `destructive`, or `data`. Also raised when deserializing a persisted Mongo migration plan hits a malformed or unknown entry (filter, pipeline stage, DML/DDL/inspection command). Payload: `index`, `reason`' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_OPERATION_ENTRY - code: MIGRATION.INVALID_REF_FILE namespace: MIGRATION meaning: 'A ref file under `migrations//refs/` is not valid JSON or does not match the expected `{ "hash": "<64 hex>", "invariants": [...] }` shape. Payload: `path`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_REF_FILE - code: MIGRATION.INVALID_REF_NAME namespace: MIGRATION meaning: 'A ref name is syntactically invalid: names must be lowercase alphanumeric with hyphens or forward slashes, with no `.` or `..` segments. Raised by `ref` commands and any ref-consuming tooling. Payload: `refName`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_REF_NAME - code: MIGRATION.INVALID_REF_VALUE namespace: MIGRATION meaning: 'The value given for a ref (e.g. to `ref set`) is not a valid contract hash — it must be 64 lowercase hex chars or `empty`. Payload: `value`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_REF_VALUE - code: MIGRATION.INVALID_REFS namespace: MIGRATION meaning: 'A legacy `refs.json` file is invalid — it must be a flat object mapping valid ref names to contract hash strings. Payload: `path`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_REFS - code: MIGRATION.INVALID_SPACE_ID namespace: MIGRATION meaning: 'A contract-space id (e.g. via `--space` or in planner input) does not match the required pattern `[a-z][a-z0-9_-]{0,63}` — space ids double as directory names under `migrations/`, so the rule is conservative. Payload: `spaceId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.INVALID_SPACE_ID - code: MIGRATION.LEGACY_MARKER_SHAPE namespace: MIGRATION meaning: 'The database''s marker table (`prisma_contract.marker` on Postgres, `_prisma_marker` on SQLite) has the pre-per-space shape (no `space` column). The transitional auto-migration has been removed; drop the marker table and re-run `prisma db init` to reinitialise from a clean baseline. Detected during `db init`/`db update`/apply. Payload: `table`, `columns` (runner variant) or `runnerErrorCode` (marke' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.LEGACY_MARKER_SHAPE - code: MIGRATION.LEGEND_HUMAN_ONLY namespace: MIGRATION meaning: '`migration list --legend` was combined with a machine-readable or silent output flag (`--json`, `--dot`, or `--quiet`); the legend is human-only decoration on stderr. Drop one of the flags. Payload: `conflictingFlag`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.LEGEND_HUMAN_ONLY - code: MIGRATION.MARKER_CAS_FAILURE namespace: MIGRATION meaning: 'While finalizing an apply, the compare-and-swap update of the database''s contract marker found the marker had been modified by another process mid-migration — a concurrent migration raced this one. Payload: `space`, `expectedStorageHash`, `destinationStorageHash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.MARKER_CAS_FAILURE - code: MIGRATION.MARKER_MISMATCH namespace: MIGRATION meaning: 'The live database marker''s contract hash is not reachable anywhere in the on-disk migration graph — the database and the local migration history have diverged. The fix depends on which side is canonical: `migration plan --from ` (catch the graph up), `ref set db ` (fix a drifted local ref), or investigate out-of-band migration. Payload: `markerHash`, `reachableHashes`, `graphTip` ' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.MARKER_MISMATCH - code: MIGRATION.MARKER_NOT_IN_HISTORY namespace: MIGRATION meaning: 'A warning diagnostic (not a hard failure) in `migration status`: the database''s marker hash does not match any migration in the history, meaning the database was updated outside the migration system. Hints suggest `db sign` (overwrite marker) or `db update` (push the contract).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.MARKER_NOT_IN_HISTORY - code: MIGRATION.MARKER_ORIGIN_MISMATCH namespace: MIGRATION meaning: 'Runner-level failure during apply: the plan asserts an origin contract, but the database marker is missing, or its storage hash (or profile hash) differs from the plan''s origin — the database is not at the state the plan was computed from. Re-plan from the database''s actual state; `db init` intercepts this code to render an init-specific "already initialised at a different contract" message. Paylo' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.MARKER_ORIGIN_MISMATCH - code: MIGRATION.MISSING_INVARIANTS namespace: MIGRATION meaning: 'A diagnostic in `migration status`: the active ref requires data invariants that the database marker does not record as provided. If no path through the graph can supply them, status escalates to `MIGRATION.NO_INVARIANT_PATH`. Payload: `ref` (when a ref is active), `invariants` (the missing ids).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.MISSING_INVARIANTS - code: MIGRATION.NO_CHANGES namespace: MIGRATION meaning: '`migration new` found the from and to contract hashes identical — there is nothing to migrate. Change the contract and re-run `prisma contract emit` first, or pass `--from ` explicitly to author a data-only migration on the current contract hash. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.NO_CHANGES - code: MIGRATION.NO_INITIAL_MIGRATION namespace: MIGRATION meaning: 'While reconstructing the migration graph, no migration starts from the empty contract state, so the history has no entry point. Usually indicates corrupted `migration.json` files. Payload: `nodes` (known hashes).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.NO_INITIAL_MIGRATION - code: MIGRATION.NO_INVARIANT_PATH namespace: MIGRATION meaning: 'The target (or named ref) requires data invariants, and no path through the migration graph from the current state covers all of them. Add a migration on the path that runs a `dataTransform` with each missing `invariantId`, or retarget the ref. Payload: `required`, `missing`, `structuralPath` (edges: `dirName`, `migrationHash`, `from`, `to`, `invariants`), `refName` (when applicable). Also raised ' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.NO_INVARIANT_PATH - code: MIGRATION.NO_MIGRATIONS namespace: MIGRATION meaning: '`migration show` was given a non-path reference but the app space has no migration packages at all, so there is nothing to resolve against. Create a migration with `prisma migration plan` first. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.NO_MIGRATIONS - code: MIGRATION.NO_TARGET namespace: MIGRATION meaning: 'The migration history contains cycles (e.g. after a rollback migration C1→C2→C1) and no target can be resolved automatically. Pass `--from ` to specify the planning origin explicitly. Payload: `reachableHashes`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.NO_TARGET - code: MIGRATION.OPERATION_UNSUPPORTED namespace: MIGRATION meaning: 'A Mongo migration check uses a filter feature the check evaluator does not support — an unsupported filter operator, or an aggregation-expression filter. Payload: `operator`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.OPERATION_UNSUPPORTED - code: MIGRATION.PACKAGE_NOT_FOUND namespace: MIGRATION meaning: '`migration show` or `migration check` resolved its target (a directory path, or a migration reference) but no loaded on-disk migration package matches it — either no package lives at the given path, or the resolved migration''s package failed to load. `migration check` raises it at exit `2`: it could not run the check at all, which is different from running it and finding something. Pass a director' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PACKAGE_NOT_FOUND - code: MIGRATION.PATH_UNREACHABLE namespace: MIGRATION meaning: 'An apply command (`migrate`/`db update`) cannot find a path through the on-disk migration graph from the database''s current marker to the requested target — the connecting edge was never planned. The fix walks you through `migration plan` (with the right `--from`/`--to`) then `migrate`. Payload: carries the underlying failure''s meta (`fromHash`, `targetHash`, `deadEnds`, `kind`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PATH_UNREACHABLE - code: MIGRATION.PLANNING_FAILED namespace: MIGRATION meaning: 'Migration planning (typically during `db init`/`db update`) failed because of conflicts, e.g. the live database already contains objects that clash with the plan. The envelope aggregates each conflict''s summary and suggested fix. Payload: `conflicts`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PLANNING_FAILED - code: MIGRATION.PLAN_NOT_ARRAY namespace: MIGRATION meaning: 'An authored migration''s `operations` getter returned something other than an array. Fix the migration class so `operations` returns an array of operations. Payload: `dir`, `actualValue` (when known).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PLAN_NOT_ARRAY - code: MIGRATION.PLAN_ORIGIN_UNKNOWN namespace: MIGRATION meaning: '`migration plan` was run without `--from` and without a `db` ref while migrations already exist on disk. Planning would silently fall back to an empty-database origin and produce a migration that recreates everything the existing history already creates, so the command refuses. Set the `db` ref (`migration ref set db ` or `db update`), pass `--from `, or pass `--from @empty` to' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PLAN_ORIGIN_UNKNOWN - code: MIGRATION.POLICY_VIOLATION namespace: MIGRATION meaning: 'A planned operation''s class (e.g. `destructive`) is not allowed by the execution-time operation policy in force for the command. Runner-level failure during apply. Payload: `operationId`, `operationClass`, `allowedClasses`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.POLICY_VIOLATION - code: MIGRATION.POSTCHECK_FAILED namespace: MIGRATION meaning: 'After executing a migration operation, one of its postcheck steps (a query expected to return true) did not hold, so the apply is rolled back. Payload: `operationId`, `phase`, `stepDescription`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.POSTCHECK_FAILED - code: MIGRATION.POSTGRES_CONTROL_STACK_MISSING namespace: MIGRATION meaning: 'A `PostgresMigration` operation (e.g. `createTable`, `dataTransform`) was invoked on an instance constructed without a control stack — normal CLI-driven runs always assemble one from `prisma.config.ts`, so this indicates a test fixture or ad-hoc consumer used the no-arg constructor (valid only for introspection). Payload: `operation`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.POSTGRES_CONTROL_STACK_MISSING - code: MIGRATION.PRECHECK_FAILED namespace: MIGRATION meaning: 'Before executing a migration operation, one of its precheck steps (a query expected to return true) did not hold — the database is not in the state the operation requires — so the apply stops and rolls back. Payload: `operationId`, `phase`, `stepDescription`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PRECHECK_FAILED - code: MIGRATION.PROVIDED_INVARIANTS_MISMATCH namespace: MIGRATION meaning: 'The `providedInvariants` stored in `migration.json` disagrees with the canonical value derived from `ops.json` — the manifest was likely hand-edited without re-emitting (a same-ids-different-order case is called out explicitly). Re-emit the package. Payload: `filePath`, `stored`, `derived`, `difference` (`{missing, extra}`).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.PROVIDED_INVARIANTS_MISMATCH - code: MIGRATION.REF_AMBIGUOUS namespace: MIGRATION meaning: 'A contract or migration reference prefix matches more than one candidate (raised by the shared ref-resolution mapper used across CLI commands). Provide a longer prefix or the full hash. Payload: `input`, `candidates`, `grammar`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_AMBIGUOUS - code: MIGRATION.REF_INVALID_FORMAT namespace: MIGRATION meaning: 'A contract or migration reference is syntactically invalid — it is not a hash, ref name, or migration directory name in any accepted form (raised by the shared ref-resolution mapper). Payload: `input`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_INVALID_FORMAT - code: MIGRATION.REF_NOT_FOUND namespace: MIGRATION meaning: 'A contract or migration reference does not resolve: no matching hash, ref name, or migration directory name exists in the migration graph or refs index (raised by the shared ref-resolution mapper used across CLI commands). Payload: `input`, `grammar`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_NOT_FOUND - code: MIGRATION.REF_NOT_RESOLVABLE namespace: MIGRATION meaning: 'A ref name resolves to nothing: no pointer file with that name exists, and the fallback hash is not a node in the migration graph either, so there is no contract to materialize. Create the ref with `ref set`, advance it via `db update --advance-ref`, or pass a graph-node hash. Payload: `refName`, `identifier`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_NOT_RESOLVABLE - code: MIGRATION.REF_SET_BUNDLE_NOT_FOUND namespace: MIGRATION meaning: '`ref set` resolved the given hash to a graph node, but no on-disk migration bundle has that hash as its destination, so the ref would point at a node with no backing package. Re-emit the migration that produces this hash. Payload: `hash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_SET_BUNDLE_NOT_FOUND - code: MIGRATION.REF_SET_EMPTY_SENTINEL namespace: MIGRATION meaning: '`ref set` was asked to point a ref at the empty-database sentinel hash, which is a planner internal and not a valid ref target. Use a real contract hash from the migration graph. Payload: `hash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_SET_EMPTY_SENTINEL - code: MIGRATION.REF_WRONG_GRAMMAR namespace: MIGRATION meaning: 'A reference parsed, but as the wrong kind for the argument position — e.g. a migration-only reference where a contract reference is required (raised by the shared ref-resolution mapper). The message and fix come from the resolver''s own diagnosis. Payload: `input`, `expectedGrammar`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.REF_WRONG_GRAMMAR - code: MIGRATION.RUNNER_FAILED namespace: MIGRATION meaning: Generic wrapper for a migration runner failure during execution that has no more specific code; the summary/why carry the underlying detail (also used to surface the legacy-marker-shape condition from marker reads, with `meta.runnerErrorCode`). `migrate` and `db init` map unrecognized apply failures through it, passing the failure's own meta through unchanged. Inspect the reported summary/why deta docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.RUNNER_FAILED - code: MIGRATION.SAME_SOURCE_AND_TARGET namespace: MIGRATION meaning: 'A migration''s `from` and `to` hashes are identical and it declares no data-transform operations — a pure no-op self-edge, which is only allowed when the migration runs at least one `dataTransform`. Change the contract, add a dataTransform, or delete the migration. Payload: `dirName`, `hash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.SAME_SOURCE_AND_TARGET - code: MIGRATION.SCHEMA_VERIFY_FAILED namespace: MIGRATION meaning: 'After applying migrations, the runner introspected the database and the resulting schema does not satisfy the destination contract; the apply is rolled back. Runner-level failure during `db init`/`db update`/`migrate`. Payload: `issues` (schema diff issues).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.SCHEMA_VERIFY_FAILED - code: MIGRATION.SNAPSHOT_MISSING namespace: MIGRATION meaning: 'A `--from` reference cannot produce a contract: either a ref name has no pointer file and the fallback hash is not a graph node (`viaRef: true`), or an explicit `--from ` was given on an empty migration graph and names no ref (`viaRef: false`). Payload: `identifier`, `viaRef`. Also raised by `db sign` when a contract reference resolves to a hash but no migration produces that hash and the em' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.SNAPSHOT_MISSING - code: MIGRATION.SPACE_NOT_FOUND namespace: MIGRATION meaning: '`migration list --space ` (and similar space-scoped commands) named a contract space with no directory under `migrations/`. Distinct from an existing-but-empty space, which renders an empty state and exits 0. The envelope lists the space directories that do exist. Payload: `spaceId`, `availableSpaces`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.SPACE_NOT_FOUND - code: MIGRATION.SQLITE_CONTROL_STACK_MISSING namespace: MIGRATION meaning: 'SQLite twin of `MIGRATION.POSTGRES_CONTROL_STACK_MISSING`: a `SqliteMigration` operation needing the control adapter was invoked on an instance constructed without a control stack (only introspection is valid in that form). Payload: `operation`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.SQLITE_CONTROL_STACK_MISSING - code: MIGRATION.TABLE_NAME_CASE_CHANGED namespace: MIGRATION meaning: The planner would drop table `X` and create table `Y` in the same namespace, where `X` is `Y` with its first letter lowered; the columns are not compared. That is the shape of a schema upgraded across the release in which a model with no `@@map` stopped lowering the first letter of its table name (`model UserProfile` now names `"UserProfile"`, previously `"userProfile"`); planning it would recreat docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.TABLE_NAME_CASE_CHANGED - code: MIGRATION.TARGET_MISMATCH namespace: MIGRATION meaning: 'A migration script declares one `targetId` but the loaded `prisma.config.ts` declares another; the script can only run against a config targeting the same database. Switch configs or pass `--config `. Payload: `migrationTargetId`, `configTargetId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.TARGET_MISMATCH - code: MIGRATION.TARGET_NOT_APP_SPACE namespace: MIGRATION meaning: 'A filesystem-path target given to a migration command does not resolve to an app-space migration directory — it points outside the app space''s migrations directory, or at that directory''s root itself. Pass an app-space migration directory or use a hash prefix. Payload: none.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.TARGET_NOT_APP_SPACE - code: MIGRATION.TARGET_UNSUPPORTED namespace: MIGRATION meaning: The configured target does not provide migration support (no planner/runner via `target.migrations`), so migration commands like `db init` cannot run against it. Select a target that provides migrations. docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.TARGET_UNSUPPORTED - code: MIGRATION.UNFILLED_PLACEHOLDER namespace: MIGRATION meaning: 'A scaffolded migration still contains a `placeholder(...)` call that the author never replaced with a real query; it throws when the migration is emitted or run. The `slot` names the exact location to edit (e.g. `"backfill-product-status:check.source"`). Payload: `slot`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.UNFILLED_PLACEHOLDER - code: MIGRATION.UNKNOWN_INVARIANT namespace: MIGRATION meaning: 'A ref declares required invariants that no migration anywhere in the graph provides — either the ref has a typo or the providing migration has not been authored yet. Payload: `unknown`, `declared`, `refName` (when applicable).' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.UNKNOWN_INVARIANT - code: MIGRATION.UNKNOWN_REF namespace: MIGRATION meaning: 'A ref name was used (read, resolved, or deleted via `ref` commands) but no ref file with that name exists. Create it with `prisma ref set `, or run `ref list` to see what exists. Payload: `refName`, `filePath` or `availableRefs` depending on the site.' docs: https://www.prisma.io/docs/orm/reference/error-reference#MIGRATION.UNKNOWN_REF - code: PLAN.HASH_MISMATCH namespace: PLAN meaning: 'At execute time, the plan''s `meta.storageHash` does not match the runtime contract''s storage hash — the plan was built against a different version of the contract than the one the runtime holds. Rebuild the plan against the current contract. Payload: `planStorageHash`, `runtimeStorageHash`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#PLAN.HASH_MISMATCH - code: PLAN.TARGET_MISMATCH namespace: PLAN meaning: 'At execute time, the plan''s `meta.target` does not match the runtime contract''s target — e.g. a plan built for postgres submitted to a sqlite runtime. Payload: `planTarget`, `runtimeTarget`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#PLAN.TARGET_MISMATCH - code: BUDGET.ROWS_EXCEEDED namespace: BUDGET meaning: 'The `budgets` middleware blocks (or warns about) a query expected or observed to return more rows than the configured `maxRows` budget. Thrown before execution for an unbounded SELECT (no LIMIT, no aggregate-without-GROUP-BY) or when the AST-based row estimate exceeds the budget, and during row streaming when the observed row count crosses `maxRows`; raw-SQL guardrails also emit it for raw SELECT ' docs: https://www.prisma.io/docs/orm/reference/error-reference#BUDGET.ROWS_EXCEEDED - code: BUDGET.TIME_EXCEEDED namespace: BUDGET meaning: 'The `budgets` middleware reports after execution that a query''s latency exceeded the configured `maxLatencyMs` budget. Default severity is warn (logged); it throws when the latency severity is configured as `error` or the runtime runs in strict mode. Payload: `latencyMs`, `maxLatencyMs`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#BUDGET.TIME_EXCEEDED - code: LINT.DELETE_WITHOUT_WHERE namespace: LINT meaning: 'The `lints` middleware found a DELETE plan with no WHERE clause and blocks execution to prevent an accidental full-table deletion. Default severity is error (throws); configurable to warn. Payload: `table`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#LINT.DELETE_WITHOUT_WHERE - code: LINT.NO_LIMIT namespace: LINT meaning: 'The `lints` middleware (or raw-SQL guardrails) found a SELECT with no LIMIT, which may return an unboundedly large result set. Default severity is warn (logged, execution proceeds); raw-SQL plans are checked heuristically against the SQL text. Payload: `table` (AST path) or `sql` snippet (raw path).' docs: https://www.prisma.io/docs/orm/reference/error-reference#LINT.NO_LIMIT - code: LINT.READ_ONLY_MUTATION namespace: LINT meaning: 'Raw-SQL guardrails found a mutating statement (INSERT/UPDATE/DELETE/DDL) in a plan whose meta annotations declare a read-only intent (`read`, `report`, or `readonly`). Default severity is error (throws). Payload: `sql`, `intent`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#LINT.READ_ONLY_MUTATION - code: LINT.SELECT_STAR namespace: LINT meaning: 'The `lints` middleware found a query that selects all columns — via the builder''s selectAll intent on AST plans, or a literal `SELECT *` in raw SQL. Default severity is warn on the AST path, error on the raw path. Payload: `table` (AST path) or `sql` snippet (raw path).' docs: https://www.prisma.io/docs/orm/reference/error-reference#LINT.SELECT_STAR - code: LINT.UPDATE_WITHOUT_WHERE namespace: LINT meaning: 'The `lints` middleware found an UPDATE plan with no WHERE clause and blocks execution to prevent an accidental full-table update. Default severity is error (throws); configurable to warn. Payload: `table`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#LINT.UPDATE_WITHOUT_WHERE - code: PARADEDB.ARGUMENT_INVALID namespace: PARADEDB meaning: 'A ParadeDB search-function helper received an invalid argument — a malformed query object, an out-of-range numeric option, or an option combination the function does not accept. Raised while authoring/lowering the search expression. Payload: `helper`, `argument`, `received`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#PARADEDB.ARGUMENT_INVALID - code: POSTGIS.GEOMETRY_INVALID namespace: POSTGIS meaning: 'A PostGIS geometry constructor (`point`, `polygon`, `bboxPolygon`, …) received invalid input: non-finite coordinates, a ring that is not closed, too few points, or a malformed bounding box. Raised at construction time, before the value reaches the database. Payload: `constructor`, `received`, `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#POSTGIS.GEOMETRY_INVALID - code: SUPABASE.CONFIG_INVALID namespace: SUPABASE meaning: 'The Supabase extension''s runtime configuration is invalid — missing or contradictory connection/auth settings (formerly the `SupabaseConfigError` class, removed at 0.17). Payload: `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#SUPABASE.CONFIG_INVALID - code: SUPABASE.JWT_INVALID namespace: SUPABASE meaning: 'A JWT handed to the Supabase runtime failed validation — malformed token, missing claims, or signature/JWKS mismatch (formerly the `InvalidJwtError` class, removed at 0.17). Payload: `reason`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#SUPABASE.JWT_INVALID - code: TESTKIT.CODEC_DESCRIPTOR_MISSING namespace: TESTKIT meaning: 'A conformance case names a codec id the target''s built-in descriptor registry does not know, and the case supplies no descriptor of its own. The harness projects and decodes through the codec descriptor under test, so an extension codec must be supplied on the case. Payload: `codecId`.' docs: https://www.prisma.io/docs/orm/reference/error-reference#TESTKIT.CODEC_DESCRIPTOR_MISSING - code: TESTKIT.CONFORMANCE_CASE_INVALID namespace: TESTKIT meaning: A `many` conformance case carries a value that is neither an array nor null — the harness maps element-wise over array cases and has nothing to map over. Give the case an array of element values, or null. docs: https://www.prisma.io/docs/orm/reference/error-reference#TESTKIT.CONFORMANCE_CASE_INVALID - code: TESTKIT.PROJECTION_MALFORMED namespace: TESTKIT meaning: 'The executed JSON projection came back in a shape the codec descriptor does not declare: the projected document is missing its value key, or an array projection produced something other than a JSON array or null. This points at the projection SQL the descriptor under test renders. Payload: `codecId` (when the case is known).' docs: https://www.prisma.io/docs/orm/reference/error-reference#TESTKIT.PROJECTION_MALFORMED