Zum Inhalt springen

Prisma Release Notes

Einträge
45
Quellen
1
Zuletzt aktualisiert

Folge Prisma, um die Release Notes in deinen Feed zu holen.

Prisma

v8.0.0-rc.28

v8.0.0-rc.28

This release fixes what upgrading two real projects to 8.0.0-rc.27, and the prisma CLI's own check, found in the upgrade instructions, the 8.0.0-rc.25 to 8.0.0-rc.26 upgrade scripts and two CLI messages. It changes nothing an application must do: the upgrade guides from 8.0.0-rc.27 have no entries.

The upgrade guides for this release: the app guide and the extension guide, which have no entries. The 8.0.0-rc.25 to 8.0.0-rc.26 guides are corrected in this release: the app guide and the extension guide.

A project on 8.0.0-rc.26 or earlier has the upgrade reference of its release installed, whose first step reads an older copy of the guides. Before upgrading such a project, read this release's upgrade-app.md (or upgrade-extension.md for an extension) and follow it from its first step. …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.26

v8.0.0-rc.26

This release makes the changes to stored files and names that must land before 8.0. Every contract hash takes a new value, once, by rules that do not change again within Prisma 8, and every stored file names its format version. A contract lists the capabilities it requires, as keys prefixed by who provides them. On PostgreSQL and SQLite, Prisma's own tables move to their final names; MySQL, MariaDB and MongoDB move in a later release candidate. On every database, the contract marker is now the contract signature. The packages publish only the import paths users need, name each other as peer dependencies, and type every set of values that may grow so that a later 8.x release can add one. New in this release: @prisma/orm-better-auth, so Better Auth works with Prisma 8, ORM updates that set a column from another column or raw SQL, and commands that change the policies a ref declares.

The upgrade guides for this release: the app guide and the extension guide. Each opens with the order to do the steps in, which matters this time: some steps run with the release you are on now, and the deploy that ships the upgrade signs every database. Each breaking change below names the change ids to look for in the guides. …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.27

v8.0.0-rc.27

This release fixes what upgrading two real projects from 8.0.0-rc.25 to 8.0.0-rc.26 found. A database that a deploy created after the upgrade and migrated to a ref was signed for the wrong capabilities, so prisma db verify refused it. pnpm installed several copies of @prisma/orm-toolchain in a monorepo, so the prisma command refused to run. And the rc.25 to rc.26 upgrade scripts crashed on TypeScript 7 and stopped on one hand-written fixture anywhere in a repository. Upgrade from 8.0.0-rc.25 to this release in one go: follow the rc.25 to rc.26 guide with this release installed, then the rc.26 to rc.27 guide.

The upgrade guides for this release: the app guide and the extension guide. The rc.25 to rc.26 guides are corrected in this release: the app guide and the extension guide. …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.25

v8.0.0-rc.25

A database can now record how it may change and what data it protects, and the CLI refuses a migration or update that breaks those rules. MariaDB gets a client of its own, and MySQL gains the ORM's aggregates. Int, BigInt, Float, Decimal, String, Boolean, Bytes and Json are convenience types on every database. SQL clients run nested transactions with tx.transaction(callback), and an ORM write inside a transaction is atomic. On PostgreSQL and SQLite, a changed @@map, @map or enum stored value is planned as a rename. Nested writes gain onConflict, variants of a polymorphic model, a disconnect that applies its criteria, and update and delete of one related row. prisma orm init --target takes any target package by name.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them. The examples write the ORM client as db.orm.public.<Model>, the PostgreSQL form; on SQLite, MySQL and MariaDB it is db.orm.<Model>. After upgrading, run prisma contract emit once: the generated contract.d.ts now imports from one module of the target package, SQL contracts record two new capabilities, and MySQL and MariaDB contrac…

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.24

v8.0.0-rc.24

MongoDB gets the convenience date and time types, and Date becomes a calendar date. A MongoDB TypeScript contract names a field's type with type.X(), as PSL does, and MongoDB clients can prepare a query. MongoDB plans check documents before a validator change and ask about type changes that can lose values. SQL clients take transaction isolation levels and callback timeouts. The CLI manages MariaDB, and answers Prisma 7 commands such as prisma migrate dev with what to run instead. Nested create() and update() gain arrays of operations and filtered updateAll and deleteAll, and db.raw.sql embeds builder queries.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them. The app recipe opens with the order to do the steps in. After upgrading, run prisma contract emit once, so a contract that an extension such as Supabase stamps with its version matches the installed package (contract-artifacts-restamp in the app recipe).

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.23

v8.0.0-rc.23

MongoDB indexes carry their names, and migrations create and drop each index by its name. On PostgreSQL, Int, BigInt, Float, Decimal, String, Boolean and Bytes become convenience types, and SQLite and MySQL get the convenience date and time types. The pgvector, PostGIS, ParadeDB and citext packs find their extension through the search path, so db sign adopts a Supabase database. MySQL gets ORM writes. mongo() takes extension packs, and supabase() takes the options postgres() takes. Prisma ORM no longer refuses to start when it is loaded from more than one copy.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them. The app recipe opens with the order to do the steps in. After upgrading, run prisma contract emit once, so a contract that an extension such as Supabase stamps with its version matches the installed package (contract-artifacts-restamp in the app recipe).

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.21

v8.0.0-rc.21

migration plan and db update can rename or delete an enum value on Postgres and SQLite, and update the rows that hold it. MongoDB contracts written in TypeScript, PSL or Prisma 6 now build through one builder and follow the same rules. A closed client's members report the failure through the promise or result they return. MySQL gets its first public packages, which can plan and apply migrations. PostgreSQL's date and time types now name the kind of value they read, and the text date and time types read ISO 8601 on every server. Field presets are removed: each is written with a type constructor or type alias that stores the same contract. When a database is at a contract outside the migration graph, db migrate explains why and gives recoveries that work, none of which resets the database. The upgrade guides for rc.18 and rc.19 now work on real projects.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them. After upgrading, run prisma contract emit once, so a contract that an extension such as Supabase stamps with its version matches the installed package (contract-artifacts-restamp in the app recipe).

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.22

v8.0.0-rc.22

On PostgreSQL, DateTime, Date, Time and the new Duration are convenience types whose defaults read a JavaScript Date or a string, with no Temporal polyfill. Value objects move into the storage plane, so changing one is a migration, and Postgres checks value object and discriminator columns. MongoDB's query builder, raw lane, ORM and runtime take an execution context, as SQL's do, and a MongoDB client creates its driver from the execution stack. A contract can declare the Postgres extensions it needs, so db sign adopts a database that uses pgvector, PostGIS, ParadeDB or the new citext pack. The Prisma 7 reader now reads every Postgres @db.* type Prisma 7 accepts. MySQL gets ORM and SQL builder reads. Prisma ORM refuses to run from two installed copies, and connect() on a client is safe to call again.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them. The app recipe opens with the order to do the steps in. After upgrading, run prisma contract emit once, so a contract that an extension such as Supabase stamps with its version matches the installed package (contract-artifacts-restamp in the app recipe). …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.20

v8.0.0-rc.20

ORM commands run on @prisma/cli-engine 0.9.0, so a piped command prints tab-separated data lines and JSON needs --json. A type alias in PSL can set @default, @onCreate and @onUpdate, and the contract stores each column's real type instead of the alias name. Postgres migrations can rename, move and remove namespaces, and can change a relation's actions or a primary key. A failed migration check now names the object it expected.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them.

Breaking changes

  • A piped ORM command prints data lines, not JSON, unless you pass --json. The ORM toolchain now requires @prisma/cli-engine 0.9.0, up from 0.7.0, the engine the prisma CLI ships since 8.0.0-rc.25. This engine picks the output format from flags only. When stdout is a pipe, a file, $(…), a CI log or an agent, a command used to print JSON. It now prints the human output on stderr and plain data lines on stdout. Add --json to every script, CI step or program that reads JSON from prisma contract …, prisma db …, prisma migration … or prisma orm init. A project that depends on @prisma/cli-engine itself moves…

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.19

v8.0.0-rc.19

@default now means a database default, and values the client generates are written @onCreate(...) and @onUpdate(...). Every default is stored in one form owned by its column's data type, so date, time and bytes defaults are written with tags. Clients take the contract as a typed value, can render any plan as SQL without a database, and run each ORM call as one activity that middleware and the cache can see. A column of any database type can be declared with Raw(sql`...`), and Prisma 7 schemas with Unsupported(...) fields now load.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them.

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

7.10.1

Prisma ORM 7.10.1 is a patch release. It fixes a bug where a nested interactive transaction could make later, unrelated transactions run inside the wrong transaction. It also updates dependencies that had security advisories.

Fixes

Prisma Client: nested $transaction no longer changes the options object you pass in

If you passed the same options object to a nested tx.$transaction(...) and later to a top-level prisma.$transaction(...), the nested call wrote the outer transaction's id into that object. Every later top-level transaction that used the object was then treated as nested inside that old transaction:

  • if the old transaction had committed, the new one failed with P2028;
  • if the old transaction was still open, the new one silently ran as a savepoint inside another request's transaction.
const TX_OPTIONS = { timeout: 30_000, maxWait: 10_000 }

await prisma.$transaction(async (tx) => {
  await tx.$transaction(async (inner) => { /* ... */ }, TX_OPTIONS)
})

// Before 7.10.1, this call could fail with P2028 or join another transaction.
await prisma.$transaction(async (tx) => { /* ... */ }, TX_OPTIONS)

Prisma Client no longer modifies the options object. (https://github.com/prisma/orm/pull/30368, thanks @lazerg)

Prisma Migrate: refuse a shadow database that is the main database …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

v8.0.0-rc.18

v8.0.0-rc.18

Raw SQL in a contract is now always a sql literal or value, a full-text index can span several weighted fields and is searched from the ORM by naming it, and middleware observes each statement and transaction as an activity. PSL gains mixins, the SQL ORM gains whereUnique and firstOrThrow, and MongoDB migrations carry out --rename.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them.

Breaking changes

  • Raw SQL in a contract is a sql literal. In PSL, @@index(where:), @@index(expression:), @@fullTextIndex(where:), @@check(expression:) and a policy's using and withCheck take a sql literal, and a quoted string is refused with PSL_VALUE_TYPE_INCOMPATIBLE. The app recipe ships a script that rewrites every .prisma file. In a TypeScript contract the same fields take a sql value, and a string does not compile; migration files keep strings. A text with shared indentation, blank lines at its ends or CRLF line breaks is stored as its canonical text, which changes the storage hash once. See raw-sql-is-a-sql-literal, builder-raw-sql-is-a-sql-value, psl-storage-hash-may-change-once and `ts-storage-hash-…

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.17: Migrationen fragen vor Datenverlust nach

In Prisma 8.0.0-rc.17 fragen prisma migration plan und prisma db update für jedes vom Datenverlust betroffene Modell oder Feld nach und verlangen --delete oder das neue --rename, --confirm stimmt Datenverlust nicht mehr zu, außerdem erhält der ORM-Client Row Locks, apply und scope heißen nun with und fragment, und db.enums enthält jedes Member so, wie es eine Abfrage zurückgibt.

v8.0.0-rc.17

Migrations no longer lose data without being told to: prisma migration plan and prisma db update ask about each model or field a plan would drop, answered with --delete or with the new --rename, which keeps the rows. The ORM client gains row locks, apply and scope are renamed to with and fragment, and db.enums holds each member as a query returns it.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change ids to look for in them.

Breaking changes

  • --confirm no longer consents to data loss. prisma migration plan and prisma db update ask one question for each model, field or table a plan would lose data from, before they write or apply anything. Answer with --delete <subject> to let the data go, or --rename <old>:<new> to keep it. db update also asks before an operation that widens who can read or write a model's rows, such as dropping a row-level-security policy, answered with --allow <Model>. Where nobody can answer, the command fails with CLI.CONSENT_REQUIRED, whose nextActions give the flags. Replace each --confirm in scripts and CI. See migration-plan-refuses-data-loss and `db-update-confirm-no-longer-consen…

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.16: Toolchain nutzt @prisma/cli-engine 0.6.3

Die Toolchain benötigt jetzt @prisma/cli-engine 0.6.3, das nur eine ArkType-Kopie mit den Prisma-ORM-Paketen teilt (behebt Fehler bei prisma orm init und prisma contract emit nach Bun-Installation), und ein von PSL abgelehntes @default wird nun am geschriebenen Wert samt Korrekturhinweis gemeldet.

v8.0.0-rc.16

This release moves the toolchain to @prisma/cli-engine 0.6.3, which shares one ArkType copy with the Prisma ORM packages. With engine 0.6.2, a fresh Bun install could resolve two ArkType copies, and prisma orm init and prisma contract emit then failed on a valid contract. A @default that PSL refuses is now reported at the written value, with a message that says what to write instead.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change id to look for in them.

Breaking changes

  • The toolchain requires @prisma/cli-engine 0.6.3. A project or extension that pins @prisma/cli-engine itself must move the pin from 0.6.2 to 0.6.3. The engine's commands and output do not change: its only change is that it accepts ArkType ^2.2.7 instead of exactly 2.2.3. See engine-pin-moves-to-0-6-3 in the app recipe and the extension recipe. (#30632) …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.15: Datentypen im Contract, Scopes und neue Middleware

In SQL-Contracts nennt jede Spalte nun ihren Datentyp wie pg/text, Codecs prüfen alle gespeicherten Werte, und es kommen unter anderem Scopes, Zeilensperren im typisierten SQL-Builder, eine afterTransaction-Middleware-Stufe, Cache-Invalidierung, this.renameTable in Migrationen, null-Elemente in Listen sowie Hover, Go to Definition und Find References im PSL-Language-Server hinzu.

v8.0.0-rc.15

In this release, each column in a SQL contract names its data type, such as pg/text, in place of the type name the database prints. One script and prisma db sign upgrade a project. Codecs now check every value a contract stores, and a field's type in the contract matches its column. Custom collection classes keep their methods through the chain, and scopes let you share a piece of a query across models. The typed SQL builder can lock the rows a select reads. Middleware gains an afterTransaction stage, and the cache middleware gains invalidation. A hand-written migration can rename a table with this.renameTable. Lists can hold null elements. The PSL language server adds hover, go to definition and find references.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change id to look for in them. Run the data-type-in-contract script (change contract-stores-data-type) before any other step that emits a contract again.

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.14: Postgres-Serverless-Client, kanonische Datums-Defaults

In Prisma 8.0.0-rc.14 liefert connect() des Postgres-Serverless-Clients nun eine Verbindung mit db.orm, db.transaction(...) und db.prepare(...), Datums- und Zeit-Defaults werden kanonisch gespeichert, das Mongo-ORM nutzt für alle Werte den Codec des Felds und die Postgres-CLI-Befehle funktionieren mit solchen Defaults auf Node 24.

v8.0.0-rc.14

In this release, connect() on the Postgres serverless client returns a connection with db.orm, db.transaction(...) and db.prepare(...), the same members as a postgres() client. A date or time default is stored in one canonical text for each value, so its storage hash no longer depends on how the default was written. The Mongo ORM passes every value it writes, reads or filters on through its field's codec. The Postgres CLI commands now work with date and time defaults on Node 24, which has no Temporal.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change id to look for in them.

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.13: Neue MongoDB-Typen, Sortierung und contract print

Prisma 8.0.0-rc.13 erweitert MongoDB-Schemas um Int64, Decimal128, Binary, Json, Bson und automatische Zeitstempel, ergänzt Sortierung nach Spalten verwandter Zeilen und Relationszählungen sowie den Befehl prisma contract print, und TypeScript-Contracts kodieren Literal-Defaults nun über den Spalten-Codec, weshalb der Contract neu emittiert werden muss.

v8.0.0-rc.13

This release brings MongoDB closer to Postgres: a Mongo schema can declare Int64, Decimal128, Binary, Json and Bson fields and automatic timestamps, and a Prisma 6 MongoDB project can use its existing schema.prisma as the contract source. The ORM client can order by a related row's column, by a relation count, and with explicit null placement. The new prisma contract print command writes any configured contract as Prisma 8 PSL. A TypeScript contract now encodes every literal default through the column's codec, and the generated defaults in contract.json name their target with new keys, so re-emit your contract after upgrading.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change id to look for in them.

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.12: Volltextsuche, geteilte Schemas, neue Schemaschreibweise

Prisma 8.0.0-rc.12 bringt Postgres-Volltextsuche, vorbereitete ORM-Lesezugriffe und Aggregate sowie auf mehrere Dateien aufgeteilte Schemas und ändert die Schemaschreibweise (Tabellenname ohne @@map exakt wie geschrieben, // use prisma-8 als erste Zeile, sql-Tagged-Literals statt dbgenerated(...)).

v8.0.0-rc.12

This release adds Postgres full-text search, prepared ORM reads and aggregates, schemas split across several files, and a way for a Prisma 7 project to use its existing schema.prisma as the Prisma 8 contract source. It also changes how a schema is written: a model without @@map now names its table exactly as written, every schema file needs // use prisma-8 as its first line, dbgenerated(...) is replaced by sql tagged literals, and a column default must be a value its column's data type accepts. The toolchain moves to @prisma/cli-engine@0.6.1, which no longer exports defineConfig.

The upgrade recipes for this hop: the app recipe and the extension recipe. Each breaking change below names the change id to look for in them.

Breaking changes …

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.11: Markdown-Ausgabe für alle CLI-Befehle

Prisma 8.0.0-rc.11 stellt die Toolchain auf @prisma/cli-engine@0.4.0 um, wodurch jeder CLI-Befehl das Ausgabeformat Markdown über --format markdown unterstützt.

v8.0.0-rc.11

This release moves the toolchain onto @prisma/cli-engine@0.4.0, 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/cli-engine@0.4.0 — @prisma/orm-toolchain declares 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's Format type widens from "human" | "json" to "human" | "json" | "markdown". No other public API changed. Projects assembled by the prisma CLI resolve the engine automatically; a project that pins @prisma/cli-engine itself must move the pin to 0.4.0. (prisma/prisma-cli#260)

Originalquelle(öffnet in neuem Tab)Problem melden

Prisma

Prisma 8.0.0-rc.10: Umbenennung zu Prisma 8 abgeschlossen

Prisma 8.0.0-rc.10 schließt die Umbenennung von Prisma Next zu Prisma 8 ab (CLI-Umgebungsvariablen verlieren den Infix NEXT_), ergänzt benannte Modell- und Ergebnistypen im Contract, lässt db sign den db-Ref setzen und fügt dem Language Server Attribut-Vervollständigung hinzu.

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 now PRISMA_DISABLE_TELEMETRY, PRISMA_TELEMETRY_ENDPOINT, PRISMA_DEBUG, and so on. Only the old PRISMA_NEXT_DISABLE_TELEMETRY opt-out is still honoured; rename the others in shell profiles, .env files, 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 init now writes its primer as prisma-8.md instead of prisma-next.md. See the app upgrade recipe. (#30262) …

Originalquelle(öffnet in neuem Tab)Problem melden