@prisma/adapter-d1
7.10.1 · 15 Oct 2026Apache-2.073.1k / weekRepositorynpmAtom feed
74 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 7.x · latest line
7.10.1
15 Oct 2026If 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.
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
$transactionno longer changes the options object you pass inIf you passed the same options object to a nested
tx.$transaction(...)and later to a top-levelprisma.$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. (#30368, thanks @lazerg)
Prisma Migrate: refuse a shadow database that is the main database
Prisma Migrate now refuses to run with error
P3025when the shadow database URL points at the same database as the main database URL. Before,prisma migrate diff --from-migrationswith that setup dropped the real schema, rebuilt it from the migrations, and reported an empty diff. (#5851)MariaDB adapter: updated to
mariadb3.5.4@prisma/adapter-mariadbnow depends onmariadb3.5.4, which fixes several security advisories in 3.5.3. The adapter no longer rewrites IPv6 hosts in connection strings, becausemariadb3.5.4 accepts them as written. IPv6 connection strings keep working without changes. (#30668)Dependency updates
Dependencies with security advisories were updated:
mysql2,fast-uri,deepmerge-ts,mariadbandsource-map-js. (#30314, #30189, #30668)7.10.0
25 Aug 2026- security
Binds explicitly to
127.0.0.1instead of all network interfaces. - security
Rejects browser requests from origins other than the active
localhostor127.0.0.1Studio URL. - security
No longer returns wildcard CORS headers.
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/prisma7@7.10.0 npm install @prisma/client@7.10.0
Use
prismafor the directly installed Prisma 8 CLI andprisma7for Prisma 7:npx prisma --version npx prisma7 --version npx prisma7 generate npx prisma7 migrate dev npx prisma7 db push
Prisma 7 now prefers version-specific configuration files, allowing its configuration to coexist with Prisma 8's
prisma.config.*files:// prisma7.config.ts import { defineConfig } from '@prisma/prisma7/config' export default defineConfig({ schema: 'prisma/schema.prisma', migrations: { path: 'prisma/migrations', }, })Without an explicit
--configoption, 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.ts
New projects initialized by the Prisma 7 CLI use
prisma7.config.ts. Existing projects containing onlyprisma.config.*continue to work without migration or additional warnings. If aprisma7.config.*file exists but cannot be loaded, Prisma reports the error rather than silently falling back to another configuration.The
prisma7identity is carried through CLI help, version output, shell completion, initialization, migration, database, and generation guidance. Stable Prisma concepts such asschema.prisma, Prisma Migrate,@prisma/client, andPRISMA_*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:
- security
Binds explicitly to
127.0.0.1instead of all network interfaces. - security
Rejects browser requests from origins other than the active
localhostor127.0.0.1Studio URL. - security
No longer returns wildcard CORS headers.
- security
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. #29628Fixed automatically batched
findUniqueOrThrow()calls so every missing record rejects withP2025; later misses no longer resolve toundefined. #29654Parameter-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. #28768Prevented 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. #29683Fixed handling of
DateandUint8Arrayvalues created in other JavaScript realms, such as iframes, jsdom, and Node.jsvmcontexts. #29177Invalid
Datevalues passed to$queryRawor$executeRawnow throwPrismaClientValidationErrorinstead of a generic error. #29718Fixed
moduleFormatinference for theprisma-clientgenerator in TypeScript projects usingmodule: "node16"or"nodenext". Generated output now follows the nearestpackage.jsontype, defaulting to CommonJS when absent. #29712Deserialized
Bytesvalues now own standaloneArrayBuffers rather than exposing unrelated contents from Node.js's sharedBufferpool. This applies to both regular and raw query results. #29701Fixed 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. #27992Fixed pooled connection leaks during commit, rollback, and failed transaction startup. Connections are now returned with
release()and transaction-specific listeners are removed before reuse. #29612Added support for bracketed IPv6 addresses in both
mysql://andmariadb://connection strings. #29026Prevented 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. #29717PostgreSQL
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. #29587Prisma Postgres Serverless now prefers the named constraint for
P2002, falling back to parsed field names when no constraint name is available. #29801Fixed 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. #29593prisma versionandprisma version --jsonnow include the resolved Prisma CLI package path, making global-versus-local installation issues easier to diagnose. #29573Empty 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. #29657CLI 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
Studio now recognizes semicolon-delimited
sqlserver://connection strings before reporting the existing explicit message that SQL Server is not supported by Studio. #29623The AI-agent safety checkpoint now also covers interactive
prisma db pushconfirmations involving data-loss warnings, rather than only invocations using--accept-data-loss. #29793
Performance and reliability
Optimized query-plan execution by eagerly evaluating plans with one unconditional database operation and synchronously interpreting the remaining pure plan. Cached plans remain immutable. #29004
Prevented call-stack overflows when rendering very large parameter lists or combining chunked results containing hundreds of thousands of rows. #29751
Reduced ordinary query setup overhead by constructing fluent-relation field maps lazily and in linear time. Non-fluent queries no longer build this map. #29752
7.9.1
27 Jul 2026Today, we're issuing a patch release to resolve a security advisory in a transitive dependency of Prisma CLI (via
@prisma/dev).Today, we're issuing a patch release to resolve a security advisory in a transitive dependency of Prisma CLI (via
@prisma/dev).This fixes #29780.
It does not actually affect
@prisma/devor Prisma CLI so no urgent action is required, but it is recommended to upgrade nevertheless to avoid false positives from security scanners.7.9.0
20 Jul 2026- security
Resolved the
honosecurity advisories at their source:@prisma/devwas updated to a version that no longer depends onhonoat all, so the CLI is no longer exposed to those advisories through that path. We also patched moderate-severity advisories inajvanduuidacross production dependencies (#29514). - security
Hardened the Prisma Platform credentials file (
~/.config/prisma-platform/auth.json) and its directory to0o600/0o700so OAuth tokens are no longer world-readable, bringing Prisma in line with the GitHub, AWS, and Google Cloud CLIs (#29568, from Jaeyoung Yun). - security
Bumped the
opensslcrate in the schema engine binaries from 0.10.74 to 0.10.81 (prisma/prisma-engines#5815).
Today, we are excited to share the
7.9.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
Tab completions for the Prisma CLI
Typing out CLI commands from memory is now optional. Prisma ships shell tab completions for
bash,zsh,fish, and PowerShell, covering commands, subcommands, options, flags, and even option values.Setting it up. Most projects run Prisma through a package manager, so completions are enabled through
@bomb.sh/tab's package-manager integration — install it once, then source the completion for your package manager and shell:# 1. Install @bomb.sh/tab globally npm install -g @bomb.sh/tab # 2. Wire up your package manager + shell (pnpm shown; swap in npm / yarn / bun): echo 'source <(tab pnpm zsh)' >> ~/.zshrc # zsh echo 'source <(tab pnpm bash)' >> ~/.bashrc # bash tab pnpm fish > ~/.config/fish/completions/pnpm.fish # fish tab pnpm powershell > ~/.tab-pnpm.ps1 # PowerShell (then dot-source it from $PROFILE)
@bomb.sh/tabdelegates to any locally-installed CLI that ships completions, sopnpm prisma <TAB>,pnpm exec prisma <TAB>,yarn prisma <TAB>, andbun x prisma <TAB>all complete Prisma's commands, options, and values — no per-project setup. (npxandbunxdon't support completion themselves; usenpm execandbun x.)If instead you have Prisma installed globally on your
PATH, source its own completion directly:source <(prisma complete zsh)(or thebash/fish/powershellvariant).This is built on
@bomb.sh/tab, the same completion library that powers other CLIs in the ecosystem — including Cloudflare, Nuxt, and Vitest — so the package-manager completions you enable for Prisma work for those tools too. A wonderful community contribution from @AmirSa12 (#28351) — thank you!github.com/user-attachments/assets/1f916a60-ee4…
Prisma ORM, ready for AI agents
Coding agents are now a first-class audience for Prisma, and 7.9.0 brings the first wave of work to make Prisma projects safe and productive for them to work in.
Agent skills installed with
prisma initprisma initnow installs the prisma/skills catalog into freshly scaffolded projects. Agents such as Claude Code, Cursor, Codex, and Windsurf start out with current, version-relevant Prisma knowledge instead of relying on whatever happened to be in their training data. The install is best-effort and never blocks scaffolding; opt out at any time with--no-skills.npx prisma@latest init
prisma init scaffolds a project and installs the Prisma agent skills catalog
A safer default around destructive commands (#29684, #29691, #29713)
Prisma's AI safety checkpoint refuses to run destructive commands when it detects that an AI agent is at the keyboard, unless the user has given explicit consent. In this release we:
Broadened agent detection to cover today's landscape — Codex CLI (now on Linux as well as macOS), Qwen Code, GitHub Copilot CLI, OpenCode, Cline, Goose, Amp, Crush, Augment Code, Antigravity, Replit Agent, and Devin — plus generic
AI_AGENT/AGENTconventions so future agents are caught without a code change.Extended the guard to
db push --accept-data-loss, which previously bypassed the checkpoint even though it can drop data.Removed the
migrate-resettool from theprisma mcpserver entirely — resetting a database drops it, and that is not an operation an agent should be handed as a first-class tool. An agent that needs a reset must run the CLI, where the checkpoint applies.
Bug Fixes
Many of the fixes below are community contributions — thank you to everyone who reported and fixed these!
Prisma Client
Fixed a severe TypeScript performance regression introduced in Prisma 7: restoring the
OmitOptsgeneric default letstscreuse cached type instantiations again, bringing type-checking on large schemas back from minutes to seconds (#29592, from @nfl1ryxditimo12).The
XORtype helper now rejects primitive values such asdata: 5, which were previously accepted at compile time even though the runtime rejected them (#29735, from @kyungseopk1m).$queryRawand$executeRawnow fail fast with a clear validation error when passed an invalidDate, instead of silently serializing it asnulland corrupting the value sent to the database (#29697, from @jibin7jose).The generated client is no longer corrupted by a
///documentation comment that contains a*/sequence; the comment terminator is now escaped when doc comments are emitted, in both the TypeScript and JavaScript generators (#29736, from @kyungseopk1m).Improved the runtime and TypeScript error messages shown when a driver adapter is missing from the
PrismaClientconstructor; both now include a copy-pasteable example and a link to the driver adapters docs (#29624).Unmapped database errors from driver adapters now surface as a user-facing
P2039(PrismaClientKnownRequestError) carrying the original code and message, instead of an opaque failure, which keeps schema-drift-style problems debuggable (#29512).The
prisma-client-jsgenerator no longer emits a strayundefinedstatement when generating from a schema that declares only enums or types and no models (#29738, from @kyungseopk1m).Fixed a connection leak when an interactive transaction times out (
maxWait) while it is still starting: the discarded transaction now sends an explicitROLLBACKbefore the connection is returned to the pool, instead of releasing it mid-transaction. Previously, on adapters like@prisma/adapter-pgand@prisma/adapter-neon, the next query to reuse that connection could fail withthere is already a transaction in progress— or silently commit the leaked transaction's work (#29727, from @lazerg).
CLI
prisma validate(and other schema-loading commands) no longer hangs forever on a multi-file schema whose directories contain a symlink cycle, and no longer reports the same file twice when a directory is reachable under two spellings (e.g./tmp→/private/tmpon macOS) (#29740, from @kyungseopk1m).On Windows, engine binaries are now cached in a stable, user-level directory (
%APPDATA%\Prisma) instead of acwd-relativenode_modules\.cache, which eliminated duplicate cache directories and the bloated Serverless/Docker bundles they caused (#29730, from @santichausis; closes #22574, #6670, #11577).
Driver Adapters
@prisma/adapter-pg, @prisma/adapter-neon, @prisma/adapter-ppg: Reading a
Bytescolumn no longer emits Node.js'DEP0005deprecation warning, thanks to an upstreampostgres-byteabump (#29538, from @kolia-zamnius).@prisma/adapter-ppg:
ColumnNotFound(P2022) errors now parse both quoted and unquoted PostgreSQL column names, including identifiers containing spaces, matching the fix previously applied toadapter-pg(#29737, from @kyungseopk1m).@prisma/adapter-mssql: Setting a
Bytes?(@db.VarBinary) field tonullno longer fails with an implicit-conversion error; the adapter now sends the parameter typed asVarBinaryinstead of letting SQL Server default it tonvarchar(#29630, from @AnupamKumar-1).
Schema Engine
prisma migrate statusnow reports a rolled-back migration that still exists on disk as unapplied, instead of incorrectly treating the schema as up to date (prisma/prisma-engines#5817, from @goutamadwant).Primary-key constraint renames are now rendered as separate
ALTER TABLEstatements on PostgreSQL, avoiding a database error when a single table has multiple changes in one migration (prisma/prisma-engines#4906, from @eruditmorina).
Security
- security
Resolved the
honosecurity advisories at their source:@prisma/devwas updated to a version that no longer depends onhonoat all, so the CLI is no longer exposed to those advisories through that path. We also patched moderate-severity advisories inajvanduuidacross production dependencies (#29514). - security
Hardened the Prisma Platform credentials file (
~/.config/prisma-platform/auth.json) and its directory to0o600/0o700so OAuth tokens are no longer world-readable, bringing Prisma in line with the GitHub, AWS, and Google Cloud CLIs (#29568, from Jaeyoung Yun). - security
Bumped the
opensslcrate in the schema engine binaries from 0.10.74 to 0.10.81 (prisma/prisma-engines#5815).
Prisma Studio
The bundled Prisma Studio moves from
0.27.3to0.33.0(#29720), gathering up everything shipped in the Studio releases in between.Migrations view
Studio can now visualise your migration history. This view is powered by Prisma Next — the next major version of Prisma ORM, a full TypeScript rewrite (available now in Early Access) that keeps the schema-first workflow and model-first queries you know, but treats your schema as a versioned, inspectable contract instead of compiling it into a heavy generated client. Prisma Next records every migration and its contract snapshots in the database, and Studio reads them to draw the timeline and diff below. Databases managed with classic Prisma Migrate don't carry this ledger, so the view simply stays hidden there.
When the connected database has a Prisma Next migration ledger, a Migrations entry appears in the sidebar: a newest-first timeline of every applied migration with its name, apply time, operation count, and compact chips summarizing what changed (
+2 models,~2 models +3 fields,+1 model, …). Selecting a migration opens a visual, FigJam-style diff canvas — added, removed, and changed models as colour-coded cards (NEW/UPDATED/UNCHANGED) with per-field before → after details, enum cards, and relation edges — next to a SQL panel of the executed statements and a Prisma-schema line diff. Switching migrations morphs the canvas rather than rebuilding it.The Studio Migrations view: walking a Prisma Next migration history, the diff canvas morphing between migrations
Prisma Streams browser
Studio gains first-class support for Prisma Streams: a dedicated stream browser, live stream aggregations, stream diagnostics, routing-key browsing, and a WAL-history handoff straight from your tables, plus richer stream request observability with concise event-log and OpenTelemetry span summaries.
Working with SQL
SQL execution, linting, and navigation are now schema-aware: unqualified identifiers resolve against the schema you've selected instead of always falling back to the adapter's default schema.
SQL result visualizations are rendered with Studio-owned chart configuration, and there's an optional Queries view backed by query-insights snapshots.
Added copy actions to the Query Details view.
Fixes
Fixed editing PostgreSQL text-array cells when queries are compiled with inline values.
Avoided cancelling and repeating introspection requests when Studio first mounts, removing duplicate startup work.
Prisma Compute is now in public beta
"Push code, it runs." Prisma Compute — managed hosting for TypeScript apps that run right next to your database — is now available in public beta, and free to use while the beta lasts.
Compute deploys your app as a long-lived process on Bun, colocated with your Prisma Postgres database, so there are no cold starts, no request timeouts, and no separate hosting vendor to wire up. It's a fit for REST and GraphQL APIs, full-stack apps, streaming and gRPC, and the long-running, stateful AI agents that keep connections open and hold in-process caches — "self-hosting, without the painful parts".
Push-to-deploy from the CLI or via GitHub integration. Every deployment is an immutable, versioned release with its own preview URL, and rolling back is simply promoting a previous version.
Branch-based environments — each branch gets its own app and database, so you can preview a change before promoting it to production.
Auto-wires with Prisma Postgres (or bring any database), with automatic health checks and self-recovery.
Custom domains — point a single CNAME at Prisma and Compute provisions and renews the TLS certificate for you, with no manual certificate uploads or private-key handling.
With Prisma ORM for type-safe data access, Prisma Postgres for the managed database, and now Prisma Compute for hosting, the whole stack lives in one place. Read the full story in the Prisma Compute blog series.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.8.0
22 Apr 2026Added a
queryPlanCacheMaxSizeoption to thePrismaClientconstructor for fine-grained control over the query plan cache. Pass0to disable the cache entirely, or omit it to use the default cache size. A larger value can improve performance in applications that execute many unique queries, while a smaller one can reduce memory usage.Fixed an equality filter panic and incorrect
::jsonbcast when filtering on PostgreSQL JSON list columns. Queries usingwhere: { jsonListField: { equals: [...] } }no longer panic with a type mismatch or emit invalid SQL. (prisma/prisma-engines#5804)Fixed case-insensitive JSON field filtering (
mode: insensitive), allowingwhere: { jsonField: { equals: "...", mode: "insensitive" } }to work correctly. (prisma/prisma-engines#5806)
Today, we are excited to share the
7.8.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
Features
Prisma Client
Added a
queryPlanCacheMaxSizeoption to thePrismaClientconstructor for fine-grained control over the query plan cache. Pass0to disable the cache entirely, or omit it to use the default cache size. A larger value can improve performance in applications that execute many unique queries, while a smaller one can reduce memory usage.
Bug Fixes
Prisma Client
Fixed an equality filter panic and incorrect
::jsonbcast when filtering on PostgreSQL JSON list columns. Queries usingwhere: { jsonListField: { equals: [...] } }no longer panic with a type mismatch or emit invalid SQL. (prisma/prisma-engines#5804)Fixed case-insensitive JSON field filtering (
mode: insensitive), allowingwhere: { jsonField: { equals: "...", mode: "insensitive" } }to work correctly. (prisma/prisma-engines#5806)Fixed incorrect parameterization of enum values that have a custom database name set via
@map.Fixed a database parameter limit check (
P2029), which could incorrectly reject or miss over-limit queries.Fixed a regression that caused missing SQL Server
VARCHARcasts for parameterized values. (prisma/prisma-engines#5801)
Schema Engine
Fixed a misleading error message in
prisma migrate diffthat referenced the--shadow-database-urlCLI flag, which was removed in Prisma 7.Fixed
prisma migrate dev(and shadow database migration replay in general) failing withCREATE INDEX CONCURRENTLY cannot run inside a transaction blockwhen a migration contained concurrent index creation statements on PostgreSQL. (prisma/prisma-engines#5799)Fixed PostgreSQL introspection silently dropping sequence defaults when the database returns the schema-qualified form
pg_catalog.nextval('sequence_name'::regclass)instead of the barenextval(...). Columns backed by sequences now correctly appear as@default(autoincrement())in the Prisma schema in all cases. (prisma/prisma-engines#5802)
Driver Adapters
@prisma/adapter-d1: Savepoint operations (
createSavepoint,rollbackToSavepoint,releaseSavepoint) now silently no-op with debug logging instead of executing SQL statements, consistent with how the D1 adapter already treats top-level transactions.
Open roles at Prisma
Interested in joining Prisma? We're growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that's right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.7.0
7 Apr 2026Init or scaffold — In an empty directory, offers a choice of 10 starter templates (Next.js, Express, Hono, Fastify, Nuxt, SvelteKit, Remix, React Router 7, Astro, NestJS) from prisma-examples. In an existing project without a schema, runs
prisma init.Link — Authenticates via the browser and connects to a Prisma Postgres database. Skips if already linked.
Install dependencies — Detects the package manager and offers to install missing
@prisma/client,prisma, anddotenv.
Today, we are excited to share the
7.7.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
prisma bootstrapcommandA new
prisma bootstrapcommand (#29374, #29424) sequences the full Prisma Postgres setup into a single interactive flow. It detects the current project state and runs only the steps that are needed:Init or scaffold — In an empty directory, offers a choice of 10 starter templates (Next.js, Express, Hono, Fastify, Nuxt, SvelteKit, Remix, React Router 7, Astro, NestJS) from prisma-examples. In an existing project without a schema, runs
prisma init.Link — Authenticates via the browser and connects to a Prisma Postgres database. Skips if already linked.
Install dependencies — Detects the package manager and offers to install missing
@prisma/client,prisma, anddotenv.Migrate — Runs
prisma migrate devif the schema contains models.Generate — Runs
prisma generate.Seed — Runs
prisma db seedif a seed script is configured.
Each side-effecting step prompts for confirmation. Re-running the command skips already-completed steps.
Basic usage
npx prisma@latest bootstrap
With a starter template
npx prisma@latest bootstrap --template nextjs
Non-interactive (CI)
npx prisma@latest bootstrap --api-key "$PRISMA_API_KEY" --database "db_abc123"
Open roles at Prisma
Interested in joining Prisma? We're growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that's right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.6.0
27 Mar 2026Added a
prisma postgres linkcommand that connects a local project to a Prisma Postgres database. This is the first command in a newprisma postgrescommand group for managing Prisma Postgres databases directly from the CLI.@prisma/adapter-pg: Added a
statementNameGeneratoroption that accepts a custom prepared statement name generator to allow users to leveragepgstatement caching@prisma/adapter-pg: Added support for usage of connection strings directly in the constructor for improved ergonomics
Today, we are excited to share the
7.6.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
Features
CLI
Added a
prisma postgres linkcommand that connects a local project to a Prisma Postgres database. This is the first command in a newprisma postgrescommand group for managing Prisma Postgres databases directly from the CLI.
Driver Adapters
@prisma/adapter-pg: Added a
statementNameGeneratoroption that accepts a custom prepared statement name generator to allow users to leveragepgstatement caching@prisma/adapter-pg: Added support for usage of connection strings directly in the constructor for improved ergonomics
@prisma/adapter-mariadb: Added a
useTextProtocoloption in the constructor to toggle between text and binary protocols
Bug Fixes
Prisma Client
Disabled caching of
createManyqueries to avoid cache bloat and potential Node.js crashes in bulk operationsMade
NowGeneratorlazy to avoid synchronousnew Date()calls, fixing Next.js "dynamic usage" errors in cached componentsFixed missing export of
Get<Model>GroupByPayloadtype in the newprisma-clientgenerator, making it accessible for TypeScript usage
CLI
Added streaming parsing with automatic fallback to handle Prisma schemas that produce extremely large intermediate strings (>500MB) that hit V8's string limits
Driver Adapters
@prisma/adapter-pg: Relaxed the
@types/pgversion constraint to^8.16.0for compatibility with newer PostgreSQL type definitions@prisma/adapter-pg: Corrected error handling for
ColumnNotFounderrors to correctly extract column names from both quoted and unquoted PostgreSQL error messages@prisma/adapter-mariadb: Modified the adapter to disable
mariadbstatement caching by default to address a reported leak
Prisma Studio
We’re continuing our work to improve Prisma Studio with more features being added.
Dark Mode
Need we say more? You’ve all asked for it, and it’s back.
github.com/user-attachments/assets/214149dd-5dd…
Copy as markdown
Now, you can copy one or more rows as either CSV or Markdown
Multi-cell editing
This is big one, something that folks have been asking for. Now, it’s possible to edit multiple cells while inspecting your database. If you make any changes, you’ll be prompted to either save or discard them. This makes manually adding new rows much easier to accomplish.
Back relations
If your data references another table, Prisma Studio now links to the related records, making it easy to inspect them. This makes traversing your database much simpler.
github.com/user-attachments/assets/4977a926-413…
Generative SQL with AI
If you need to inspect your database, instead of manually writing the SQL you may need, you can use natural language and AI to generate the appropriate SQL statements.
github.com/user-attachments/assets/e57c0afb-c3e…
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.5.0
11 Mar 2026Added support for nested transaction rollbacks via savepoints (#21678)
Adds support for nested transaction rollback behavior for SQL databases: if an outer transaction fails, the inner nested transaction is rolled back as well. Implements this by tracking transaction ID + nesting depth so Prisma can reuse an existing open transaction in the underlying engine, and it also enables using
$transactionfrom an interactive transaction client.Made the
adapter-mariadbuse the binary MySQL protocol to fix an issue with lossy number conversionsMade
@types/pga direct dependency ofadapter-pgfor better TypeScript experience out-of-the-box
Today, we are excited to share the
7.5.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
Features
Added support for nested transaction rollbacks via savepoints (#21678)
Adds support for nested transaction rollback behavior for SQL databases: if an outer transaction fails, the inner nested transaction is rolled back as well. Implements this by tracking transaction ID + nesting depth so Prisma can reuse an existing open transaction in the underlying engine, and it also enables using
$transactionfrom an interactive transaction client.
Bug fixes
Driver Adapters
Made the
adapter-mariadbuse the binary MySQL protocol to fix an issue with lossy number conversionsMade
@types/pga direct dependency ofadapter-pgfor better TypeScript experience out-of-the-box
Prisma Client
Resolved
Prisma.DbNullserializing as empty object in some bundled environments like Next.jsFixed DateTime fields returning
Invalid Datewithunixepoch-mstimestamps in some casesFixed a cursor-based pagination issue with
@db.Datecolumns
Schema Engine
Manual partial indexes are now preserved when
partialIndexespreview feature is disabled, preventing unnecessary drops and additions in migrations (#5790, #5795)Enhanced partial index predicate comparison to handle quoted vs unquoted identifiers correctly, eliminating needless recreate cycles
Excluded partial unique indexes from DMMF
uniqueFieldsanduniqueIndexesto prevent incorrectfindUniqueinput type generation
Studio
With the launch of Prisma ORM v7, we also introduced a rebuilt version of Prisma Studio. With the feedback we’ve gathered since the release, we’ve added some high requested features to help make Studio a better experience.
Multi-cell Selection & Full Table Search
This release brings the ability to select multiple cells when viewing your database. In addition to being able to select multiple cells, you can also search across your database. You can search for a specific table or for specific cells within that table.
Adobe Express - CleanShot 2026-03-04 at 21 15 08-2
More intuitive filtering
Filtering is now easier to use, and includes an option for raw SQL filters.
CleanShot 2026-03-11 at 11 26 35
And if you are using Studio in Console, you can use ai generated filters:
CleanShot 2026-03-11 at 11 28 18Cmd+k Command Palette
You can now use the keyboard to perform most actions in Studio with the new cmd+k command palette
CleanShot 2026-03-11 at 11 30 35Run raw SQL queries
Another feature we’ve included in Prisma Studio is the ability to run raw SQL queries against your data. There’s a new “SQL” tab in the sidebar that will bring you to page where you can perform any queries against your data. Below, we’re getting all the rows in the “Todo” table.
Adobe Express - Screen Recording 2026-03-10 at 2 30 52 PM-2
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our [Careers page](prisma.io/careers) and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.4.2
27 Feb 2026Fix a case-insensitive
INandNOT INfilter regression (#29243)Fix a query plan mutation issue that resulted in broken cursor queries (#29262)
Fix an array parameter wrapping issue in push operations (#5784)
Today, we are issuing a 7.4.2 patch release focused on bug fixes and quality improvements.
Fixes
Prisma Client
Fix a case-insensitive
INandNOT INfilter regression (#29243)Fix a query plan mutation issue that resulted in broken cursor queries (#29262)
Fix an array parameter wrapping issue in push operations (#5784)
Fix
Uint8Arrayserialization in nested JSON fields (#29268)Fix an issue with MySQL joins that relied on non-strict equality (#29251)
Driver Adapters
@prisma/adapter-mariadb: Update text column detection to check for a binary collation (#29238)
@prisma/adapter-mariadb: Correct
relationJoinscompatibility check for MariaDB 8.x versions (#29246)
Schema Engine
Fix partial index predicate comparison on PostgreSQL and MSSQL (#5780)
7.4.1
19 Feb 2026Fix cursor-based pagination regression with parameterised values (#29184)
Preserve
Prisma.skipthrough query extension argument cloning (#29198)Enable batching of multiple queries inside interactive transactions (#25571)
Today, we are issuing a 7.4.1 patch release focused on bug fixes and quality improvements.
Fixes
Prisma Client
Fix cursor-based pagination regression with parameterised values (#29184)
Preserve
Prisma.skipthrough query extension argument cloning (#29198)Enable batching of multiple queries inside interactive transactions (#25571)
Add missing JSON value deserialization for JSONB parameter fields (#29182)
Apply result extensions correctly for nested and fluent relations (#29218)
Allow missing config datasource URL and validate only when needed (#5777)
Driver Adapters
@prisma/adapter-ppg: Handle null values in type parsers for nullable columns (#29192)
Prisma Schema Language
7.4.0
11 Feb 2026prisma/prisma-engines#5767: Fixed an issue with PostgreSQL migration scripts that prevented usage of
CREATE INDEX CONCURRENTLYin migrationsprisma/prisma-engines#5752: Fixed BigInt precision loss in JSON aggregation for MySQL and CockroachDB by casting BigInt values to text (from community member polaz)
prisma/prisma-engines#5750: Fixed connection failures with non-ASCII database names by properly URL-decoding database names in connection strings
Today, we are excited to share the
7.4.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
Caching in Prisma Client
Today’s release is a big one, as we introduce a new caching layer into Prisma ORM. But why the need for a caching layer?
In Prisma 7, the query compiler runs as a WebAssembly module directly on the JavaScript main thread. While this simplified the architecture by eliminating the separate engine process, it introduced a trade-off: every query now synchronously blocks the event loop during compilation.
For individual queries, compilation takes between 0.1ms and 1ms, which is barely noticeable in isolation. But under high concurrency this overhead adds up and creates event loop contention that affects overall application throughput.
For instance, say we have a query that is run over and over, but is a similar shape:
// These two queries have the same shape: const alice = await prisma.user.findUnique({ where: { email: 'alice@prisma.io' } }) const bob = await prisma.user.findUnique({ where: { email: 'bob@prisma.io' } })Prior to v7.4.0, this would be reevaluated ever time the query is run. Now, Prisma Client will extract the user-provided values and replaces them with typed placeholders, producing a normalized query shape:
prisma.user.findUnique({ where: { email: %1 } }) // cache key ↑ %1 = 'alice@prisma.io' (or 'bob@prisma.io')This normalized shape is used as a cache key. On the first call, the query is compiled as usual and the resulting plan is stored in an LRU cache. On every subsequent call with the same query shape, regardless of the actual values, the cached plan is reused instantly without invoking the compiler.
We have more details on the impact of this change and some deep dives into Prisma architecture in an upcoming blog post!
Partial Indexes (Filtered Indexes) Support
We're excited to announce Partial Indexes support in Prisma! This powerful community-contributed feature allows you to create indexes that only include rows matching specific conditions, significantly reducing index size and improving query performance.
Partial indexes are available behind the
partialIndexespreview feature for PostgreSQL, SQLite, SQL Server, and CockroachDB, with full migration and introspection support.Basic usage
Enable the preview feature in your schema:
generator client { provider = "prisma-client-js" previewFeatures = ["partialIndexes"] }Raw SQL syntax
For maximum flexibility, use the
raw()function with database-specific predicates:model User { id Int @id email String status String @@unique([email], where: raw("status = 'active'")) @@index([email], where: raw("deletedAt IS NULL")) }Type-safe object syntax
For better type safety, use the object literal syntax for simple conditions:
model Post { id Int @id title String published Boolean @@index([title], where: { published: true }) @@unique([title], where: { published: { not: false } }) }Bug Fixes
Most of these fixes are community contributions - thank you to our amazing contributors!
prisma/prisma-engines#5767: Fixed an issue with PostgreSQL migration scripts that prevented usage of
CREATE INDEX CONCURRENTLYin migrationsprisma/prisma-engines#5752: Fixed BigInt precision loss in JSON aggregation for MySQL and CockroachDB by casting BigInt values to text (from community member polaz)
prisma/prisma-engines#5750: Fixed connection failures with non-ASCII database names by properly URL-decoding database names in connection strings
#29155: Fixed silent transaction commit errors in PlanetScale adapter by ensuring COMMIT failures are properly propagated
#29141: Resolved race condition errors (EREQINPROG) in SQL Server adapter by serializing commit/rollback operations using mutex synchronization
#29158: Fixed MSSQL connection string parsing to properly handle curly brace escaping for passwords containing special characters
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.3.0
21 Jan 2026Fast and Small Query Compilers
We've been working on various performance-related bugs since the initial ORM 7.0 release. With 7.3.0, we're introducing a newcompilerBuildoption for the client generator block inschema.prismawith two options:fastandsmall. This allows you to swap the underlying Query Compiler engine based on your selection, one built for speed (with an increase in size), and one built for size (with the trade off for speed). By default, thefastmode is used, but this can be set by the user:Bypass the Query Compiler for Raw Queries
Raw queries ($executeRaw,$queryRaw) can now skip going through the query compiler and query interpreter infrastructure. They can be sent directly to the driver adapter, removing additional overhead.Pin better-sqlite3 version to avoid SQLite bug
An underlying bug in SQLite 3.51.0 has affected thebetter-sqlite3adapter. We’ve bumped the version that powers@prisma/better-sqlite3and have pinned the version to prevent any unexpected issues. If you are using@prisma/better-sqlite3, please upgrade to v7.3.0.
Today, we are excited to share the
7.3.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
ORM
Fast and Small Query Compilers
We've been working on various performance-related bugs since the initial ORM 7.0 release. With 7.3.0, we're introducing a newcompilerBuildoption for the client generator block inschema.prismawith two options:fastandsmall. This allows you to swap the underlying Query Compiler engine based on your selection, one built for speed (with an increase in size), and one built for size (with the trade off for speed). By default, thefastmode is used, but this can be set by the user:
generator client { provider = "prisma-client" output = "../src/generated/prisma" compilerBuild = "fast" // "fast" | "small" }We still have more in progress for performance, but this new
compilerBuildoption is our first step toward addressing your concerns!Bypass the Query Compiler for Raw Queries
Raw queries ($executeRaw,$queryRaw) can now skip going through the query compiler and query interpreter infrastructure. They can be sent directly to the driver adapter, removing additional overhead.Pin better-sqlite3 version to avoid SQLite bug
An underlying bug in SQLite 3.51.0 has affected thebetter-sqlite3adapter. We’ve bumped the version that powers@prisma/better-sqlite3and have pinned the version to prevent any unexpected issues. If you are using@prisma/better-sqlite3, please upgrade to v7.3.0.Revert
@mapenums to v6.19.0 behavior
In the initial release of v7.0, we made a change with Mapped Enums where the generated enum would get its value from the value passed to the@mapfunction. This was a breaking change from v6 that caused issues for many users. We have reverted this change for the time being, as many different diverging approaches have emerged from the community discussion.prisma-engines#5745: Cast BigInt to text in JSON aggregation
When usingrelationJoinswith BigInt fields in Prisma 7, JavaScript'sJSON.parseloses precision for integers larger thanNumber.MAX_SAFE_INTEGER(2^53 - 1). This happens because PostgreSQL'sJSONB_BUILD_OBJECTreturns BigInt values as JSON numbers, which JavaScript cannot represent precisely.// Original BigInt ID: 312590077454712834 // After JSON.parse: 312590077454712830 (corrupted!)
This PR cast BigInt columns to
::textinsideJSONB_BUILD_OBJECTcalls, similar to howMONEYis already cast to::numeric.-- Before JSONB_BUILD_OBJECT('id', "id") -- After JSONB_BUILD_OBJECT('id', "id"::text)
This ensures BigInt values are returned as JSON strings, preserving full precision when parsed in JavaScript.
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our [Careers page](prisma.io/careers) and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.2.0
17 Dec 2025Add
sqlcommenter-query-insightspluginmigrate: Add
-urlparam fordb pull,db push,migrate devconfig: Allow undefined URLs in e.g.
prisma generate
Today, we are excited to share the
7.2.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
ORM
Add
sqlcommenter-query-insightspluginAdds a new SQL commenter plugin to support query insights metadata.
migrate: Add
-urlparam fordb pull,db push,migrate devAdds a
-urlflag to key migrate commands to make connection configuration more flexible.
config: Allow undefined URLs in e.g.
prisma generateAllows certain workflows (such as
prisma generate) to proceed even when URLs are undefined.
cli: Customize
prisma initbased on the JS runtime (Bun vs others)Makes
prisma inittailor generated setup depending on whether the runtime is Bun or another JavaScript runtime.
client-engine-runtime: Make
DataMapperErroraUserFacingErrorEnsures
DataMapperErroris surfaced as a user-facing error for clearer, more actionable error reporting.
adapter-{pg,neon,ppg}: Handle 22P02 error in Postgres
Improves Postgres adapter error handling for invalid-text-representation errors (
22P02).
Fix byte upserts by removing legacy byte array representation
Fixes byte upsert behavior by removing a legacy byte-array representation path.
client,internals,migrate,generator-helper: Handle multibyte UTF-8 characters split across chunk boundaries in byline
Prevents issues when multibyte UTF-8 characters are split across chunk boundaries during line processing.
cli: Make
prisma version --jsonemit JSON only to stdoutEnsures machine-readable JSON output is emitted cleanly to stdout without extra noise.
VS Code Extension
TML-1670 studio connections
Resolves issues related to Studio connections, improving reliability for VS Code or language-server integrations.
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our [Careers page](prisma.io/careers) and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.1.0
3 Dec 2025Pnpm monorepo issues with prisma client runtime utils
Resolves issues in pnpm monorepos where users would report TypeScript issues related to@prisma/client-runtime-utils.Implement sql commenter plugins for Prisma Client
This PR implements support for SQL commenter plugins to Prisma Client. The feature will allow users to add metadata to SQL queries as comments following the sqlcommenter format.Here’s two related PRs that were also merged:
Added error message when constructing client without configs
This commit adds an additional error message when trying to create a new PrismaClient instance without any arguments.
Today, we are excited to share the
7.1.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
This release brings quality of life improvements and fixes various bugs.
Prisma ORM
Pnpm monorepo issues with prisma client runtime utils
Resolves issues in pnpm monorepos where users would report TypeScript issues related to@prisma/client-runtime-utils.Implement sql commenter plugins for Prisma Client
This PR implements support for SQL commenter plugins to Prisma Client. The feature will allow users to add metadata to SQL queries as comments following the sqlcommenter format.Here’s two related PRs that were also merged:
implement query tags for SQL commenter plugin
add
traceContextSQL commenter plugin
Added error message when constructing client without configs
This commit adds an additional error message when trying to create a new PrismaClient instance without any arguments.Mark
@opentelemetry/apias external in instrumentation
Ensures@opentelemetry/apiis treated as an external dependency rather than bundled.
Since it is a peer dependency, this prevents applications from ending up with duplicate copies of the package.Allow
env()helper to accept interface-based generics
Updates theenv()helper’s type definition so it works with interfaces as well as type aliases.
This removes the previous constraint requiring an index signature and resolves TS2344 errors when using interface-based env types. Runtime behavior is unchanged.
Read Replicas extension
Add support for Prisma 7
Users of the read-replicas extension can now use the extension in Prisma v7. You can update by installing:npm install @prisma/extension-read-replicas@latest
For folks still on Prisma v6, install version
0.4.1:npm install @prisma/extension-read-replicas@0.4.1
For more information, visit the repo
SQL comments
We're excited to announce SQL Comments support in Prisma 7.1.0! This new feature allows you to append metadata to your SQL queries as comments, making it easier to correlate queries with application context for improved observability, debugging, and tracing.
SQL comments follow the sqlcommenter format developed by Google, which is widely supported by database monitoring tools. With this feature, your SQL queries can include rich metadata:
SELECT "id", "name" FROM "User" /*application='my-app',traceparent='00-abc123...-01'*/
Basic usage
Pass an array of SQL commenter plugins to the new
commentsoption when creating aPrismaClientinstance:import { PrismaClient } from './generated/prisma/client'; import { PrismaPg } from '@prisma/adapter-pg'; import { queryTags } from '@prisma/sqlcommenter-query-tags'; import { traceContext } from '@prisma/sqlcommenter-trace-context'; const adapter = new PrismaPg({ connectionString: `${process.env.DATABASE_URL}`, }); const prisma = new PrismaClient({ adapter, comments: [queryTags(), traceContext()], });Query tags
The
@prisma/sqlcommenter-query-tagspackage lets you add arbitrary tags to queries within an async context:import { queryTags, withQueryTags } from '@prisma/sqlcommenter-query-tags'; const prisma = new PrismaClient({ adapter, comments: [queryTags()], }); // Wrap your queries to add tags const users = await withQueryTags( { route: '/api/users', requestId: 'abc-123' }, () => prisma.user.findMany(), );Resulting SQL:
SELECT ... FROM "User" /*requestId='abc-123',route='/api/users'*/
Use
withMergedQueryTagsto merge tags with outer scopes:import { withQueryTags, withMergedQueryTags, } from '@prisma/sqlcommenter-query-tags'; await withQueryTags({ requestId: 'req-123', source: 'api' }, async () => { await withMergedQueryTags( { userId: 'user-456', source: 'handler' }, async () => { // Queries here have: requestId='req-123', userId='user-456', source='handler' await prisma.user.findMany(); }, ); });Trace context
The
@prisma/sqlcommenter-trace-contextpackage adds W3C Trace Context (traceparent) headers for distributed tracing correlation:import { traceContext } from '@prisma/sqlcommenter-trace-context'; const prisma = new PrismaClient({ adapter, comments: [traceContext()], });When tracing is enabled and the span is sampled:
SELECT * FROM "User" /*traceparent='00-0af7651916cd43dd8448eb211c80319c-b9c7c989f97918e1-01'*/
Note: Requires @prisma/instrumentation to be configured. The traceparent is only added when tracing is active and the span is sampled.
Custom plugins
Create your own plugins to add custom metadata:
import type { SqlCommenterPlugin } from '@prisma/sqlcommenter'; const applicationTags: SqlCommenterPlugin = (context) => ({ application: 'my-service', environment: process.env.NODE_ENV ?? 'development', operation: context.query.action, model: context.query.modelName, }); const prisma = new PrismaClient({ adapter, comments: [applicationTags], });Framework integration
SQL comments work seamlessly with popular frameworks, e.g., Hono:
import { createMiddleware } from 'hono/factory'; import { withQueryTags } from '@prisma/sqlcommenter-query-tags'; app.use( createMiddleware(async (c, next) => { await withQueryTags( { route: c.req.path, method: c.req.method, requestId: c.req.header('x-request-id') ?? crypto.randomUUID(), }, () => next(), ); }), );Additional framework examples for Express, Koa, Fastify, and NestJS are available in the documentation.
For complete documentation, see SQL Comments. We'd love to hear your feedback on this feature! Please open an issue on GitHub or join the discussion in our Discord community.
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
7.0.1
25 Nov 2025Prisma Studio: Support Deno >= 1.4 <2.2 and Bun >= 1 (via #28583)
Prisma Studio: Fix collisions between user and internal Studio columns when querying (via #28677)
Prisma Studio: Warn when SQLite file doesn't exist (via #28711)
Today, we are issuing a 7.0.1 patch release focused on quality of life improvements, and bug fixes.
Fixes
Prisma Studio: Support Deno >= 1.4 <2.2 and Bun >= 1 (via #28583)
Prisma Studio: Fix collisions between user and internal Studio columns when querying (via #28677)
Prisma Studio: Warn when SQLite file doesn't exist (via #28711)
Prisma Studio: Sort tables alphabetically (via #28702)
Prisma CLI
Fix potential vulnerabilities in installed dependencies (via #28592)
Fix #28240, an exit code regression affecting
prisma migrate diff(via #5699)Show informative message when
prisma db seedis run, but nomigrations.seedcommand is specified in the Prisma config file (via #28711)Relax
enginescheck inpackage.json, to let Node.js 25+ users adopt Prisma, although Node.js 25+ isn't considered stable yet (via #28600). Thanks @Sajito!
Prisma Client
Restore
cockroachdbsupport inprisma-client-jsgenerator, after it was accidentally not shipped in Prisma 7.0.0 (via #28690)
@prisma/better-sqlite3
7.0.0
19 Nov 2025- removed
post-install hook would run
prisma generate - removed
prisma migratewould runprisma generateandprisma seed - removed
prisma generate --data-proxy
Today, we are excited to share the
7.0.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — and follow us on X!
Highlights
Over the past year we focused on making it simpler and faster to build applications with Prisma, no matter what tools you use or where you deploy, with exceptional developer experience at it’s core. This release makes many features introduced over the past year as the new defaults moving forward.
Prisma ORM
ESM Prisma Client as the default
The Rust-free/ESM Prisma Client has been in the works for some time now, all the way back to v6.16.0, with early iterations being available for developers to adopt. Now with version 7.0, we’re making this the default for all new projects. With this, developers are able to get:
~90% smaller bundle sizes
Up to 3x faster queries
Significantly simpler deployments
Adopting the new client is as simple as swapping the
prisma-client-jsprovider forprisma-clientin your mainschema.prisma:// schema.prisma generator client { - provider = "prisma-client-js" + provider = "prisma-client" }Prisma Client changes
In v7, we've moved to requiring users pass either an adapter or
accelerteUrlwhen creating a new instance ofPrismaClient.For Driver Adapters
import { PrismaClient } from './generated/prisma/client'; import { PrismaPg } from '@prisma/adapter-pg'; const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL }); const prisma = new PrismaClient({ adapter });For other databases:
// If using SQLite import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3'; const adapter = new PrismaBetterSqlite3({ url: process.env.DATABASE_URL || 'file:./dev.db' }) // If using MySql import { PrismaMariaDb } from '@prisma/adapter-mariadb'; const adapter = new PrismaMariaDb({ host: "localhost", port: 3306, connectionLimit: 5 });We’ve also removed support for additional options when configuring your Prisma Client
new PrismaClient({ datasources: .. })support has been removednew PrismaClient({datasourceUrl: ..})support has been removednew PrismaClient()support has been removednew PrismaClient({})support has been removed
For Prisma Accelerate users:
import { PrismaClient } from "./generated/prisma/client" import { withAccelerate } from "@prisma/extension-accelerate" const prisma = new PrismaClient({ accelerateUrl: process.env.DATABASE_URL, }).$extends(withAccelerate())Generated Client and types move out of
node_modulesWhen running
prisma generate, the generated Client runtime and project types will now require aoutputpath to be set in your project’s mainschema.prisma. We recommend that they be generated inside of your project’ssrcdirectory to ensure that your existing tools are able to consume them like any other piece of code you might have.// schema.prisma generator client { provider = "prisma-client" // Generate my Client and Project types output = "../src/generated/prisma" }Update your code to import
PrismaClientfrom this generated output:// Import from the generated prisma client import { PrismaClient } from './generated/prisma/client';For developers who still need to stay on the
prisma-client-jsbut are using the newoutputoption, theres’s a new required package,@prisma/client-runtime-utils, which needs to be installed:# for prisma-client-js users only npm install @prisma/client-runtime-utils
Removal of implicit Prisma commands
In previous releases, Prisma would run
generateandseedin various situations:- removed
post-install hook would run
prisma generate - removed
prisma migratewould runprisma generateandprisma seed
This behaviour has been removed in favor of explicitly requiring commands to be run by users.
Removal of
prisma generateflagsFor
prisma generate, we’ve removed a few flags that were no longer needed:- removed
prisma generate --data-proxy - removed
prisma generate --accelerate - removed
prisma generate --no-engine - removed
prisma generate --allow-no-models
Removal of
prisma dbflagsFor
prisma db, we’ve removed the following flag:- removed
prisma db pull --local-d1
This parameter no longer exists but equivalent functionality can be implemented by defining a config file with a connection string for the local D1 database. We provide a helper function listLocalDatabases in the D1 adapter to simplify the migration:
import { defineConfig } from '@prisma/config' import { listLocalDatabases } from '@prisma/adapter-d1' export default defineConfig({ datasource: { url: `file://${listLocalDatabases().pop()}`, }, })Removal of
prisma migrateflagsFor
prisma migrate diff, we’ve removed the following flags:- removed
prisma --[from/to]-schema-datamodel: This is now replaced with just
--[from/to]-schema. The usage is otherwise the same. - removed
prisma --[from/to]-url, prisma --[from/to]-schema-datasource: These are now replaced with
--[from/to]-config-datasource. The user is expected to populate the datasource in the config file and use the new flag. We no longer support diffing two different URLs/datasources, since only one config can be used at a time. - removed
prisma --[from/to]-local-d1: These are now replaced with
--[from/to]-config-datasource. The user is expected to populate the datasource in the config file and use the new flag with a minor complication due to the fact that it needs to reference the local D1 database. OurlistLocalDatabaseshelper function can be used for that, analogously to thedb pull --local-d1example above (where the user sets the datasource URL tofile://${listLocalDatabases().pop()})
MongoDB support in Prisma 7
Currently, MongoDB is not supported in Prisma 7. For folks using MongoDB, please stay on Prisma v6. We aim to add support for MongoDB in a future release.
Driver Adapter naming updates
We’ve standardized our naming conventions for the various driver adapters internally. The following driver adapters have been updated:
PrismaBetterSQLite3⇒PrismaBetterSqlite3PrismaD1HTTP⇒PrismaD1HttpPrismaLibSQL⇒PrismaLibSqlPrismaNeonHTTP⇒PrismaNeonHttp
Schema and config file updates
As part of a larger change in how the Prisma CLI reads your project configuration, we’ve updated what get’s set the schema, and what gets set in the
prisma.config.ts. Also as part of this release,prisma.config.tsis now required for projects looking to perform introspection and migration.Schema changes
datasource.urlis now configured in the config filedatasource.shadowDatabaseUrlis now configured in the config filedatasource.directUrlhas been made unnecessary and has removed- removed
generator.runtime=”react-native”has been removed
For early adopters of the config file, a few things have been removed with this release
- removed
engine: 'js'| 'classic'has been removed - removed
adapterhas been removed
A brief before/after:
// schema.prisma datasource db { provider = "postgresql" url = ".." directUrl = ".." shadowDatabaseUrl = ".." }// ./prisma.config.ts export default defineConfig({ datasource: { url: '..', shadowDatabaseUrl: '..', } })Explicit loading of environment variables
As part of the move to Prisma config, we’re no longer automatically loading environment variables when invoking the Prisma CLI. Instead, developers can utilize libraries like
dotenvto manage their environment variables and load them as they need. This means you can have dedicated local environment variables or ones set only for production. This removes any accidental loading of environment variables while giving developers full control.Removed support for
prismakeyword inpackage.jsonIn previous releases, users could configure their schema entry point and seed script in a
prismablock in thepackage.jsonof their project. With the move toprisma.config.ts, this no longer makes sense and has been removed. To migrate, use the Prisma config file instead:{ "name": "my-project", "version": "1.0.0", "prisma": { "schema": "./custom-path-to-schema/schema.prisma", "seed": "tsx ./prisma/seed.ts" } }import 'dotenv/config' import { defineConfig, env } from "prisma/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { seed: "tsx prisma/seed.ts" }, datasource: {...}, });Removed Client Engines
We’ve removed the following client engines:
- removed
LibraryEngine(engineType = "library", the Node-API Client) - removed
BinaryEngine(engineType = "binary", the long-running executable binary) - removed
DataProxyEngineandAccelerateEngine(Accelerate uses a newRemoteExecutornow) - removed
ReactNativeEngine
Deprecated metrics feature has been removed
We deprecated the previewFeature
metricssome time ago, and have removed it fully for version 7. If you need metrics related data available, you can use the underlying driver adapter itself, like the Pool metric from the Postgres driver.Miscellaneous
Stop shimming
WeakRefin Cloudflare Workers. This will now avoid any unexpected memory leaks.Remove hardcoded URL validation. Users are now required to make sure they don’t include sensitive information in their config files.
Removed Prisma v1 detection
- removed
Remove undocumented
--urlflag fromprisma db pull - removed
Remove deprecated
prisma introspectcommand. Rename
/wasmto/edgeThis change only affects
prisma-client-jsBefore:
/edge→ meant “for Prisma Accelerate”Before:
/wasm→ meant “for Edge JS runtimes (e.g., Cloudflare, Vercel Edge)”After:
/edge→ means “for Edge JS runtimes (e.g., Cloudflare, Vercel Edge)”
The following Prisma-specific environment variables have been removed
PRISMA_CLI_QUERY_ENGINE_TYPEPRISMA_CLIENT_ENGINE_TYPEPRISMA_QUERY_ENGINE_BINARYPRISMA_QUERY_ENGINE_LIBRARYPRISMA_GENERATE_SKIP_AUTOINSTALLPRISMA_SKIP_POSTINSTALL_GENERATEPRISMA_GENERATE_IN_POSTINSTALLPRISMA_GENERATE_DATAPROXYPRISMA_GENERATE_NO_ENGINEPRISMA_CLIENT_NO_RETRYPRISMA_MIGRATE_SKIP_GENERATEPRISMA_MIGRATE_SKIP_SEED
Mapped enums
If you followed along on twitter, you will have seen that we teased a highly-request user feature was coming to v7.0. That highly-requested feature is…. mapped emuns! We now support the
@mapattribute for enum members, which can be used to set their expected runtime valuesenum PaymentProvider { MixplatSMS @map("mixplat/sms") InternalToken @map("internal/token") Offline @map("offline") @@map("payment_provider") }export const PaymentProvider: { MixplatSMS: 'mixplat/sms' InternalToken: 'internal/token' Offline: 'offline' }New Prisma Studio comes to the CLI
We launched a new version of Prisma Studio to our Console and VS Code extension a while back, but the Prisma CLI still shipped with the older version.
Now, with v7.0, we’ve updated the Prisma CLI to include the new Prisma Studio. Not only are you able to inspect your database, but you get rich visualization to help you understand connected relationships in your database. It’s customizable, much smaller, and can inspect remote database by passing a
--urlflag. This new version of Prisma Studio is not tied to the Prisma ORM, and establishes a new foundation for what comes next.Currently, the new studio only supports Postgres, MySQL, and SQLite, with support for other databases coming in a future release.
For issues related to Prisma Studio, please direct them to the Studio repo on github.
ScreenRecording2025-11-18at7 40 46PM-ezgif com-video-to-gif-converter
Prisma Postgres
Prisma Postgres is our managed Postgres service, designed with the same philosophy of great DX that has guided Prisma for close to a decade. It works great with serverless, it’s fast, and with simple pricing and a generous free tier. Here’s what’s new:
Connection Pooling Changes with Prisma Accelerate
With support for connection pooling being added natively to Prisma Postgres, Prisma Accelerate now serves as a dedicated caching layer. If you were using Accelerate for the connection pooling features, don’t worry! Your existing connection string via Accelerate will continue to work, and you can switch to the new connection pool when you’re ready.
Simplified connection flow
We've made connecting to Prisma Postgres even simpler. Now, when you go to connect to a database, you’ll get new options to enable connection pooling, or to enable Prisma Accelerate for caching. Below, you’ll get code snippets for getting things configured in your project right away.
Clipboard-20251119-110343-691
Serverless driver
For those who want to connect to Prisma Postgres but are deploying to environments like Cloudflare Workers, we have a new version of the serverless client library to support these runtimes.
Compatible with Cloudflare Workers, Vercel Edge Functions, Deno Deploy, AWS Lambda, and Bun
Stream results row-by-row to handle large datasets with constant memory usage
Pipeline multiple queries over a single connection, reducing latency by up to 3x
SQL template literals with automatic parameterization and full TypeScript support
Built-in transactions, batch operations, and extensible type system
Check out the serverless driver docs for more details
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
- 6.x
6.19.3
1 Apr 2026Today, we are issuing a 6.19.3 patch release in the Prisma 6 release line. It updates the
effectdependency to resolve a security vulnerability.Today, we are issuing a 6.19.3 patch release in the Prisma 6 release line. It updates the
effectdependency to resolve a security vulnerability.Changes:
#294166.19.2
13 Jan 2026Today, we are issuing a 6.19.2 patch release in the Prisma 6 release line. It fixes an issue with Prisma Accelerate support in some edge runtime configurations when the
@prisma/client/edgeentrypoint is not being used.Today, we are issuing a 6.19.2 patch release in the Prisma 6 release line. It fixes an issue with Prisma Accelerate support in some edge runtime configurations when the
@prisma/client/edgeentrypoint is not being used.Changes:
6.19.1
10 Dec 2025Today, we are issuing a patch release for Prisma 6 that includes a fix for a diffing bug introduced in Prisma 6.13.1, which led to incorrectly reported empty diffs.
Today, we are issuing a patch release for Prisma 6 that includes a fix for a diffing bug introduced in Prisma 6.13.1, which led to incorrectly reported empty diffs.
6.19.0
5 Nov 2025When dropping a model from a schema, do not append the default schema to the migration.
Align naming conventions for fields and relation fields
Add biome ignore comments to generated client files. This was a community contribution from @lonelyevil, thank you!
Today, we are excited to share the
6.19.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X
Highlights
This release brings a lot of bug fixes and improvements to both the ORM and Prisma Postgres.
Prisma ORM is the most popular ORM in the TypeScript ecosystem. Today’s release brings a bunch of new bug fixes and overall improvements:
When dropping a model from a schema, do not append the default schema to the migration.
Align naming conventions for fields and relation fields
Add biome ignore comments to generated client files. This was a community contribution from @lonelyevil, thank you!
Prisma Postgres is our fully managed Postgres service, designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release, we are introducing the following improvements:
Connection pooling with Prisma Postgres
We added support for direct connections in 6.17, opening Prisma Postgres up to working with any tool in the wider Postgres ecosystem. Now, you can confirm that connection to support connection pooling by appending the query parameter
pool=trueto the connection string.postgres://555555..../postgres?sslmode=require&pool=true
VS Code extension
A frequently requested feature is to be able to use a local Prisma Postgres database within our VS Code Extension without having to log in. In this release, we’re happy to share that this is now supported! Now you can work on your project without having to connect to the database remotely.
#1924: previewFeatures = "" suggestion results in "" value
Preparing for Prisma v7
Prisma v7 is almost here, and we’ve been making many of the feature in it available ahead of its release. If you haven’t been keeping your version of
prisma,@prisma/clientup to date, now is the time to do so before the release. Many of the changes we’ve introduced over the 6.x release cycle will become the default in v7.Unified Prisma Config for project configuration
Move from
prisma-client-jsprisma-clientNew
engineanddatasourcekeys inprisma.config.ts
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
6.18.0
22 Oct 2025prisma initnow creates aprisma.config.tsautomaticallySupport for defining your
datasourceinprisma.config.ts#28291 Support multiple Prisma instances with different providers
Today, we are excited to share the
6.18.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Prisma ORM
Prisma ORM is the most popular ORM in the TypeScript ecosystem. Today’s release brings a bunch of new bug fixes and overall improvements:
prisma initnow creates aprisma.config.tsautomatically
When creating a new project with 6.18.0,
prisma initwill now create aprisma.config.tsfile automatically. This prepares new applications for the future of Prisma 7. Some fields that have been historically set in theschema.prismafile are now able to be set in theprisma.config.ts, and we encourage people to migrate over to the new structure before the release of version 7, where this file will become a requirement.Support for defining your
datasourceinprisma.config.ts
If you’re adopting the new
prisma.config.tssetup in your projects, version 6.18.0 brings the ability to set your datasource directly in your config file. Once this is in your config file, any datasource set in yourschema.prismawill be ignored. To set the datasource, we also must include the newenginekey which we can set to"classic", which will be required for Prisma v7import { defineConfig, env } from "prisma/config"; export default defineConfig({ // The Rust-compiled schema engine engine: "classic", datasource: { url: env('DATABASE_URL'), } });#28291 Support multiple Prisma instances with different providers
#28305 Add
envhelper function#28266 Add support for
jsorclassicas engine types inprisma.config#28139 Map
BytestoUint8Arraydepending on Typescript version
Preparing for Prisma v7
While it has been mentioned a few times already, many of the changes in this release are here to prepare folks for the upcoming release of Prisma v7. It’s worth repeating that these changes and the migration to
prisma.config.tswill be required for Prisma v7, so we’re releasing this as opt-in features for developers. But come Prisma v7, they will be the new way of configuring your project.Prisma Postgres is our fully managed Postgres service designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release we are introducing the following improvements:
Database Metric in Console
Inside of your database console, you can now view metrics on your database usage and interactions. You can get insights into the follow:
Total egress
Average response size
Average query duration
In addition, you can also get insights into how to improve your query caching and gain better performance.
Open roles at Prisma
Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our Careers page and find the role that’s right for you.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
6.17.1
10 Oct 2025Today, we are issuing a patch release to address a regression in v6.17.0 that affected diffing of unsupported types, leading to unnecessary or incorrect changes when creating new migrations or running
db pull. This update is recommended for all users who have any fields marked asUnsupportedin their schema files.Today, we are issuing a patch release to address a regression in v6.17.0 that affected diffing of unsupported types, leading to unnecessary or incorrect changes when creating new migrations or running
db pull. This update is recommended for all users who have any fields marked asUnsupportedin their schema files.6.17.0
7 Oct 2025Added support for Entra ID (ActiveDirectory) authentication parameters for the MS SQL Server driver adapter. For example, you can use the
configobject to configure DefaultAzureCredential:import { PrismaMssql } from '@prisma/adapter-mssql' import { PrismaClient } from '@prisma/client' const config = { server: 'localhost', port: 1433, database: 'mydb', authentication: { type: 'azure-active-directory-default', }, options: { encrypt: true, }, } const adapter = new PrismaMssql(config) const prisma = new PrismaClient({ adapter })Learn more in this PR.
Relaxed the support package range for
@opentelemetry/instrumentationto be compatible with">=0.52.0 <1". Learn more in this PR.Added Codex CLI detection, ensuring dangerous Prisma operations are not executed by Codex without explicit user consent. Learn more in this PR.
Today, we are excited to share the
6.17.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Prisma ORM
Prisma ORM is the most popular ORM in the TypeScript ecosystem. Today's release brings a number of bug fixes and improvements to Prisma ORM.
Bug fixes and improvements
Added support for Entra ID (ActiveDirectory) authentication parameters for the MS SQL Server driver adapter. For example, you can use the
configobject to configure DefaultAzureCredential:import { PrismaMssql } from '@prisma/adapter-mssql' import { PrismaClient } from '@prisma/client' const config = { server: 'localhost', port: 1433, database: 'mydb', authentication: { type: 'azure-active-directory-default', }, options: { encrypt: true, }, } const adapter = new PrismaMssql(config) const prisma = new PrismaClient({ adapter })Learn more in this PR.
Relaxed the support package range for
@opentelemetry/instrumentationto be compatible with">=0.52.0 <1". Learn more in this PR.Added Codex CLI detection, ensuring dangerous Prisma operations are not executed by Codex without explicit user consent. Learn more in this PR.
Fixed JSON column handling when using a MariaDB database. Learn more in this PR.
Restored the original behaviour of group-by aggregations where they would refer to columns with explicit table names which fixes a regression that would result in ambiguous column errors. Learn more in this PR.
Prisma Postgres
Prisma Postgres is our fully managed Postgres service designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release we are introducing the following improvements:
New usage workspace metrics available in your Console Dashboard
The Dashboard in your Prisma Console account now displays new metrics about your Prisma Postgres usage:
Key metrics
Estimated upcoming invoice
Total storage used
Total DBs
Overall usage
Cumulative operations
Operations per day
Using Prisma Postgres with any tool is ready for production
Previously, the only way to connect to Prisma Postgres was using Prisma ORM. That combination is great because it gives you connection pooling, global caching and overall an amazing DX.
That being said, we understand that preferences vary and some developers prefer to use plain SQL or lower-level query builders in their applications. As of this release, these ways for connecting to Prisma Postgres are now officially generally available and can be used in your production apps!
You can connect using Drizzle, Kysely, TypeORM,
psql, or any other Postgres-compatible library, database migration tools like Atlas or interfaces like DBeaver, Postico, and more.📚 Learn more in the docs.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
6.16.3
30 Sep 2025Prisma Client (
prisma-clientgenerator): fixed missing JSON null type definitions (JsonNull,DbNull,AnyNull) in thebrowser.tsentrypoint. (#28186)Prisma Migrate: don't add the default schema (namespace) to the generated migrations unless it was specified explicitly in the schema file. This restores the pre-6.13.0 behaviour that was inadvertently changed with enabling multi-schema support by default. Users who rely on database schemas for multi-tenancy can now again use the same migration files for all of their schemas. (#5614)
Prisma Client: enabled negative
takewithfindFirstagain. _(#5616 — contributed
Today, we are issuing a 6.16.3 patch release focused on bug fixes.
Fixes
Prisma Client (
prisma-clientgenerator): fixed missing JSON null type definitions (JsonNull,DbNull,AnyNull) in thebrowser.tsentrypoint. (#28186)Prisma Migrate: don't add the default schema (namespace) to the generated migrations unless it was specified explicitly in the schema file. This restores the pre-6.13.0 behaviour that was inadvertently changed with enabling multi-schema support by default. Users who rely on database schemas for multi-tenancy can now again use the same migration files for all of their schemas. (#5614)
Prisma Client: enabled negative
takewithfindFirstagain. _(#5616 — contributedPrisma Accelerate: aligned the behaviour of the new Rust-free client with Query Engine to handle self-signed certificates consistently and ensure backward compatibility. (#28134)
@prisma/adapter-mariadb: fixed error event listeners leak. _(#28177 — contributed
Known Limitation: JSON null types in browser builds
The fix introduces the missing types, but the singleton instances differ between the client and browser entrypoints of the generated client. This means that values like
Prisma.JsonNullimported from browser cannot yet be assigned to fields expected from the client entrypoint, and vice versa. This results in confusing TypeScript errors if you mix them. A follow-up improvement is planned to unify these utility types across entrypoints.6.16.2
16 Sep 2025In Prisma ORM 6.16.0, we've enabled usage of the new
engineType = clientwith Prisma Postgres, but our validation rules permitted invalid combinations of Prisma Postgres URLs and driver adapters. This now produces a clear error message indicating Prisma Postgres URLs and driver adapters are mutually exclusive.In the previous minor release, we've included a change that calls
unref()on NodeJS timers to prevent them from keeping the NodeJS event loop active. This change unintentionally affected non-NodeJS runtimes likeworkerd, where it has resulted in runtime errors. This behavior has been made conditional to prevent these runtime errors.
Today, we are issuing a 6.16.2 patch release.
Bug fixes
In Prisma ORM 6.16.0, we've enabled usage of the new
engineType = clientwith Prisma Postgres, but our validation rules permitted invalid combinations of Prisma Postgres URLs and driver adapters. This now produces a clear error message indicating Prisma Postgres URLs and driver adapters are mutually exclusive.In the previous minor release, we've included a change that calls
unref()on NodeJS timers to prevent them from keeping the NodeJS event loop active. This change unintentionally affected non-NodeJS runtimes likeworkerd, where it has resulted in runtime errors. This behavior has been made conditional to prevent these runtime errors.
6.16.1
11 Sep 2025In Prisma ORM 6.16.0, the
driverAdaptersandqueryCompilerfeatures were stabilized, but leftover code in theprisma-client-tsgenerator required them to still be specified in edge runtimes. This has now been fixed, runtimes likeworkerdandvercel-edgeno longer require these preview features.
Today, we are issuing a 6.16.1 patch release.
Bug fixes
In Prisma ORM 6.16.0, the
driverAdaptersandqueryCompilerfeatures were stabilized, but leftover code in theprisma-client-tsgenerator required them to still be specified in edge runtimes. This has now been fixed, runtimes likeworkerdandvercel-edgeno longer require these preview features.
6.16.0
10 Sep 2025Reduced bundle size by ~90%
Faster queries (check out our latest benchmarks)
Lower CPU footprint
Today, we are excited to share the
6.16.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Prisma ORM
This section contains all the updates made in Prisma ORM v6.16.0.
Rust-free ORM and driver adapters are Generally Available
Eight months ago, we published our ORM manifesto with the first hint that we're going to remove the Rust-based query engine from Prisma ORM:
We're addressing this by migrating Prisma's core logic from Rust to TypeScript and redesigning the ORM to make customization and extension easier.
After a lot of hard work and feedback from the community, we're incredibly excited to share that the migration has been completed and you can now use Prisma ORM without its Rust engine in your production apps. 🎉 This is a major milestone in the history of Prisma ORM and comes with a lot of benefits:
Reduced bundle size by ~90%
Faster queries (check out our latest benchmarks)
Lower CPU footprint
Less deployment complexity
Easier to make open-source contributions
… and overall a much better DX since you don't need to worry about the extra binary in your generated Prisma Client code any more.
While the Rust-free ORM will become the default in Prisma ORM v7 soon, for now you still need to opt-into using it:
Configure the
generatorblock in your Prisma schema:generator client { provider = "prisma-client" // (or "prisma-client-js") output = "../src/generated/prisma" engineType = "client" }Note: If you tried the Rust-free ORM before, you can now also drop the
queryCompileranddriverAdapterfeature flags from thepreviewFeaturesarray. And if you usedbinaryTargets, you can also get rid of these.Install the driver adapter for your database, e.g. to use
pgfor PostgreSQL:npm install @prisma/adapter-pg
Finally, you can instantiate
PrismaClientusing thePrismaPgdriver adapter as follows:import { PrismaClient } from './generated/prisma' import { PrismaPg } from '@prisma/adapter-pg' const adapter = new PrismaPg({ connectionString: env.DATABASE_URL }) const prisma = new PrismaClient({ adapter }) // ... send queries using `prisma` like before
📚 To learn more and see instructions for all other supported databases, check out the documentation.
The Rust-free version of Prisma ORM has been thoroughly tested with the
prisma-clientgenerator (see below), not withprisma-client-js. Use the old generator at your discretion.New ESM-first
prisma-clientgenerator is Generally AvailableAnother major milestone has been achieved in this release: The new, flexible and ESM-first
prisma-clientgenerator is ready for production too. Here's a quick overview of its main benefits:No more magic generation into
node_modules; generated code is fully under control by the developerESM-compatible by default
Flexible configuration for specific runtimes (Node.js, Deno, Bun, Cloudflare, …)
generator client { // Required provider = "prisma-client" output = "../src/generated/prisma" // Optional engineType = "client" runtime = "nodejs" moduleFormat = "esm" generatedFileExtension = "ts" importFileExtension = "ts" }In addition to making it production-ready, we also made some changes to the
prisma-clientgenerator:Removed
Prisma.validator; you can use TypeScript nativesatisfieskeyword insteadCreated a new
./generared/prisma/browserentrypoint for importing types in browser environments
If you want to try out the new generator with your favorite framework, check out one of our ready-to-run examples (e.g. for Next.js, Nuxt or React Router).
📚 Learn more in the docs.
Type check performance optimizations
Runtime performance is not the only performance category that matters. In fact, when it comes to DX, type checking performance is equally important: if your TypeScript types become too complex and the compiler needs to do too much work (e.g. inferring types), it may slow down your editor, lead to laggy auto-completion or prevent jump-to-definition from working.
We've worked with TypeScript expert David Blass to find ways for improving the type checking performance in Prisma ORM and created benchmarks comparing the type checking performance with Drizzle.
You can read about the results here: Why Prisma ORM Checks Types Faster Than Drizzle
Deprecating the
postgresqlExtensionsPreview featureWe're deprecating the
postgresqlExtensionsPreview feature. Note that this doesn't mean that you can't use extensions with Prisma ORM any more. Instead of setting the Preview feature, you can install extensions manually with a customized migration via the--create-onlyflag:npx prisma migrate dev --name add-extension --create-only
You can then install an extension with plain SQL in the newly created, empty migration file:
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
Prisma Postgres
Prisma Postgres is our fully managed Postgres service designed with the same philosophy of great DX that has guided Prisma for close to a decade. With this release we are introducing the following improvements:
Manage OAuth apps in Prisma Console
In Prisma Console, you can now manage all of the 3rd party applications that you've granted access to perform actions on behalf of yourself in your Prisma Console account. Find the 🧩 Integrations tab in the sidenav to see which applications currently have access.
Rust-free Prisma ORM with Prisma Accelerate and Prisma Postgres
With this release, the Rust-free Prisma ORM (Query Compiler) can now be used together with Prisma Postgres and also Prisma Accelerate. This means you can take advantage of connection pooling and caching while using the new TypeScript-based ORM architecture.
To enable it, update your Prisma schema:
generator client { provider = "prisma-client" output = "../src/generated/prisma" engineType = "client" }We'd love for you to try this out and share your feedback as we prepare for General Availability. Please open an issue on GitHub if you encounter any problems or have suggestions.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
6.15.0
27 Aug 2025- removed
nodehas been removed, useruntime = "nodejs"instead - removed
deno-deployhas been removed, useruntime = "deno"instead vercelhas been replaced by the newruntime = "vercel-edge"
Today, we are excited to share the
6.15.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
AI safety guardrails for destructive commands
Prisma ORM now includes built-in safety checks that protect against destructive commands when triggered by AI coding assistants. The CLI can recognize when it is being executed by popular AI agents such as Claude Code, Gemini CLI, Qwen Code, Cursor, Aider and Replit.
If a command like
prisma migrate reset --forceis attempted, Prisma ORM will prompt for explicit confirmation before proceeding.Cursor AI guardrail
This feature ensures that irreversible operations which drop and recreate the database are not executed automatically by an AI tool. Prisma ORM is the first ORM to provide this level of protection, making it safer to use AI-assisted development while working with your databases.
📚 Learn more in the docs.
prisma-client: runtime improvements and schema flexibilityWe simplified Prisma ORM by making the runtime options for the Prisma Client more consistent and easier to understand. Previously there were several overlapping aliases which created confusion. With this release we simplified the inputs while keeping support for all the major environments you might be targeting.
Changes include:
- removed
nodehas been removed, useruntime = "nodejs"instead - removed
deno-deployhas been removed, useruntime = "deno"instead vercelhas been replaced by the newruntime = "vercel-edge"edge-lightis now just an alias forvercel-edgenodejs,deno, andbunnow share the same internal code path, while still keeping their separate input values for clarityThe VS Code extension has been updated to reflect these changes
The updated list of supported runtimes is now:
nodejs,deno,bun,workerd(aliascloudflare),vercel-edge(aliasedge-light), andreact-native.In addition, we fixed an issue where running
prisma generatewould fail if your schema contained no models. This is now supported with the newprisma-clientgenerator, just like it already worked with the olderprisma-client-jsgenerator.For example, the following schema will now generate a client without errors:
generator client { provider = "prisma-client" output = "../generated/client" } datasource db { provider = "postgresql" url = env("DATABASE_URL") }Running
prisma generatewith this schema will succeed and create the client in./generated/client.📚 Learn more in the docs.
Using Prisma ORM with Vercel Fluid
Fluid compute is a new compute model from Vercel that combines the flexibility of serverless with the stability of servers, making it ideal for dynamic workloads such as streaming data and AI APIs.
A common challenge in traditional serverless platforms is that when functions are suspended, database connection pools can’t close idle connections. This leads to leaked connections that stay open until the database times them out, which can exhaust the pool.
Vercel provides the
attachDatabasePoolutility to solve this problem. It ensures idle connections in the pool are properly released before a function is suspended, preventing connection leaks.You can use this utility together with Prisma’s driver adapters to safely manage database connections in Fluid Compute:
import { Pool } from "pg"; import { attachDatabasePool } from "@vercel/functions"; import { PrismaPg } from "@prisma/adapter-pg"; import { PrismaClient } from "./generated/prisma/client"; const pool = new Pool({ connectionString: process.env.POSTGRES_URL }); attachDatabasePool(pool); const prisma = new PrismaClient({ adapter: new PrismaPg(pool), });📚 Learn more in the docs.
Other news
Prisma Postgres Management API is Generally Available
The Prisma Postgres Management API allows you to programmatically provision and manage Prisma Postgres instances. It’s the perfect way to spin up a database in your CI/CD workflow, see our GitHub Action examples for creating and deleting if you’re curious about this use case.
It also enables developers to offer databases to their own users! For example, did you know that Co.dev (YC23), a popular “low-code AI app builder” is using the Management API to provision Prisma Postgres instances to people building apps with their platform?
We’re excited to share that the Management API is now fully ready for production. With it moving into GA, we also added another piece of functionality where you can now create new projects without a default database.
We’re looking forward to see what you’re going to build with it!
📚 Learn more in the docs.
Prisma Postgres is now available on Pipedream
Prisma Postgres can now be used directly in your Pipedream workflows 🎉
With this integration, you can connect Prisma Postgres to over 2,800+ apps supported on Pipedream, enabling powerful automations and data workflows. For example, you can:
Automatically spin up a new Prisma Postgres database when a customer signs up in Stripe.
Connect Prisma Postgres with Slack, Notion, Airtable, or any other app in the Pipedream ecosystem
This makes it easier than ever to use Prisma Postgres in your automation pipelines, without needing to manage custom scripts or infrastructure.
📚 Learn more on the Pipedream integration page.
New
--jsonflag fornpx create-dbThe
npx create-dbcommand lets you spin up a temporary, production-ready Prisma Postgres database that you can later claim for continued use. With this release, you can now add the--jsonflag to return the database details in JSON format.This makes it straightforward to programmatically use the connection details, whether you are building custom APIs or integrating database provisioning into your workflows.
📚 Learn more in the docs.
npx create-db --json command
Direct connections to Prisma Postgres are coming close to GA
Direct connections enable you to connect to your database using any ORM library or tool of your choice (e.g. Drizzle ORM, Kysely but also database GUIs like Postico or TablePlus).
In this release, we’ve improved the robustness of direct TCP connections and are close to bringing it to General Availability.
📚 Learn more in the docs.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
6.14.0
12 Aug 2025- deprecated
Deprecated
metricsPreview feature (which will be removed in Prisma 7) Relationships involving views
findUniquequeries, cursor-based pagination & implicit ordering for views
Today, we are excited to share the
6.14.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
@uniqueattributes for SQL views (Preview)Last release, we improved the robustness of SQL views defined in the Prisma schema. Views are virtual tables that don't allows for defining unique constraints, indexes or foreign keys in the underlying database.
However, as an application developer, it can be convenient to also define relationships involving views or paginate them using cursors. We've received this feedback from several people who had been using views in that way with Prisma ORM, so in this release we're re-introducing the
@uniqueattribute for views. This attribute enables:Relationships involving views
findUniquequeries, cursor-based pagination & implicit ordering for views
Here's an example schema using
@uniqueand defining a relationship from a model to a view:model User { id Int @id @default(autoincrement()) email String @unique posts Post[] stats UserPostStats? @relation(fields: [email], references: [userEmail]) } model Post { id Int @id @default(autoincrement()) title String published Boolean @default(false) createdAt DateTime @default(now()) authorId Int? author User? @relation(fields: [authorId], references: [id]) } view UserPostStats { userEmail String @unique totalPosts BigInt? publishedPosts BigInt? unpublishedPosts BigInt? latestPostDate DateTime? @db.Timestamp(6) user User? }Expand to view the SQL code for this view
CREATE OR REPLACE VIEW "UserPostStats" AS SELECT u.email AS "userEmail", u.name AS "userName", COUNT(p.id) AS "totalPosts", COUNT(CASE WHEN p.published = true THEN 1 END) AS "publishedPosts", COUNT(CASE WHEN p.published = false THEN 1 END) AS "unpublishedPosts", MAX(p."createdAt") AS "latestPostDate" FROM "User" u LEFT JOIN "Post" p ON u.id = p."authorId" GROUP BY u.id, u.email, u.name;You can now query this view and its relationship using
include:const userPostStats = await prisma.userPostStats.findMany({ include: { user: true, } })📚 Learn more in the docs.
Various fixes & stability improvements
Fixed several issues related to new
prisma-clientgenerator and thequeryCompilerPreview feature (aka “Prisma Client without Rust engines”). Both will become the default in the upcoming Prisma 7 release and we're working hard on bringing these features into General Availability. You can try them out with your favorite stack with our ready-to-run examples.Fixed several regressions, e.g. related to Prisma Config
Removed middleware from Prisma Client (i.e. the
prisma.$usemethod), which was deprecated since v4.16.0. Use Prisma Client extensions instead.- deprecated
Deprecated
metricsPreview feature (which will be removed in Prisma 7)
Improved type performance
In this release, we also addressed some type performance issues that led to slower editors and lagging auto-complete. If you're curious about the details, you can check the description and changes in this PR.
Other news
Increased robustness of Management API (Early Access)
We recently released an API for programmatically managing Prisma Postgres instances that's perfect for CI/CD workflows and scripting.
In this release, we made it more robust and are bringing it closer to its General Availability release.
Revoke OAuth tokens in Prisma Console
If you use OAuth to authorize third-party applications to act on your behalf in the Prisma Console, you can now revoke any app's access at any time. The Prisma Console shows a list of your authorized (connected) apps, and you can easily remove one to immediately block further access.
ICYMI
Last release was huge, so just in case you missed it, here's the TLDR of what we put out last time:
Prisma ORM
Prisma Config file (
prisma.config.ts) is Generally Available – Native way to configure schema paths, migrations, seeds, and more; no need forearlyAccessflag anymore.Multi-schema support is Generally Available – Allows assigning models to different database schemas in Postgres and SQL Server using
@@schema.Improved SQL views support (still in Preview) – Adds guardrails for views by disabling unsupported features.
Externally managed tables – Lets you exclude specific tables from Prisma Migrate while still querying them via Prisma Client.
Prisma Postgres
Extension support for Prisma Postgres – Prisma Postgres now supports
pgvector,pg_search,pg_stat_statements,citext,pg_trgm,fuzzystrmatch, andunaccent. If you don't see the extension you need, you can request it here. Extensions only work on new instances, if you want to use any of them on your existing instance, reach out to us.Management API for Prisma Postgres – REST API to provision, delete, and manage Prisma Postgres instances programmatically, perfect for CI/CD and scripting workflows.
GitHub Actions for Prisma Postgres – Actions for creating and deleting databases in CI/CD workflows, available on GitHub Marketplace.
New CLI:
npx create-db– Instantly spin up a new Postgres database—no authentication required.
6.13.0
29 Jul 2025The locations for various Prisma-related assets, such as your:
A
seedcommand to populate your database based on some executable scriptExternally managed tables (see below)
Today, we are excited to share the
6.13.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
In this ORM release, we’re moving the Prisma Config file and the multi-schema feature into General Availability. This means these features now are fully production-ready and we’re looking forward to seeing what you are going to build with them!
Additionally, support for SQL views is getting an important update to further stabilize its API.
Configuring Prisma via Prisma Config is now Generally Available
The
prisma.config.tsfile is Prisma ORM’s native way to provide configuration options for your project. It currently lets you specify:The locations for various Prisma-related assets, such as your:
Prisma schema file
migrations
SQL view definitions
TypedSQL queries
A
seedcommand to populate your database based on some executable scriptExternally managed tables (see below)
The driver adapters to be used by the Prisma CLI when interacting with your database
Here’s an example Prisma Config file that specified custom locations for various project assets in and a seed script inside a
dbdirectory:import path from "node:path"; import { defineConfig } from "prisma/config"; export default defineConfig({ schema: path.join("db", "schema.prisma"), migrations: { path: path.join("db", "migrations"), seed: "tsx db/seed.ts" } });Note that you’ll also see warning now if you defined a
prisma.seedcommand inpackage.json.We’re excited to move the
prisma.config.tsfile into General Availability. If you used it before in your projects, you can now dropearlyAccessfrom its options:import { defineConfig } from "prisma/config"; export default defineConfig({ - earlyAccess: true, });There still are and will be fields on the Prisma Config object that are Early Access or Preview features. To opt-into these, you’ll need to explicitly declare them via a new
experimentalfield.For example, usage of
adaptersis currently still in Preview:import { defineConfig } from "prisma/config"; export default defineConfig({ experimental: { adapter: true, }, // requires `experimental.adapter` adapter: async () => { // ... }, });Finally, the Prisma Config file now also supports various file extensions so it fits neatly into your individual project setups:
.js,.ts,.mjs,.cjs,.mts,.cts. It also can be defined as.config/prisma.${extension}, whereextensionis the same one as file extensions above.📚 Learn more in the docs.
Using multiple schemas in now Generally Available
Databases like PostgreSQL or SQL Server provide a way to logically organize your tables in dedicated namespaces called schemas. In Prisma ORM, you can assign tables to various schemas via the
@@schemaattribute:datasource db { provider = "postgresql" url = env("DATABASE_URL") schemas = ["base", "shop"] } model User { id Int @id orders Order[] @@schema("base") } model Order { id Int @id user User @relation(fields: [userId], references: [id]) userId Int @@schema("shop") }This feature has moved into General Availability, so if you were using it before, you can now drop the
multiSchemafeature flag from thegeneratorblock in your Prisma schema:generator client { // ... - previewFeatures = ["multiSchema"] }📚 Learn more in the docs.
More robust support for SQL views (Preview)
SQL views are virtual tables created by a query. Unlike regular tables, views do not store data themselves; instead, they represent the result of a stored SQL query that runs whenever the view is accessed.
We continue to improve support for SQL views, making them more reliable and better aligned with Prisma’s features. In this release, we ensured that
@id,@indexand@uniquecan’t be used on aviewblock in the Prisma schema. Without these attributes, several other features in Prisma Client or the Prisma schema don’t make sense any more either, so we made sure that they can’t be used with views:Disabled
findUniquequeries and cursor-based pagination in Prisma ClientDisallowed writes and implicit ordering for views in Prisma Client
Disallowed relationships involving views in Prisma Schema
This will align the API surface of Prisma ORM with the actual capabilities of SQL views and adds guardrails so you can use views with more confidence!
📚 Learn more in the docs.
Externally managed tables
In some situations, you may not want Prisma ORM to be “responsible” for specific tables in your database because they’re being managed by a different team in your organization or an external service.
In these cases, you still may want to quert these tables using Prisma Client but never want Prisma Migrate to make any changes to them.
In this release, we’re introducing externally managed tables that will be:
Ignored by Prisma Migrate
Queryable via Prisma Client
You can specify which tables should be ignored by Prisma Migrate using the
tablesoption inprisma.config.ts:// prisma.config.ts export default defineConfig({ tables: { external: [ "users", ] }, ... })A typical use case for this is the
userstable from Supabase which you never want be changed by Prisma Migrate but still may want to query with Prisma Client.📚 Learn more in the docs.
Other news
pgvectorextension support for Prisma Postgres (Early Access)In this release, we’ve implemented a highly popular feature request for Prisma Postgres: Early Access support for the
pgvectorPostgreSQL extension along with several other popular Postgres extensions!It enables efficient storage and querying of high-dimensional vector embeddings directly in a Postgres database and thus is perfect for building AI-driven applications.
pgvectoressentially allows developers to perform similarity search (e.g., for recommendation systems or semantic search) using standard SQL, eliminating the need for a separate vector database.Native support for
pgvectorin Prisma ORM is going to follow soon, until then you can usepgvectorvia custom migrations and TypedSQL.Note: For now,
pgvectoris only available on newly created Prisma Postgres instances. It will be rolled out for existing instances soon.In addition to
pgvector, Prisma Postgres now includes Early Access support forpg_search,pg_stat_statements,citext,pg_trgm,fuzzystrmatch, andunaccent. If you don’t see the extension you need, you can request it here.📚 Learn more in the docs.
Manage Prisma Postgres programmatically via an API
Whether you need a way to quickly provision a Prisma Postgres instance in your CI/CD workflows, want to attach a fresh database to a preview branch of your app or even want to offer Prisma Postgres to your own users—our new Management API has you covered!
It’s shaped as a familiar REST API so you can programmatically take care of your database workflows: Provision or delete Prisma Postgres instances, retrieve or create connection strings and manage entire projects in Prisma Console.
📚 Learn more in the docs.
CI/CD GitHub Actions for Prisma Postgres available on GitHub Marketplace
Based on the Management API, we’ve also published two templates for GitHub Actions that you can use in your own CI/CD setups:
These Actions serve as the foundational building blocks for integrating Prisma Postgres into CI/CD pipelines.
Prisma Postgres GH Actions
They enable workflows like provisioning databases on every pull request, running integration tests against real instances, and managing database lifecycles end-to-end. We’ve included several examples in the README to help users get started quickly. The setup is straightforward, and these Actions are designed to plug into user's workflows with minimal effort.
Instant Postgres with
npx create-db— no auth requiredWe launched a new CLI command that allows you to spin up a new database within seconds:
npx create-db # no auth required
The command doesn’t require authentication, so you can play around with your database without any initial hurdles!
create-db
Your instance will be automatically deleted after 24 hours but you can claim it and put it into your Prisma Console account if you want to keep using it after that period. Visit the docs to learn more.
New navigation UI for Prisma Console
The Prisma Console got a little makeover, including a new design for navigating and managing your projects and their databases. This makes common workflows like creating new projects, navigating between projects and databases, as well as accessing project settings a lot more smooth.
New Console UI
We’re eager to hear your feedback, let us know on X what you think of the new UI.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance. With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise.
6.12.0
15 Jul 2025Today, we are excited to share the
6.12.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ESM-compatible
prisma-clientgenerator now in PreviewWe’re excited to share that our new and more flexible
prisma-clientgenerator is moving into Preview! As a reminder, here’s what it looks like:generator client { // Required provider = "prisma-client" // no `-js` at the end! output = "../src/generated/prisma" // Optional runtime = "nodejs" moduleFormat = "esm" generatedFileExtension = "ts" importFileExtension = "ts" }This new generator eliminates any headaches that you may have experienced due to magical code generation into
node_modulesand gives you full control over the generated Prisma Client code. With it moving into Preview, we hope that even more of you will try it out and share your feedback with us!Note: The
prisma-clientgenerator will become the default in Prisma v7, replacing the currentprisma-client-jsgenerator.In addition to moving it into Preview, we also created a couple of new ready-to-run examples to help you get started with the new generator and your favorite framework:
📚 Learn more in the docs.
Specify
viewsandmigrationsfolder locations inprisma.config.ts(Early Access)As we’re getting closer to the General Availability release of
prisma.config.ts, we’re adding more capabilities to it. In previous versions, the Prisma CLI implicitly used to infer the location for migration and SQL view definition files based on the location of the Prisma schema. In this release, we’re adding two new fields (migrationsandviews) to give you more flexibility and clarity on how to locate these files:// prisma.config.ts export default defineConfig({ earlyAccess: true, migrations: { path: './db/migrations' }, views: { path: './db/views' } // ... })📚 Learn more in the docs.
Enterprise support
Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance. With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: prisma.io/enterprise
6.11.1
3 Jul 2025In Prisma ORM version 6.11.0, we shipped a bug fix for Prisma that allows using Prisma Postgres with direct TCP connections with Prisma Driver Adapters. This fix required refactoring the Prisma Client initialization logic, and while several test cases were added, an edge case was missing, causing #27569.
Namely, using@prisma/clientwith@prisma/extension-accelerateon aprisma+postgres://...connection string, while generating the Prisma Client definitions viaprisma generate, resulted in aPrismaClientInitializationError.This is now fixed, so we highly recommend upgrading to version 6.11.1.
Reminder: when using Prisma Accelerate, we highly encourage you to generate your Prisma Client definitions via
prisma generate --no-engine.We've fixed an issue that would occur when using arrays as aggregation fields with the query compiler. These queries would fail with a confusing data mapping error. They should now work as expected.
Today, we are issuing a 6.11.1 patch release.
Bug fixes
In Prisma ORM version 6.11.0, we shipped a bug fix for Prisma that allows using Prisma Postgres with direct TCP connections with Prisma Driver Adapters. This fix required refactoring the Prisma Client initialization logic, and while several test cases were added, an edge case was missing, causing #27569.
Namely, using@prisma/clientwith@prisma/extension-accelerateon aprisma+postgres://...connection string, while generating the Prisma Client definitions viaprisma generate, resulted in aPrismaClientInitializationError.This is now fixed, so we highly recommend upgrading to version 6.11.1.
Reminder: when using Prisma Accelerate, we highly encourage you to generate your Prisma Client definitions via
prisma generate --no-engine.We've fixed an issue that would occur when using arrays as aggregation fields with the query compiler. These queries would fail with a confusing data mapping error. They should now work as expected.
6.11.0
1 Jul 2025prisma dev stop <globs>: Stops one or more local Prisma Postgres instancesprisma dev rm <globs>: Removes one or more local Prisma Postgres instances from your file system
Today, we are excited to share the
6.11.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
Prisma ORM without Rust engines for MySQL/MariaDB, Neon & CockroachDB (Preview)
We are in the process of removing the Rust engines from Prisma ORM. This week, we're adding Preview support for the Rust-free Prisma ORM version for MySQL via a new
@prisma/adapter-mariadbdriver adapter, as well as for Neon and CockroachDB via the already existing@prisma/adapter-neonand@prisma/adapter-pgadapters.Note: The
mariadbdriver is compatible with all MySQL databases. It's the recommended option to use MySQL with Prisma ORM when using driver adapters.To use it, enable the
queryCompileranddriverAdaptersfeature flags on yourgeneratorblock, install the driver adapter for your database and start querying!generator client { provider = "prisma-client-js" // or `prisma-client` output = "../generated/prisma" previewFeatures = ["queryCompiler", "driverAdapters"] }📚Learn more in the docs.
Stop and remove local Prisma Postgres instances via CLI
You can start a local Prisma Postgres instance using the
prisma dev --name mydbcommand or via the Prisma VS Code extension UI.If you start a local instance via the Prisma CLI, you can simply kill the process to stop the instance. However, when you start instances via the VS Code extension UI, you could also only stop them via the UI—not via the CLI.
This changes in this release: You can now also stop local Prisma Postgres instances and remove them from your file system via the Prisma CLI:
prisma dev stop <globs>: Stops one or more local Prisma Postgres instancesprisma dev rm <globs>: Removes one or more local Prisma Postgres instances from your file system
📚Learn more in the docs.
Ready-to-run examples for new
prisma-clientgeneratorOur new
prisma-clientgenerator is more flexible, provides more control about the generated code, works with various JS runtimes and comes with ESM support out-of-the-box.To make it easier for you to try it out, we created a few ready-to-run example projects so you can see the new generator in action:
Bug fixes in VS Code embedded Prisma Studio
Have you already seen the new look of Prisma Studio when it's embedded directly in VS Code via the Prisma VS Code extension? In this release, we fixed a few bugs that you all have reported:
Fixed an issue with writing and deleting from tables with UUIDs
Fixed an issue with saving data in fullscreen mode
Fixed an issue with updating the schema when the refresh button is clicked
Let us know in case you hit any snags with Prisma ORM by opening a new issue.
Other news
Embed Prisma Studio in your own tools and projects
If you're using Prisma Postgres (yourself or by offering it to your own users), you can now embed Prisma Studio to offer an amazing data editing experience to your users via the
@prisma/studio-corenpm package.!(cdn.sanity.io/images/p2zxqf70/production/d2c35b…)
Try out the demo that shows how to integrate Prisma Studio in your own apps!
Predict your Prisma Postgres bill with our new Pricing Calculator
Prisma Postgres comes with a pricing model that seems too simple to be true: You're charged based on storage and operations—not CPU, compute hours or any other resource-based metrics.
While it's simple, it may feel unfamiliar because it's so different from existing pricing models. To understand how much you'd pay for Prisma Postgres running your app, you can now use our Pricing Calculator. Put in the predicted storage and number of operations to see how much you're going to be charged on each plan.
!(cdn.sanity.io/images/p2zxqf70/production/a6a82e…)
Prisma Postgres now available for all Postgres templates in Vercel Marketplace
On vercel.com/templates, you can find lots of one-click-deploy application templates! We recently worked with the Vercel team to get Prisma Postgres working with all templates requiring a PostgreSQL database, for example:
… and a lot more
Connecting to Prisma Postgres with any tool is now faster
We recently enabled the option to connect to Prisma Postgres with any tool via direct TCP connections. In this release, we have reduced the connection latency so your first request is now faster.
New region for Prisma Postgres: Frankfurt (
eu-central-1)We keep expanding Prisma Postgres availability across the globe! After having added San Francisco just a few weeks ago, we're now adding Frankfurt based on another poll we ran on X. Here are all the regions where you can spin up Prisma Postgres instances today:
**
eu-central-1: Frankfurt (new!)**eu-west-3: Parisus-west-1: San Franciscous-east-1: North Virginiaap-northeast-1: Tokyoap-southeast-1: Singapore
Keep an eye on our X account to take part in the poll and vote for the next availability zone of Prisma Postgres!
6.10.1
18 Jun 2025Today, we are issuing a 6.10.1 patch release.
Today, we are issuing a 6.10.1 patch release.
Bug fixes
In Prisma ORM version 6.10.0, we shipped a bug fix for Prisma Migrate that ensured we always gracefully closed PostgreSQL connections by sending the Terminate message and not just abruptly closing the TCP connection. This fix was incomplete because it didn't work on Windows, which is now fixed. We highly recommend upgrading to version 6.10.1 if you are using Windows.
We also recommend upgrading to this version if you are currently using local Prisma Postgres via the
prisma devcommand with an ORM version older than 6.10.x.Performance improvements
The
queryCompilerpreview feature recently introduced a performance regression related to in-memory joins in TypeScript-based query execution (users who use thequeryCompilerand therelationJoinspreview features together were not affected, unless usingrelationLoadStrategy: "query"). This has now been fixed, leading to significant performance improvements: in our Query Compiler benchmarks, we are seeing up to 500x performance improvement compared to the previous implementation in the TypeScript-based query executor, or up to 10–20x performance improvement compared to the Rust-based Query Engine.query_type_movies findMany_include:__cast:_true__take:_2000__m2m
Other news
Please see the release notes for Prisma ORM 6.10.0 for other recent news and announcements.
6.10.0
17 Jun 2025We deprecated the
pg-workerpackage. It's not needed any more, you can simply usepgwhen using Prisma ORM in Cloudflare Workers.Entrypoint for new
prisma-clientgenerator changed. Learn how this affects imports in the docs.Managing databases and connection strings
Today, we are excited to share the
6.10.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
No Rust engines for MS SQL Server & PlanetScale (Preview)
We are in the process of removing the Rust engines from Prisma ORM. If you want to try this, you can configure your
generatorlike this:generator client { provider = "prisma-client-js" // or `prisma-client` output = "../generated/prisma" previewFeatures = ["queryCompiler", "driverAdapters"] }In this release, we are excited to move the
queryCompiler(which enables using Prisma ORM without Rust engines) into Preview for MS SQL Server and PlanetScale (via the new@prisma/adapter-mssqland existing@prisma/adapter-planetscaledriver adapters).📚Learn more in the docs.
Manage local Prisma Postgres instances in VS Code
We recently released a database management UI as part of the Prisma VS Code extension to enable visual database management workflows for Prisma Postgres. In this release, we added new functionality to it: You can now manage multiple local Prisma Postgres instances via the same UI. To try it, find the Prisma logo in VS Code’s sidebar and start managing your local Prisma Postgres instances (no Docker required).
📚 Learn more in the docs.
Performance improvements for
prisma migrate devWe improved the
prisma migrate devcommand by optimizing the interactions with the shadow database. Our measurements show a 2x improvement in speed for some databases!"Push to Cloud": Easily deploy a local Prisma Postgres instance in VS Code
Local Prisma Postgres instances are perfect for development, but how do you go from local to remote once you’re ready to deploy?
The database management UI in VS Code now has a Push to Cloud button that makes it easy to deploy your local Prisma Postgres so that you can connect to it from your deployed applications.
📚 Learn more in the docs.
Support for shard keys on PlanetScale (Preview)
Sharding is a popular technique to scale up when database load grows. As of this release, Prisma ORM supports sharding on PlanetScale natively via the new
@shardKeyand@@shardKeyattributes in the Prisma schema which you can apply to the fields in your models that should serve as shard keys in your database setup:// Single-column shard key model User { id String @default(uuid()) region String @shardKey } // Multi-column shard key model User { id String @default(uuid()) country String customerId String @@shardKey([country, customerId]) }Note that this requires you to set the
shardKeysPreview feature flag on your generator definition:generator client { provider = "prisma-client-js" // or `prisma-client` output = "../generated/prisma" previewFeatures = ["shardKeys"] }📚 Learn more in the docs.
Other changes
We deprecated the
pg-workerpackage. It's not needed any more, you can simply usepgwhen using Prisma ORM in Cloudflare Workers.Entrypoint for new
prisma-clientgenerator changed. Learn how this affects imports in the docs.
More news
Local Prisma Postgres now works with any ORM & tool (Early Access)
We recently released direct connections for remote Prisma Postgres so that you can now use it with your favorite ORM or database tool. As of this release, this is also possible for your local Prisma Postgres instances. To try it, run the
prisma devcommand and use the direct connection string starting withpostgres://in order to connect from any tool.📚 Learn more in the docs.
Let your favorite AI tool manage Prisma Postgres via remote MCP
We just released a new remote MCP server that helps you manage Prisma Postgres instances! It enables your AI tools to help with these workflows:
Managing databases and connection strings
Creating and re-instantiating backups
Querying databases via plain SQL
Introspecting database schemas
You can start it using the
npx -y mcp-remote https://mcp.prisma.io/mcpcommand.📚 Learn more in the docs.
6.9.0
3 Jun 2025Persists your databases across
prisma devinvocations.Enables you to have multiple local Prisma Postgres instances running at the same time.
Running
prisma initnow uses local Prisma Postgres by default.
Today, we are excited to share the
6.9.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Prisma ORM without Rust engines for PostgreSQL & SQLite (Preview)
If you've been excited about our work of removing the Rust engines from Prisma ORM but hesitated trying it out because it was in an Early Access (EA) phase, now is a great time for you to get your hands on the Rust-free Prisma ORM version.
This major architectural change has moved from EA into Preview in this release, meaning there are no more know major issues. If you want to try it out, add the
queryCompileranddriverAdapterspreview feature flags to yourgenerator, install the driver adapter for your database, and get going:generator client { provider = "prisma-client-js" previewFeatures = ["queryCompiler", "driverAdapters"] output = "../generated/prisma" }Now run
prisma generateto re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install, e.g. the one for PostgreSQL:npm install @prisma/adapter-pg
Once installed, you can instantiate
PrismaClientas follows:import { PrismaClient } from './generated/prisma' import { PrismaPg } from '@prisma/adapter-pg' const adapter = new PrismaPg({ connectionString: env.DATABASE_URL }) const prisma = new PrismaClient({ adapter })No more hassle with query engines, binary targets and an even smoother experience in serverless and edge environments!
📚 Learn more in the docs.
Major improvements for local Prisma Postgres (Preview)
In the last release, we enabled you to spin up a Prisma Postgres instance locally via the new
prisma devcommand. Local Prisma Postgres uses PGlite under the hood and gives you an identical experience as you get with a remote Prisma Postgres instance.This release brings major improvements to this feature:
Persists your databases across
prisma devinvocations.Enables you to have multiple local Prisma Postgres instances running at the same time.
Running
prisma initnow uses local Prisma Postgres by default.
Try it out and let us know what you think!
📚 Learn more in the docs.
More news
Connect to Prisma Postgres with any ORM (Preview)
Since its GA release, you could only interact with Prisma Postgres using Prisma ORM via a custom connection string.
This has changed now: When setting up a new Prisma Postgres instance, you receive a regular PostgreSQL direct TCP connection string (starting with
postgres://...) that lets you connect to it using your favorite tool or database library, including Drizzle, Kysely, TypeORM, and others.If you want to access Prisma Postgres from a serverless environment, you can also use our new serverless driver (Early Access).
📚 Learn more in the docs.
Automated backup & restore
Prisma Postgres' backup and restore mechanism has seen a major upgrade recently: You can now easily restore any previous backup via the UI in the Prisma Console. Find the new Backups tab when viewing your database and select any backup from the list to restore its state to a previous point in time.
📚 Learn more in the docs.
Prisma's VS Code extension now has a UI to manage Prisma Postgres
If you're using Prisma ORM, chances are that you're using our VS Code extension too. In its latest release, we've added a major new capability to it: A UI for managing databases.
With this new UI, you can:
Authenticate with the Prisma Console
Create and delete remote Prisma Postgres instances
View local Prisma Postgres instances
View and edit data via an embedded Prisma Studio
Visualize your database schema
DB management in VS Code
To use the new features, make sure to have the latest version of the Prisma VS Code extension installed and look out for the new Prisma logo in VS Code's Activity Bar.
📚 Learn more in the docs.
New region for Prisma Postgres: San Francisco (
us-west-1)We keep expanding Prisma Postgres availability across the globe! After having added Singapore just a few weeks ago, we're now adding San Francisco based on another poll we ran on X. Here are all the regions where you can spin up Prisma Postgres instances today:
us-west-1: San Francisco (new!)us-east-1: North Virginiaeu-west-3: Parisap-northeast-1: Tokyoap-southeast-1: Singapore
Keep an eye on our X account to take part in the poll and vote for the next availability zone of Prisma Postgres!
6.8.2
16 May 2025Today, we are issuing the 6.8.2 patch release. It fully resolves an issue with the
prisma initandprisma devcommands for some Windows users who were still facing problems after the previous incomplete fix in version 6.8.1.Today, we are issuing the 6.8.2 patch release. It fully resolves an issue with the
prisma initandprisma devcommands for some Windows users who were still facing problems after the previous incomplete fix in version 6.8.1.Fixes:
6.8.1
15 May 2025Today, we are issuing the 6.8.1 patch release. It fixes an issue with the
prisma initandprisma devcommands on Windows.Today, we are issuing the 6.8.1 patch release. It fixes an issue with the
prisma initandprisma devcommands on Windows.Fixes
6.8.0
15 May 2025Checking the status of your migrations (e.g. telling you if migrations haven't been applied)
Creating and running schema migrations for you
Authenticating you with the Prisma Console
Today, we are excited to share the
6.8.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Local development with Prisma Postgres via
prisma dev(Early Access)In this release, we're releasing a way to develop against Prisma Postgres locally — no Docker required!
To get started, run the new
prisma devcommand:npx prisma dev # starts a local Prisma Postgres server
This command spins up a local Prisma Postgres instance and prints the connection URL that you'll need to set as the
urlof yourdatasourceblock to point to a local Prisma Postgres instance. It looks similar to this:datasource db { provider = "postgresql" url = "prisma+postgres://localhost:51213/?api_key=ey..." }You can then run migrations and execute queries against this local Prisma Postgres instance as with any remote one. Note that you need to keep the
prisma devprocess running in order to interact with the local Prisma Postgres instance.📚 Learn more in the docs.
Native Deno support in
prisma-clientgenerator (Preview)In this release, we're removing the
denoPreview feature from theprisma-client-jsgenerator. If you want to use Prisma ORM with Deno, you can now do so with the newprisma-clientgenerator:generator client { provider = "prisma-client" output = "../src/generated/prisma" runtime = "deno" }📚 Learn more in the docs.
VS Code Agent Mode: AI support with your database workflows
Have you tried agent mode in VS Code already?
"The agent acts as an autonomous pair programmer that performs multi-step coding tasks at your command, such as analyzing your codebase, proposing file edits, and running terminal commands."
As of this release, your agent is capable of supporting you with your database workflows more than ever! If you're using VS Code and have the Prisma VS Code extension installed, your agent now is able to help you with your database workflows, such as:
Checking the status of your migrations (e.g. telling you if migrations haven't been applied)
Creating and running schema migrations for you
Authenticating you with the Prisma Console
Provisioning new Prisma Postgres instances so you can start coding right away
All you need to do is make sure you're using the latest version of Prisma's VS Code extension and your agent is ready to go 🚀
📚 Learn more in the docs.
Other news
You voted, we acted: New Singapore region for Prisma Postgres
We recently ran a poll where we asked you which region you'd like to see next for Prisma Postgres. The majority vote went to Asia Pacific (Singapore), so as of today, you're able to spin up new Prisma Postgres instances in the
ap-southeast-1region.We're not stopping here — keep an eye out on X for another poll asking for your favorite regions that we should add!
6.7.0
29 Apr 2025Today, we are excited to share the
6.7.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Prisma ORM without Rust engines (Early Access)
If you're a regular visitor of our company blog, you may already know that we're currently working on moving the core of Prisma from Rust to TypeScript. We have written extensively about why we're moving away from Rust and already shared the first measurements of performance boosts we saw from the re-write.
This re-write is not just a move from one programming language to another. It fundamentally improves the architecture of Prisma ORM and replaces the Query Engine (which is written in Rust and deployed as a standalone binary) with a much leaner and more efficient approach that we call Query Compiler.
In this release, we're excited to give you Early Access to the new Query Compiler for PostgreSQL and SQLite database 🥳 Support for more database will follow very soon!
To use the new "Rust-free" version of Prisma ORM, add the
queryCompiler(new) anddriverAdaptersfeature flags to your client generator:generator client { provider = "prisma-client-js" previewFeatures = ["queryCompiler", "driverAdapters"] output = "../generated/prisma" }Now run
prisma generateto re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install one. For example, the one for PostgreSQL:npm install @prisma/adapter-pg
Once installed, you can instantiate
PrismaClientas follows:import { PrismaPg } from '@prisma/adapter-pg' import { PrismaClient } from './generated/prisma' const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL }) const prisma = new PrismaClient({ adapter })This version of
PrismaClientdoesn't have a Query Engine binary and you can use it in the exact same way as before.📚 Learn more in the docs.
Support for
better-sqlite3JavaScript driver (Preview)Driver adapters are Prisma ORM's way of letting you use JS-native drivers (like
pg) to interact with your database. In this release, we're introducing a new driver adapter for using thebetter-sqlite3package, so you can now interact with SQLite database in a JS-native way.To use it, first enable the
driverAdaptersPreview feature flag in on your clientgenerator, then install these libraries:npm install @prisma/adapter-better-sqlite3
Now you can instantiate Prisma Client as follows:
import { PrismaBetterSQLite3 } from '@prisma/adapter-better-sqlite3'; import { PrismaClient } from './generated/prisma'; const adapter = new PrismaBetterSQLite3({ url: "file:./prisma/dev.db" }); const prisma = new PrismaClient({ adapter });📚 Learn more in the docs.
Multi-file Prisma schemas are now production-ready
The
prismaSchemaFolderPreview feature is moving into General Availability 🎉 With that change, Prisma ORM now by default supports splitting your Prisma schema file and e.g. lets you organize your schema as follows:prisma/schema.prisma→ defines data source and generatordatasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" }prisma/models/posts.prisma→ definesPostmodelmodel Post { id Int @id @default(autoincrement()) title String content String? published Boolean @default(false) author User? @relation(fields: [authorId], references: [id]) authorId Int? }prisma/models/users.prisma→ definesUsermodelmodel User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] }⚠️ Note that there have been breaking changes to the
prismaSchemaFolderPreview feature in the last 6.6.0 release. If you've been using this feature to split your Prisma schema, make sure to read the release notes and update your project accordingly.📚 Learn more in the docs.
Splitting generated output with new
prisma-clientgenerator (Preview)With the
prisma-client-jsgenerator, the generated Prisma Client library is put into a singleindex.d.tsfile. This sometimes led to issues with large schemas where the size of the generated output could slow down code editors and breaking auto-complete.As of this release, our new
prisma-clientgenerator (that was released in 6.6.0) now splits the generated Prisma Client library into multiple files and thus avoids the problems of a single, large output file.Also: As a bonus, we now ensure that generated files do not raise any ESLint and TypeScript errors!
Before
generated/ └── prisma ├── client.ts ├── index.ts # -> this is split into multiple files in 6.7.0 └── libquery_engine-darwin.dylib.nodeAfter
generated/ └── prisma ├── client.ts ├── commonInputTypes.ts ├── enums.ts ├── index.ts ├── internal │ ├── class.ts │ └── prismaNamespace.ts ├── libquery_engine-darwin.dylib.node ├── models │ ├── Post.ts │ └── User.ts └── models.ts📚 Learn more in the docs.
Company news
Our team has been busy shipping more than just the ORM! Check out these articles to learn what else we've been up to recently:
6.6.0
8 Apr 2025- breaking
Pass the the
--schemaoption to your Prisma CLI command (e.g.prisma migrate dev --schema ./prisma/schema) - breaking
Set the
prisma.schemafield inpackage.json:// package.json { "prisma": { "schema": "./schema" } } - breaking
Set the
schemaproperty inprisma.config.ts:import path from 'node:path' import type { PrismaConfig } from 'prisma' export default { earlyAccess: true, schema: path.join('prisma', 'schema'), } satisfies PrismaConfig<Env>
Today, we are excited to share the
6.6.0stable release 🎉 This version comes packed with exciting features, we can't wait to see what you're going to build with it! Read our announcement blog post for more details: Prisma ORM 6.6.0: ESM Support, D1 Migrations & MCP Server🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release. 🌟
Highlights
ESM support with more flexible
prisma-clientgenerator (Early Access)We are excited to introduce a new
prisma-clientgenerator that's more flexible, comes with ESM support and removes any magic behaviours that may cause friction with the currentprisma-client-jsgenerator.Note: The
prisma-clientgenerator is currently in Early Access and will likely have some breaking changes in the next releases.Here are the main differences:
Requires an
outputpath; no “magic” generation intonode_modulesany moreSupports ESM and CommonJS via the
moduleFormatfieldOutputs plain TypeScript that's bundled just like the rest of your application code
Here's how you can use the new
prisma-clientgenerator in your Prisma schema:// prisma/schema.prisma generator client { provider = "prisma-client" // no `-js` at the end output = "../src/generated/prisma" // `output` is required moduleFormat = "esm" // or `"cjs"` for CommonJS }In your application, you can then import the
PrismaClientconstructor (and anything else) from the generated folder:// src/index.ts import { PrismaClient } from './generated/prisma/client'⚠️ Important: We recommend that you add the
outputpath to.gitignoreso that the query engine that's part of the generated Prisma Client is kept out of version control:# .gitignore ./src/generated/prisma
📚 Learn more in the docs.
Cloudflare D1 & Turso/LibSQL migrations (Early Access)
Cloudflare D1 and Turso are popular database providers that are both based on SQLite. While you can query them using the respective driver adapter for D1 or Turso, previous versions of Prisma ORM weren't able to make schema changes against these databases.
With today's release, we're sharing the first Early Access version of native D1 migration support for the following commands:
prisma db push: Updates the schema of the remote database based on your Prisma schemaprisma db pull: Introspects the schema of the remote database and updates your local Prisma schemaprisma migrate diff: Outputs the difference between the schema of the remote database and your local Prisma schema
Note: Support for
prisma migrate devandprisma migrate deploywill come very soon!To use these commands, you need to connect the Prisma CLI to your D1 or Turso instance by using the driver adapter in your
prisma.config.tsfile. Here is an example for D1:import path from 'node:path' import type { PrismaConfig } from 'prisma' import { PrismaD1HTTP } from '@prisma/adapter-d1' // import your .env file import 'dotenv/config' type Env = { CLOUDFLARE_D1_TOKEN: string CLOUDFLARE_ACCOUNT_ID: string CLOUDFLARE_DATABASE_ID: string } export default { earlyAccess: true, schema: path.join('prisma', 'schema.prisma'), migrate: { async adapter(env) { return new PrismaD1HTTP({ CLOUDFLARE_D1_TOKEN: env.CLOUDFLARE_D1_TOKEN, CLOUDFLARE_ACCOUNT_ID: env.CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_DATABASE_ID: env.CLOUDFLARE_DATABASE_ID, }) }, }, } satisfies PrismaConfig<Env>With that setup, you can now execute schema changes against your D1 instance by running:
npx prisma db push
📚 Learn more in the docs:
MCP server to manage Prisma Postgres via LLMs (Preview)
Prisma Postgres is the first serverless database without cold starts. Designed for optimal efficiency and high performance, it's the perfect database to be used alongside AI tools like Cursor, Windsurf, Lovable or co.dev. In this ORM release, we're adding a command to start a Prisma MCP server that you can integrate in your AI development environment. Thanks to that MCP server, you can now:
Tell your AI agent to create new DB instances
Design your data model
Chat through a database migration
… and much more.
To get started, add this snippet to the MCP configuration of your favorite AI tool and get started:
{ "mcpServers": { "Prisma": { "command": "npx", "args": ["-y", "prisma", "mcp"] } } }📚 Learn more in the docs.
New
--promptoption onprisma initYou can now pass a
--promptoption to theprisma initcommand to have it scaffold a Prisma schema for you and deploy it to a fresh Prisma Postgres instance:npx prisma init --prompt "Simple habit tracker application"
For everyone, following social media trends, we also created an alias called
--vibefor you 😉npx prisma init --vibe "Cat meme generator"
Improved API for using driver adapters
In this release, we are introducing a nice DX improvement for driver adapters. Driver adapters let you access your database using JS-native drivers with Prisma ORM.
Before 6.6.0
Earlier versions of Prisma ORM required you to first instantiate the driver itself, and then use that instance to create the Prisma driver adapter. Here is an example using the
@libsql/clientdriver for LibSQL:import { createClient } from '@libsql/client' import { PrismaLibSQL } from '@prisma/adapter-libsql' import { PrismaClient } from '@prisma/client' // Old way of using driver adapters (before 6.6.0) const driver = createClient({ url: env.LIBSQL_DATABASE_URL, authToken: env.LIBSQL_DATABASE_TOKEN, }) const adapter = new PrismaLibSQL(driver) const prisma = new PrismaClient({ adapter })6.6.0 and later
As of this release, you instantiate the driver adapter directly with the options of your preferred JS-native driver.:
import { PrismaLibSQL } from '@prisma/adapter-libsql' import { PrismaClient } from '../prisma/prisma-client' const adapter = new PrismaLibSQL({ url: env.LIBSQL_DATABASE_URL, authToken: env.LIBSQL_DATABASE_TOKEN, }) const prisma = new PrismaClient({ adapter })Other changes
prismaSchemaFolderbreaking changesIf you are using the
prismaSchemaFolderPreview feature to split your Prisma schema into multiple files, you may encounter some breaking changes in this version.Explicit declaration of schema folder location
You now must always provide the path to the schema folder explicitly. You can do this in either of three ways:
- breaking
Pass the the
--schemaoption to your Prisma CLI command (e.g.prisma migrate dev --schema ./prisma/schema) - breaking
Set the
prisma.schemafield inpackage.json:// package.json { "prisma": { "schema": "./schema" } } - breaking
Set the
schemaproperty inprisma.config.ts:import path from 'node:path' import type { PrismaConfig } from 'prisma' export default { earlyAccess: true, schema: path.join('prisma', 'schema'), } satisfies PrismaConfig<Env>
migrationsfolder must live next to.prismafile withdatasourceblockYour
migrationsdirectory must live next to the.prismafile that defines yourdatasourceblog. If you relied on the implicit schema folder location of./prisma/schemamake sure to move your migrations folder from./prisma/migrationsto./prisma/schema/migrations.Assuming
schema.prismadefines thedatasourcein this example, here's how how need to place themigrationsfolder:# `migrations` and `schema.prisma` are on the same level . ├── migrations ├── models │ ├── posts.prisma │ └── users.prisma └── schema.prisma
See this PR for more details.
No more Bun issues if Node.js is not installed
Bun users reported an issue that
prisma generatewould hang if Node.js installed on their machine. This is now fixed and Bun users can generate Prisma Client without issues.Company news
Enterprise support
Prisma offers an enterprise support plan for Prisma ORM. Get direct help from our team and a joint slack channel! With Prisma ORM 7 on the horizon, this is a great time to upgrade your support today.
We are hiring: Developer Support Engineer
If you care about making developers successful, join us as a Developer Support Engineer.
6.5.0
11 Mar 2025Using the
defineConfighelper exported byprisma/config.Using the
PrismaConfigutility type exported byPrisma.
Today, we are excited to share the
6.5.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
Databases can only be reset manually and explicitly
In previous versions, if Prisma ORM determined that a
migratecommand could not be applied cleanly to the underlying database, you would get a message like this one:? We need to reset the "public" schema at "db.url.com:5432" Do you want to continue? All data will be lost. (y/N)
While "no" was the default, we've determined that having this prompt in the first place was a mistake. In this version we're removing the prompt entirely and instead exiting with an appropriate error message.
To get the previous behavior, you will need to run
prisma migrate resetdirectly.Support for
prisma.config.tsin Prisma StudioWe've expanded support for our
prisma.config.tsfile to include Prisma Studio!To use the new config file, including the ability to connect to driver adapter enabled databases with Prisma Studio, add a
studioblock to yourprisma.config.tsfile:import path from 'node:path' import type { PrismaConfig } from 'prisma' import { PrismaLibSQL } from '@prisma/adapter-libsql' import { createClient } from '@libsql/client' export default { earlyAccess: true, schema: { kind: 'single', filePath: './prisma/schema.prisma', }, studio: { adapter: async (env: unknown) => { const connectionString = `file:./dev.db' const libsql = createClient({ url: connectionString, }) return new PrismaLibSQL(libsql) }, }, } satisfies PrismaConfigNotice how this looks a little different from last release! Instead of an
@prisma/configpackage there’s now two different options:Using the
defineConfighelper exported byprisma/config.Using the
PrismaConfigutility type exported byPrisma.
All the relevant info for the
prisma.config.tsfile, including these new ways of defining your config, can be found in our docs.Allow for chaining
$onand$extends.In previous versions of Prisma ORM, the return type of the
$onclient method wasvoid. This did not allow for chaining$on()and$extends()calls, as$onis not available on extended clients.In this version we've resolved this issue and
$onwill now return the modified Prisma Client.Community fixes
We have a number of community-submitted fixes that improve Prisma ORM:
Allow for binaries to be loaded from local network. Thank you @RaHehl!
Enhance type safety of the AtLeast utility type. Thank you @de-novo!
Resolve a race condition in the NextJS monorepo plugin. Thank you @toniopelo!
allow for filtering out spans with PrismaInstrumentation. Thank you @overbit!
Prisma is hiring
Join us at Prisma and work on our TypeScript ORM (now faster than ever) and our Cloud products like Prisma Postgres (now in GA!)
We currently have two open roles in our Engineering team:
If these don’t fit, you can still check out our jobs page and send a general application.
Enterprise support
Prisma offers an enterprise support plan for Prisma ORM. Get direct help from our team and a joint slack channel! With Prisma ORM 7 on the horizon this is a great time to upgrade your support today.
6.4.1
20 Feb 2025Today, we are issuing the 6.4.1 patch release. It fixes a few issues with the NPS survey and makes it respect the
--no-hintsCLI flag.Today, we are issuing the 6.4.1 patch release. It fixes a few issues with the NPS survey and makes it respect the
--no-hintsCLI flag.Fixes
6.4.0
18 Feb 2025Today, we are excited to share the
6.4.0stable release 🎉Today, we are excited to share the
6.4.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
TypeScript-based configuration with
prisma.config.ts(Early Access)In this release, we're introducing an Early Access version of a TypeScript-based configuration file for Prisma ORM:
prisma.config.ts.This file will serve as a central configuration point for Prisma ORM:
import path from 'node:path' export default { earlyAccess: true, // required while in Early Access schema: { kind: 'single', // use 'multi' if you're using the `prismaSchemaFolder` preview feature filePath: path.join('custom', 'prisma', 'schema.prisma') } })With this file you are able to run any arbitrary code needed to get values required by Prisma ORM, such as database URLs from a secret store or fine-grained control of settings. It needs to live in the current working directory from where you're executing Prisma CLI commands (typically, the root of your project).
Note: If you're using
prisma.config.ts, the Prisma CLI will not load environment variables from.envfiles. If you want to use a.envfile withprisma.config.ts, you'll need to load the environment variables manually using thedotenvpackage (see here).Learn more about the new
prisma.config.tsfile in the docs.Case-insensitive mode in JSON filters
You can now do case-insensitive filtering on JSON data.
Just use the new
modeoption when filtering usingstring_contains,string_starts_withorstring_ends_within a JSON object and set it to"insensitive":await prisma.user.findMany({ where: { pets: { path: ['favorites', 'catBreed'], string_contains: 'Van', mode: "insensitive", }, }, });The above query returns all users where the
favorites.catBreedvalue contains"Van"or"van".Improved CockroachDB migration speed
In this release we found some inefficiencies in our migration engine that was impacting CockroachDB migrations. In 6.4.0, CockroachDB migrations should be significantly faster.
Calling all devs: Give us your feedback!
Prisma ORM's community keeps us going. To make sure that we're focused on what the community needs, we would like to get your feedback via our online feedback form.
6.3.1
4 Feb 2025This patch releases introduces improvements to the
prisma initoutput when invoked to with the--dboption.This patch releases introduces improvements to the
prisma initoutput when invoked to with the--dboption.Run
npx prisma@latest init --dbto get an instant Prisma Postgres database.6.3.0
28 Jan 2025Today, we are excited to share the
6.3.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
A brand new Prisma Studio
In this release we've included several great improvements to Prisma Studio's developer experience. You can learn all about the changes we've made in our release blog post, but here's a short list:
Prisma Studio is back in the Console
Fans of Prisma Data Browser rejoice! The new Prisma Studio is now in the Prisma Console and is available for all PostgreSQL and MySQL databases.
A new model viewer
Previously, switching from model to model in Prisma Studio would require backing all the way out to the model view, then digging in again. With our new UI, it's easy to switch from model to model while keeping your place.
image
A new editing experience
If you're trying to edit a given field in a model, Prisma Studio made it quite easy. However, if you're trying to edit every field in a given row, it could get quite annoying to keep scrolling left to right. Our new edit sidebar resolves that with the ability to edit all fields for a given row at once.
image
Clean up at the click of a button
When editing a number of models, it can get difficult to get back to a clean slate. In the new Prisma Studio, we've added a "Close all" button that puts you back to a fresh start.
image
Add
limittoupdateMany()anddeleteMany()Previously,
limithas not existed as a valid option in top levelupdateMany()anddeleteMany()queries. In 6.3.0limitis now available in these queries, bringing their features more in line with other query types.You can use
limitlike the following:await prisma.user.deleteMany({ where: { column: 'value' }, limit: 100, });This will limit the number of deleted users to 100 at maximum.
Sort
generatorfields deterministicallyIn previous version of Prisma ORM, the fields inside of a
generatorblock in your Prisma Schema were not deterministically sorted. This could lead to cases whereprisma db pullcould lead to re-ordering of fields.In 6.3.0, the sorting of fields in this block is now deterministic. You may see re-ordering on the first
prisma db pullafter you upgrade, but it will remain consistent afterwards.Replace
NOT INwithNOT EXISTSfor PostgreSQL relation filtersIn previous versions of Prisma ORM, when using the
noneorsomerelation filters, the SQL queries generated usedNOT IN. In many cases this lead to performance issues as the size of the related table grew. In 6.3.0, we’ve replaced these usages ofINwithEXISTSin order to improve query performance.A special thank you
We'd like to extend our heartfelt thanks to @loren and his team for the collaboration and trust in our enterprise support plan. Working closely with them allowed us to address important issues like #19249 and #17303. Their insights and partnership have been invaluable in improving our product.
If your team could benefit from dedicated support and tailored solutions, learn more about our enterprise support plan.
Fixes and improvements
Prisma Client
Prisma
6.2.1
8 Jan 2025Today we are releasing the 6.2.1 patch release to address an issue with some of the
omitApipreview feature checks having been accidentally omitted when making the feature GA. Now it is fully functional without the preview feature flag.Today we are releasing the 6.2.1 patch release to address an issue with some of the
omitApipreview feature checks having been accidentally omitted when making the feature GA. Now it is fully functional without the preview feature flag.6.2.0
7 Jan 2025Today we're releasing Prisma ORM version 6.2.0 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
We have a number of new features in this version, including support for
jsonandenumfields in SQLite, a newupdateManyAndReturnfunction, support for ULID values, as well as the promotion of theomitfeature from Preview to Generally Availability.Highlights
Excluding fields via
omitis now production-readyOur number one requested feature is out of Preview and Generally Available. In 6.2.0, you no longer need to add
omitApito your list of Preview features:generator client { provider = "prisma-client-js" - previewFeatures = ["omitApi"] }As a refresher:
omitallows you to exclude certain fields from being returned in the results of your Prisma Client queries.You can either do this locally, on a per-query level:
const result = await prisma.user.findMany({ omit: { password: true, }, });Or globally, to ensure a field is excluded from all queries of a certain model:
const prisma = new PrismaClient({ omit: { user: { password: true } } }) // The password field is excluded in all queries, including this one const user = await prisma.user.findUnique({ where: { id: 1 } })For more information on
omit, be sure to check our documentation.jsonandenumfields in SQLitePrevious to this version, you could not define
jsonandenumfields in your Prisma schema when using SQLite. The respective GitHub issues have been among the most popular ones in our repo, so with our new approach to open-source governance, we finally got to work and implemented these.Working with JSON and Enum fields works similarly to other database providers, here’s an example:
datasource db { provider = "sqlite" url = "file:./dev.db" } model User { id Int @id @default(autoincrement()) name String role Role data Json } enum Role { Customer Admin }Support for auto-generated ULID values
Similar to
cuid2support released in ORM version 6.0.0, we are now adding support for Universally Unique Lexicographically Sortable Identifiers (or short: ULIDs 😄) in version 6.2.0. A ULID value is a 26-character alphanumeric string, e.g.01GZ0GZ3XARH8ZP44A7TQ2W4ZD.With this new feature, you can now create records with auto-generated ULID values for
Stringfields:model User { id String @id @default(ulid()) }New batch function:
updateManyAndReturnupdateManyallows you to update many records in your database, but it only returns the count of the affected rows, not the resulting rows themselves. WithupdateManyAndReturnyou are now able to achieve this:const users = await prisma.user.updateManyAndReturn({ where: { email: { contains: 'prisma.io', } }, data: { role: 'ADMIN' } })This call to
updateManyAndReturnwill now return the actual records that have been updated in the query:[{ id: 22, name: 'Alice', email: 'alice@prisma.io', profileViews: 0, role: 'ADMIN', coinflips: [] }, { id: 23, name: 'Bob', email: 'bob@prisma.io', profileViews: 0, role: 'ADMIN', coinflips: [] }]Please note that like
createManyAndReturn,updateManyAndReturnis only supported in PostgreSQL, CockroachDB, and SQLite.Fixed runtime error in Node.js v23
While not officially supported, we understand that a lot of you like to be on the latest Node.js version — so we fixed an error that only occurred on Node.js 23. Happy coding ✌️
Prisma is hiring
Join us at Prisma to work on the most popular TypeScript ORM and other exciting products like the first serverless database built on unikernels!
We currently have two open roles in our Engineering team:
If these don’t fit, you can still check out our jobs page and send a general application.
6.1.0
17 Dec 2024@opentelemetry/apiis now a peer dependency instead of a regular dependencyregisterInstrumentationsin@opentelemetry/instrumentationis now re-exported by@prisma/instrumentation
Today we're releasing Prisma ORM version 6.1.0
In this version our
tracingPreview feature is being graduated to GA!Highlights
Tracing goes GA
The
tracingPreview feature is now stable. You now no longer have to includetracingin your set of enabled preview features.generator client { provider = "prisma-client-js" - previewFeatures = ["tracing"] }We have also changed some of the spans generated by Prisma Client. Previously, a trace would report the following spans:
prisma:client:operation prisma:client:serialize prisma:engine prisma:engine:connection prisma:engine:db_query prisma:engine:serialize
Now, the following are reported:
prisma:client:operation prisma:client:serialize prisma:engine:query prisma:engine:connection prisma:engine:db_query prisma:engine:serialize prisma:engine:response_json_serialization
Additionally, we have made a few changes to our dependencies:
@opentelemetry/apiis now a peer dependency instead of a regular dependencyregisterInstrumentationsin@opentelemetry/instrumentationis now re-exported by@prisma/instrumentation
After upgrading to Prisma ORM 6.1.0 you will need to add
@opentelemetry/apito your dependencies if you haven't already:npm install @opentelemetry/api
You will also no longer need to have
@opentelemetry/instrumentationif you only useregisterInstrumentations. In this case you can importregisterInstrumentationsfrom@prisma/instrumentation- import { PrismaInstrumentation } from '@prisma/instrumentation' + import { PrismaInstrumentation, registerInstrumentations } from '@prisma/instrumentation'Mutli-line comments in Prisma Schema Language (PSL)
Comments can now be defined as multi-line in your Prisma schema! Comments can use the existing format:
// this is a schema comment
or can now also use our multi-line format:
/* * this is a multi-line comment * You can add in all you want here * Keep typing and this comment will keep on going */
Bug fixes
Tracing related
As we're moving our
tracingpreview to GA, a number of issues have been resolved. Here are a few highlights:Other issues
We also have a number of other issues that were resolved outside of our
tracingfeature.Fixes and improvements
Prisma
Instrumentation error in production:
TypeError: parentTracer.getSpanLimits is not a functionPrisma Client doesn't put all OTEL trace spans under one parent span
Add tests for tracing and different ways to open the first connection (including internal spans)
prisma:enginespans are missing when there are multiplenew PrismaClient()invocationsSupport tracers not derived from
opentelemetry-sdk-trace-base(e.g. Datadog tracer)Make sure
db.statementattribute doesn't include thetraceparentcomment[Instrumentation]
registerInstrumentationsuses the global provider instead of the one passed inAlpine Linux 3.21:
Prisma failed to detect the libssl/openssl version to use
Prisma Client
6.0.1
2 Dec 2024Today we are releasing the
6.0.1patch release to address an issue with using Prisma Client generated in a custom output path with Next.js.Changes