Releases: prisma/orm
Release list
v8.0.0-rc.11
v8.0.0-rc.11
This release moves the toolchain onto @prisma/[email protected], which adds a Markdown output format to every CLI command. Nothing else changed since rc.10.
The upgrade recipes for this hop: the app recipe and the extension recipe.
Breaking changes
- The engine peer moves to
@prisma/[email protected]—@prisma/orm-toolchaindeclares the unified CLI's engine as an exact peer, and this release peers 0.4.0 (up from 0.3.0), so a project that pins the engine itself must change its pin. Under a host CLI running on that engine, every command supports--format markdown, which prints the command's output as Markdown; the engine'sFormattype widens from"human" | "json"to"human" | "json" | "markdown". No other public API changed. Projects assembled by theprismaCLI resolve the engine automatically; a project that pins@prisma/cli-engineitself must move the pin to0.4.0. (prisma/prisma-cli#260)
v8.0.0-rc.10
v8.0.0-rc.10
This RC finishes the rename from Prisma Next to Prisma 8 in every identifier a project can see (the old schema header keeps working, the old environment variables do not), adds named model and result types to the emitted contract, makes db sign set the db ref so the first plan after adoption stays incremental, and adds attribute completion to the language server.
Breaking changes
-
CLI environment variables lose the
NEXT_infix.PRISMA_NEXT_DISABLE_TELEMETRY,PRISMA_NEXT_TELEMETRY_ENDPOINT,PRISMA_NEXT_DEBUG, and the rest are nowPRISMA_DISABLE_TELEMETRY,PRISMA_TELEMETRY_ENDPOINT,PRISMA_DEBUG, and so on. Only the oldPRISMA_NEXT_DISABLE_TELEMETRYopt-out is still honoured; rename the others in shell profiles,.envfiles, and CI. The per-user telemetry config moves from~/.config/prisma-next/to~/.config/prisma-8/, so the one-time telemetry notice prints once more.orm initnow writes its primer asprisma-8.mdinstead ofprisma-next.md. See the app upgrade recipe. (#30262) -
To-one relations record their nullability in the contract. Every
1:1andN:1relation incontract.jsonnow carries anullableboolean taken from the?on the relation field, andcontract emitrejects a required relation field over a nullable foreign key (or the reverse). Runprisma contract emitonce after upgrading: a contract emitted by an earlier release still loads, with the flag derived from the foreign-key columns, but itscontract.d.tslacks the newModelsnamespace until you re-emit. Extension authors:ContractNonJunctionRelation's'1:1'and'N:1'members requirenullable, contract validation rejects acontract.jsonwithout it, and every contract space needs a rebuild. See the app upgrade recipe and the extension upgrade recipe. (#30231)Before:
{ "cardinality": "N:1", "on": { "...": "..." } }After:
{ "cardinality": "N:1", "nullable": false, "on": { "...": "..." } }
Features
-
The schema header is now
// use prisma-8, and// use prisma-nextis deprecated.orm initandcontract inferwrite the new header. The old one still works:contract emitnever reads the header, and the language server still recognises it and rewrites it to the new form when you format the file. Replace it at your convenience; the app upgrade recipe does it for you. (#30262) -
Named model and result types.
contract.d.tsexports aModelsnamespace and amodelsconstant with one member per model (Models.public_User, ortypeof models.public.User; bare names on SQLite).Scalars<M>names the row a default fetch returns,Shape<M, Spec>derives a data structure with chosen scalars and nested relations, andResultTypenow works on ORM queries instead of returningnever. Both come from@prisma/orm-postgres/family-contract/types(or the@prisma/orm-mongoequivalent). These replace Prisma 7'sPrisma.UserandUserGetPayload<...>. (#30231)import type { Models } from './prisma/contract'; import type { Scalars, Shape } from '@prisma/orm-postgres/family-contract/types'; import type { ResultType } from '@prisma/orm-postgres/components/runtime'; type UserRow = Scalars<Models.public_User>; type UserResponse = Shape<Models.public_User, { '-': 'passwordHash'; posts: { '+': 'id' | 'title' } }>; const usersWithPosts = db.orm.public.User.include('posts'); type UserWithPosts = ResultType<typeof usersWithPosts>;
-
Attribute completion in the language server. Editors now complete field, model, and block attribute names and their named argument keys from the installed target and extensions, and insert required arguments as editable snippets where the editor supports them. (#30249)
-
db signcan choose or skip the ref it advances.--advance-ref <name>writes another ref thandb,--no-advance-refsigns without writing any ref or snapshot, and--jsonoutput gainsadvancedRef: { name, hash }(ornull). (#30251)
Fixes
- After
db sign,migration planproposes only the change instead of recreating every table.db signnow sets thedbref to the signed contract, even when the database is named with--db, so adopting an existing database no longer needs a baseline plan, a second sign, and a manualmigration ref set. When no ref is set and no migrations exist,migration planprints a notice that it is planning from an empty database, and--jsongainsfromDefaulted: true. (#30251) - Buffered PostgreSQL queries release their pooled connection before rows are decoded or consumed, so a paused result iterator no longer holds a connection and blocks other queries on a small pool. Cursor streams keep their connection until completion; caller-owned connections and transactions are untouched. (#30259)
orm initinstallsprisma@latestinstead ofprisma@next, a dist-tag that no longer exists, so a freshorm initcompletes its install step again. The engine fallback is@prisma/cli-engine@latest. (#30248)- The bundled
prisma-8agent skill matches the rc.9 surface again: a review of every reference file corrected 21 statements that no longer matched the CLI or runtime, and the sample projects are keyed by namespace. (#30250)
v8.0.0-rc.9
v8.0.0-rc.9
This RC tightens schema validation, adds reusable query-filter types, and fixes language-server diagnostics and PostgreSQL migration verification.
Breaking changes
-
Text-backed enum ordering follows stored values. PostgreSQL
ORDER BYandDISTINCT ONno longer impose enum declaration order. If semantic ranking matters, use an explicit ranking expression or numeric enum values; native PostgreSQL enums retain their database ordering. Changing existing storage to numeric values requires a data-preserving migration, including defaults and constraints—not rewriting applied migration history. See the app upgrade recipe. (#30223) -
MongoDB index arguments use native schema values. Replace encoded wildcard-index
include/excludestrings with string lists and encoded text-indexweightsstrings with records. Weights must be integers from 1 to 99,999; malformed and unsupported arguments now fail validation. Thefilterargument remains quoted JSON. See the app upgrade recipe. (#29833)Before:
@@index([wildcard()], include: "[metadata, nested.path]") @@textIndex([title, body], weights: "{\"title\": 10, \"body\": 5}")
After:
@@index([wildcard()], include: ["metadata", "nested.path"]) @@textIndex([title, body], weights: { title: 10, body: 5 })
-
MongoDB rejects previously ignored attributes. Remove unsupported
@default,@updatedAt, and@db.*attributes from MongoDB schemas only. They never produced defaults or timestamps in the MongoDB contract; these remain application responsibilities. Unknown model and field attributes now fail emission, and@id/@uniquereject arguments. See the app upgrade recipe for schema migration. (#30160)Before:
status ProductStatus @default(Active) updatedAt DateTime @updatedAt
After:
status ProductStatus updatedAt DateTime
-
Reusable SQL ORM filter types require a namespace. Update
ShorthandWhereFilter,RelationPredicate,RelationPredicateInput, andRelationFilterAccessorto use<Contract, Namespace, Model>. Existing three-argument shorthand annotations must reorder their model and namespace arguments. See the app upgrade recipe and extension upgrade recipe. (#30158)Before:
ShorthandWhereFilter<Contract, 'User'>
After:
ShorthandWhereFilter<Contract, 'public', 'User'>
-
SQL ORM upsert and batch-create inputs reject nested relation callbacks.
upsert({ create }),createAll(), andcreateAndCount()no longer accept callbacks they cannot execute. Use ordinarycreate()when nested creation is intended, or create related records separately when retaining upsert or batch behavior. See the upgrade recipe. (#30144) -
Language-server support requires the schema directive. Put
// use prisma-nextbefore other non-whitespace content in each Prisma 8 schema file to retain diagnostics, completion, formatting, and other language-server features. Unmarked files are excluded from this server's schema composition. (#30140)
Features
- Extract reusable, fully typed SQL-builder predicates with
WhereFilter<Contract, Namespace, Table>, exported from@prisma/orm-postgres/builder/types. (#30158) - PostgreSQL numeric enums now derive membership CHECK constraints for scalar and array columns. (#30223)
Fixes
- Valid schemas, including those generated by
prisma orm init, no longer receive false attribute diagnostics when the language server and project interpreter load separate parser copies. Update project ORM packages to receive the fix. (#30228) - Ordering native PostgreSQL enum columns no longer fails with an
array_position(text[], enum)error. (#30191) - PostgreSQL
int8literal defaults compare correctly during migration verification when introspection returns decimal strings and the contract uses safe-integer numbers. (#30194) - Codec factories preserve their descriptor receiver, preventing codec-ID crashes from masking useful encoding and decoding errors. (#30222)
- Schema validation errors now list accepted functions, such as
now()anduuid(), instead of repeating “function call.” (#30224) - CLI help, diagnostics, telemetry notices, and generated project documentation consistently use “Prisma ORM.” (#30192)
v8.0.0-rc.8
v8.0.0-rc.8
The toolchain releases against @prisma/[email protected], which now takes the Management API SDK as a peer dependency, and migration plan no longer plans silently from an empty database when migrations already exist.
The upgrade recipe for this hop: the user recipe.
Breaking changes
- The engine peer moves to
@prisma/[email protected]—@prisma/orm-toolchaindeclares the unified CLI's engine as an exact peer, and this release peers 0.3.0 (up from 0.2.3). The engine's change:@prisma/management-api-sdkmoves from a regular dependency to a peer dependency (^1.55.0), supplied by theprismaCLI shell at runtime. Installs assembled by the unifiedprismaCLI resolve one engine as before; a host that pins the engine itself must move to 0.3.0 and, if it runs the engine outside the CLI shell, install the SDK itself. (prisma/prisma-cli#236)
Features
- The
prisma-8skill, auto-installed into every project byprisma init, now teaches agents the migration system's real model — plan-from-state with explicit baselines, not a linear chain — so agents stop producing full-create plans against real databases. (#30123)
Fixes
migration planrefuses to plan from an empty database when the project already has migrations on disk, instead of silently producing a full-create package that fails against any real database. A structured error explains the situation; planning from baseline remains available as an explicit opt-in. (#30122)- Structured errors'
docsUrllinks now point atdocs.prisma.io/docs/orm/v8/...instead of the pre-RCorm/next/...path. (#30126) - The language server now canonicalizes Windows file URIs, so schema files configured with Windows paths (
D:\project\next.prisma) are recognized as part of the project. (#30121) - The
devdist-tag no longer goes stale after a release: a release push tomainalso publishes a-dev.1build of the new base, so@devinstalls always resolve against the current release's engine pins. (#30125)
v8.0.0-rc.7
v8.0.0-rc.7
ORM collection pagination renames to limit/offset, and the toolchain releases against @prisma/[email protected], the engine whose config loader ships the prisma init scaffold fixes from the unified CLI's rc line.
The upgrade recipe for this hop: the user recipe.
Breaking changes
-
ORM pagination is
limit/offset, nottake/skip—.take(n)and.skip(n)are renamed to.limit(n)and.offset(n)on SQL and Mongo ORM collections, including relation refinements and grouped SQL collections; the old names are removed. Semantics are unchanged. Mongo's lower-level query builder keeps.skip(n)— it names the native$skippipeline stage, not the collection API. (#30112)Before:
await db.orm.User.orderBy((u) => u.id.asc()).skip(10).take(10).all();
After:
await db.orm.User.orderBy((u) => u.id.asc()).offset(10).limit(10).all();
-
The engine peer moves to
@prisma/[email protected]—@prisma/orm-toolchaindeclares the unified CLI's engine as an exact peer, and this release peers 0.2.3 (up from 0.2.2). Installs assembled by the unifiedprismaCLI resolve one engine as before; a host that pins the engine itself must move to 0.2.3. (prisma/prisma-cli#225, prisma/prisma-cli#227)
v8.0.0-rc.6
v8.0.0-rc.6
PostgreSQL temporal columns move from Date to explicit Temporal-or-text representations, the prisma-8 agent skill ships inside the ORM packages a project installs, prisma orm init hands agent-skills setup to the family-level prisma init, and the toolchain releases against @prisma/[email protected] — the engine that evaluates prisma.config.ts correctly under pnpm symlink layouts.
The upgrade recipe for this hop: the user recipe.
Breaking changes
-
PostgreSQL temporal columns read as
Temporalvalues or text, neverDate— each ofdate,timestamp(p),timestamptz(p)andtime(p)now has two representation-explicit codecs: aTemporal-backed one (the bare PSL spellingsDate,Timestamp,Timestamptz,Timeselect it) and a text one (DateString,TimestampString,TimestamptzString,TimeString). The previous codecs (pg/date@1,pg/timestamp@1,pg/timestamptz@1,pg/time@1,sql/timestamp@1/field.timestamp()) are removed with no aliases. Pick a representation per column, re-emit every contract, and provide a globalTemporalimplementation (e.g.import 'temporal-polyfill/full/global') wherever a Temporal-backed column is read. See the migration recipe. (#30073)Before:
occurredAt Timestamptz // read as DateAfter (read as
Temporal.Instant):occurredAt Timestamptz
Or, to keep PostgreSQL's text unchanged:
occurredAt TimestamptzString
-
prisma orm initno longer installs agent skills — the GitHub fetch (npx skills add) is removed and nothing replaces it insideorm init: agent-skills setup belongs to the family-levelprisma initcommand, which init's next-steps now point to. The--skip-skillsflag is removed with the behavior it opted out of, and the skill-install failure exit (code 6) is retired. Scaffolding is otherwise unchanged. (#30097) -
The engine peer moves to
@prisma/[email protected]—@prisma/orm-toolchaindeclares the unified CLI's engine as an exact peer, and this release peers 0.2.2 (up from 0.2.0). Installs assembled by the unifiedprismaCLI resolve one engine as before; a host that pins the engine itself must move to 0.2.2. The new engine evaluatesprisma.config.tsthrough pnpm symlink layouts that are not realpath'd (prisma/prisma-cli#222) and exports its CI detector (prisma/prisma-cli#224).
Features
- The prisma-8 skill travels in the npm tarballs —
skills/prisma-8/ships inside@prisma/orm-postgres,@prisma/orm-sqlite, and@prisma/orm-mongo, stamped with the package name and version soprisma skills synccan copy it into agent harness directories and detect staleness from the installed packages rather than fetching from GitHub. The two upgrade skills fold into the prisma-8 router as its "upgrading" branch. (#30096)
7.10.0
Prisma ORM 7.10.0
Prisma ORM 7.10.0 introduces a compatibility package for running Prisma 7 alongside newer Prisma versions, secures Prisma Studio's local server, and includes fixes across Prisma Client and the PostgreSQL, MariaDB, Neon, SQLite, and Prisma Postgres Serverless adapters.
Highlights
Run Prisma 7 alongside Prisma 8
This release introduces @prisma/prisma7, a compatibility package that lets you retain a matching Prisma 7 CLI and configuration while installing Prisma 8 in the same project.
Once 7.10.0 is released, a side-by-side installation can use:
npm install --save-dev prisma@8 @prisma/[email protected]
npm install @prisma/[email protected]Use prisma for the directly installed Prisma 8 CLI and prisma7 for Prisma 7:
npx prisma --version
npx prisma7 --version
npx prisma7 generate
npx prisma7 migrate dev
npx prisma7 db pushPrisma 7 now prefers version-specific configuration files, allowing its configuration to coexist with Prisma 8's prisma.config.* files:
// prisma7.config.ts
import { defineConfig } from '@prisma/prisma7/config'
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
},
})Without an explicit --config option, Prisma 7 searches for:
- Root-level
prisma7.config.*files. .config/prisma7.*files.- Existing
prisma.config.*files as a backwards-compatible fallback.
The supported extensions are .js, .ts, .mjs, .cjs, .mts, and .cts. An explicit config path always takes precedence:
npx prisma7 generate --config ./custom/prisma7.config.tsNew projects initialized by the Prisma 7 CLI use prisma7.config.ts. Existing projects containing only prisma.config.* continue to work without migration or additional warnings. If a prisma7.config.* file exists but cannot be loaded, Prisma reports the error rather than silently falling back to another configuration.
The prisma7 identity is carried through CLI help, version output, shell completion, initialization, migration, database, and generation guidance. Stable Prisma concepts such as schema.prisma, Prisma Migrate, @prisma/client, and PRISMA_* environment variables remain unchanged.
Together, the separate executable and configuration namespace make it possible to operate Prisma 7 and Prisma 8 side by side without command or config-file collisions.
#29949, #29969, #29994, #30000, #30002, #30020
Prisma Studio security hardening
Prisma Studio's local HTTP server now:
- Binds explicitly to
127.0.0.1instead of all network interfaces. - Rejects browser requests from origins other than the active
localhostor127.0.0.1Studio URL. - No longer returns wildcard CORS headers.
- Applies the same protections across Node.js, Bun, and Deno.
This prevents network clients or malicious websites from accessing Studio's database endpoints while Studio is running.
Prisma Client
- Fixed
P2002errors from nested writes someta.modelNameidentifies the model where the unique constraint violation occurred, including models using@@mapand@@schema. #29628 - Fixed automatically batched
findUniqueOrThrow()calls so every missing record rejects withP2025; later misses no longer resolve toundefined. #29654 - Parameter-chunked statements are now executed atomically in a transaction and rolled back if a later chunk fails. #29771
- Improved interactive transaction cleanup during
$disconnect(), including transactions whose driver-level startup is still in progress. #28768 - Prevented transaction cleanup failures after a timeout or backend termination from becoming unhandled promise rejections. #29611
- Fixed fluent relation queries when relation fields are literally named
selectorinclude. #29683 - Fixed handling of
DateandUint8Arrayvalues created in other JavaScript realms, such as iframes, jsdom, and Node.jsvmcontexts. #29177 - Invalid
Datevalues passed to$queryRawor$executeRawnow throwPrismaClientValidationErrorinstead of a generic error. #29718 - Fixed
moduleFormatinference for theprisma-clientgenerator in TypeScript projects usingmodule: "node16"or"nodenext". Generated output now follows the nearestpackage.jsontype, defaulting to CommonJS when absent. #29712 - Deserialized
Bytesvalues now own standaloneArrayBuffers rather than exposing unrelated contents from Node.js's sharedBufferpool. This applies to both regular and raw query results. #29701 - Fixed an incorrect logging context in the remote executor, including Accelerate-backed query execution. #28892
Client extensions and observability
-
Result-extension
computecallbacks now receive the current model name as a typed second argument:compute(data, modelName) { // ... }
The model name is also preserved when multiple extensions compose the same computed field. #29782
-
Improved OpenTelemetry context for remotely executed queries:
$on('query')callbacks run within the matchingdb_queryspan.- Events from one operation share the same trace.
- Error events are recorded as span exceptions.
- Log events continue to be emitted when tracing is disabled or their reported span is unavailable.
Driver adapters
MariaDB
@prisma/adapter-mariadbnow accepts an existingmariadbpool. External pools remain caller-owned unlessdisposeExternalPool: trueis supplied. #27992- Fixed pooled connection leaks during commit, rollback, and failed transaction startup. Connections are now returned with
release()and transaction-specific listeners are removed before reuse. #29612 - Added support for bracketed IPv6 addresses in both
mysql://andmariadb://connection strings. #29026 - Prevented malformed connection strings from exposing embedded passwords in retained debug output and diagnostic reports. #27992
PostgreSQL, Neon, and Prisma Postgres Serverless
- PostgreSQL deadlocks using SQLSTATE
40P01are now reported asP2034transaction write conflicts. #29717 - PostgreSQL
RESTRICTviolations using SQLSTATE23001are now reported asP2003, preserving an available field or constraint name. #29554 @prisma/adapter-pgnow preserves database constraint names when reporting unique constraint violations throughP2002. #29587- Prisma Postgres Serverless now prefers the named constraint for
P2002, falling back to parsed field names when no constraint name is available. #29801 - Fixed Neon HTTP adapter serialization for typed parameters such as
BytesandDateTime. #29747
SQLite
@prisma/adapter-better-sqlite3now converts previously unhandled SQLite result codes into typed database errors instead of exposing raw driver errors.- The complete
SQLITE_BUSYfamily is now mapped to socket timeout errors, with numeric extended result codes preserved where available.
CLI and Migrate
-
prisma generatecan now offer to install Prisma's agent skills. The opt-in prompt:- Is shown at most once per machine.
- Is skipped in CI, containers, Git hooks, npm lifecycle scripts, and watch mode.
- Is skipped when
--no-hintsis used or Prisma skills are already installed. - Times out after 30 seconds.
- Never causes generation to fail if installation is unsuccessful.
-
A globally installed CLI now warns during
prisma generatewhen its version differs from the project's localprismaor@prisma/client, and recommends running the local CLI. The check is best-effort and does not fail generation. #29593 -
prisma versionandprisma version --jsonnow include the resolved Prisma CLI package path, making global-versus-local installation issues easier to diagnose. #29573 -
Empty or generator-only schema files now report
Schema must contain a datasource blockfromdb pull,db push, andmigrate dev, rather than reaching the schema engine and potentially producing inconsistent errors. #29657 -
CLI commands now tolerate corrupt, unreadable, or unwritable command-state files. Invalid state is reinitialized, writes are atomic, and persistence failures fall back to in-memory state. #29609
-
...
v8.0.0-rc.5
v8.0.0-rc.5
The ORM command family now ships the unified CLI's command paths directly, the Postgres runtime survives dropped idle connections, aggregation respects the chain it terminates, and the raw lane lets an outer query reuse an inner query's typed return columns.
The upgrade recipe for this hop: the user recipe.
Breaking changes
-
The ORM command family is keyed by the unified CLI's mount paths —
@prisma/orm-toolchain's command family now publishes the six moved commands under their unified spellings (contract format,db migrate,migration ref list|set|delete,orm init) instead of the retired standalone grammar (format,migrate,ref …,init), and every help example and error remediation names those paths (with the{bin}placeholder instead of a hardcoded binary name). Through the unifiedprismaCLI nothing moves — these were already the mounted paths — but a host that mounts the family by key, or a script driving the workspace binary with the old spellings, must respell the six commands. (#30102)Before:
prisma migrate --to production prisma ref set staging 4cb4256After:
prisma db migrate --to production prisma migration ref set staging 4cb4256
Features
- A row-spec'd raw query exposes
.returns, a record of typed column refs, so an outer raw query can reuse an inner query's declared column (for example a CTE's aggregate) instead of restating its codec id. (#30075)
Fixes
aggregate()now reduces over exactly the rows a chain'stake/skip/cursor/distinct/distinctOndescribes, instead of silently reducing over every matching row. (#30067)groupBy()now scopes pre-group pagination to the rows it groups instead of dropping it, andGroupedCollectiongainedtake/skip/orderByto page the groups themselves. (#30092)- The Postgres runtime attaches
'error'listeners to every pool and client it creates or receives, so a dropped idle connection (database restart, pooler timeout, network blip) no longer crashes the process as an uncaught exception. Pools your own code constructs and uses directly still need a listener — see the upgrade recipe. (#30081) - The PSL language server recognizes connection errors raised by any bundled copy of vscode-jsonrpc, instead of crashing when a duplicated copy raised them. (#30077)
- CLI error text interpolates the configured migrations directory instead of assuming the default path. (#30041)
orm init's failure messages no longer name retired flags or binaries (--no-skill,--force,prisma-cli init); they point at the flags that exist (--skip-skills,--confirm <directory name>) and the mountedprisma orm init. (#30083)
v8.0.0-rc.4
v8.0.0-rc.4
The transition period for the old ORM config is over, and two fixes land for the consolidated prisma CLI stack. Most projects created before rc.2 need the config migration below; projects scaffolded by rc.2+ init need nothing.
The upgrade recipe for this hop: the user recipe.
Breaking changes
-
The deprecated config fallbacks are gone — the CLI no longer reads
prisma-next.config.tsand no longer accepts the flat (un-nested) config shape; both now fail loudly instead of warning. The only config read isprisma.config.tsin the envelope shape, and the workspaceprisma-nextbinary is retired — the unified CLI runs the ORM commands at the top level. Rename the file, wrap your ORM options indefinePrismaConfig({ orm: ormConfig({ … }) }), and keepimport 'dotenv/config'if your config readsprocess.env. See the user recipe for the exact rewrite. (#30058)Before:
// prisma-next.config.ts import { defineConfig } from '@prisma/orm-postgres/config'; export default defineConfig({ contract: './contract.prisma', db: { connection: process.env['DATABASE_URL']! } });
After:
// prisma.config.ts import 'dotenv/config'; import { definePrismaConfig } from '@prisma/cli-engine'; import { defineConfig as ormConfig } from '@prisma/orm-postgres/config'; export default definePrismaConfig({ orm: ormConfig({ contract: './contract.prisma', db: { connection: process.env['DATABASE_URL']! } }), });
Fixes
contract emitno longer crashes after writing its artifacts when the project root is a relative path —validateContractDeps()resolves the root before handing it to Node'screateRequire(), which requires an absolute path. (#30064)initscaffoldsdefinePrismaConfig, the current name for the config marker in@prisma/cli-engine0.2.0, instead of the deprecateddefineConfigalias. (#30064)
v8.0.0-rc.3
v8.0.0-rc.3
A single-purpose release: @prisma/orm-toolchain moves its exact @prisma/cli-engine peer from 0.1.1 to 0.2.0, so the unified prisma CLI can ship a release in which every mounted product runs on the one engine version it installs. There are no ORM API changes in this release.
Breaking changes
- The exact
@prisma/cli-enginepeer moves to 0.2.0 — engine 0.2.0 adds the credential-refresh exports and structured delegated output that[email protected]was built against but the registry's engine 0.1.1 does not contain, which is whynpx prisma@nextcurrently fails on import. This release pairs with theprismaCLI release that depends on it (8.0.0-rc.5); upgrade both together. No code changes — an operational peer move only. (#30056)