deps: update @prisma/client to 7.3.0 #2

Open
minori wants to merge 1 commits from dependencies/update--prisma-client into main
Owner

Dependency Update

Updates @prisma/client from 5.20.0 to 7.3.0.

Type

dependencies

Changelog

Changelog

7.3.0

Today, we are excited to share the 7.3.0 stable release 🎉

🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!

ORM

  • #28976: 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 new compilerBuild option for the client generator block in schema.prisma with two options: fast and small. 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, the fast mode 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 compilerBuild option is our first step toward addressing your concerns!

  • #29005: 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.

  • #28965: Update MSSQL to v12.2.0
    This community PR updates the @prisma/adapter-mssql to use MSSQL v12.2.0. Thanks Jay-Lokhande!

  • #29001: Pin better-sqlite3 version to avoid SQLite bug
    An underlying bug in SQLite 3.51.0 has affected the better-sqlite3 adapter. We’ve bumped the version that powers @prisma/better-sqlite3 and have pinned the version to prevent any unexpected issues. If you are using @prisma/better-sqlite3 , please upgrade to v7.3.0.

  • #29002: Revert @map enums 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 @map function. 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 using relationJoins with BigInt fields in Prisma 7, JavaScript's JSON.parse loses precision for integers larger than Number.MAX_SAFE_INTEGER (2^53 - 1). This happens because PostgreSQL's JSONB_BUILD_OBJECT returns 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 ::text inside JSONB_BUILD_OBJECT calls, similar to how MONEY is 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](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise.

6.19.2

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/edge entrypoint is not being used.

Changes:

7.2.0

Today, we are excited to share the 7.2.0 stable release 🎉

🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!

Highlights

ORM

  • #28830: feat: add sqlcommenter-query-insights plugin
    • Adds a new SQL commenter plugin to support query insights metadata.
  • #28860: feat(migrate): add -url param for db pull, db push, migrate dev
    • Adds a -url flag to key migrate commands to make connection configuration more flexible.
  • #28895: feat(config): allow undefined URLs in e.g. prisma generate
    • Allows certain workflows (such as prisma generate) to proceed even when URLs are undefined.
  • #28903: feat(cli): customize prisma init based on the JS runtime (Bun vs others)
    • Makes prisma init tailor generated setup depending on whether the runtime is Bun or another JavaScript runtime.
  • #28846: fix(client-engine-runtime): make DataMapperError a UserFacingError
    • Ensures DataMapperError is surfaced as a user-facing error for clearer, more actionable error reporting.
  • #28849: fix(adapter-{pg,neon,ppg}): handle 22P02 error in Postgres
    • Improves Postgres adapter error handling for invalid-text-representation errors (22P02).
  • #28913: fix: fix byte upserts by removing legacy byte array representation
    • Fixes byte upsert behavior by removing a legacy byte-array representation path.
  • #28535: fix(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.
  • #28911: fix(cli): make prisma version --json emit JSON only to stdout
    • Ensures machine-readable JSON output is emitted cleanly to stdout without extra noise.

VS Code Extension

  • #1950: fix: 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](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise.

6.19.1

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.

Changes

7.1.0

Today, we are excited to share the 7.1.0 stable 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

  • #28735: 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.

  • #28769:  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:

    • #28796: implement query tags for SQL commenter plugin
    • #28802: add traceContext SQL commenter plugin
  • #28737: 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.
    Thanks to @xio84 for this community contribution!

  • #28820: mark @opentelemetry/api as external in instrumentation
    Ensures @opentelemetry/api is 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.

  • #28694: allow env() helper to accept interface-based generics
    Updates the env() 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.
    Thanks to @SaubhagyaAnubhav for this community contribution!

Read Replicas extension

  • #53: 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 comments option when creating a PrismaClient instance:

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-tags package 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 withMergedQueryTags to 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-context package 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: https://prisma.io/enterprise.

7.0.1

Today, we are issuing a 7.0.1 patch release focused on quality of life improvements, and bug fixes.

🛠 Fixes

7.0.0

Today, we are excited to share the 7.0.0 stable 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-js provider for prisma-client in your main schema.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 accelerteUrl when creating a new instance of PrismaClient.

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 removed
  • new PrismaClient({datasourceUrl: ..}) support has been removed
  • new PrismaClient() support has been removed
  • new 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_modules

When running prisma generate, the generated Client runtime and project types will now require a output path to be set in your project’s main schema.prisma. We recommend that they be generated inside of your project’s src directory 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 PrismaClient from 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-js but are using the new output option, 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 generate and seed in various situations:

  • post-install hook would run prisma generate
  • prisma migrate would run prisma generate and prisma seed

This behaviour has been removed in favor of explicitly requiring commands to be run by users.

Removal of prisma generate flags

For prisma generate , we’ve removed a few flags that were no longer needed:

  • prisma generate --data-proxy
  • prisma generate --accelerate
  • prisma generate --no-engine
  • prisma generate --allow-no-models

Removal of prisma db flags

For prisma db, we’ve removed the following flag:

  • 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 migrate flags

For prisma migrate diff, we’ve removed the following flags:

  • prisma --[from/to]-schema-datamodel
    • This is now replaced with just --[from/to]-schema. The usage is otherwise the same.
  • 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.
  • 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. Our listLocalDatabases helper function can be used for that, analogously to the db pull --local-d1 example above (where the user sets the datasource URL to file://${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:

  • PrismaBetterSQLite3PrismaBetterSqlite3
  • PrismaD1HTTPPrismaD1Http
  • PrismaLibSQLPrismaLibSql
  • PrismaNeonHTTPPrismaNeonHttp

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.ts is now required for projects looking to perform introspection and migration.

Schema changes

  • datasource.url is now configured in the config file
  • datasource.shadowDatabaseUrl is now configured in the config file
  • datasource.directUrl has been made unnecessary and has removed
  • generator.runtime=”react-native” has been removed

For early adopters of the config file, a few things have been removed with this release

  • engine: 'js'| 'classic' has been removed
  • adapter has 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 dotenv to 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 prisma keyword in package.json

In previous releases, users could configure their schema entry point and seed script in a prisma block in the package.json of their project. With the move to prisma.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:

  • LibraryEngine (engineType = "library", the Node-API Client)
  • BinaryEngine (engineType = "binary", the long-running executable binary)
  • DataProxyEngine and AccelerateEngine (Accelerate uses a new RemoteExecutor now)
  • ReactNativeEngine

Deprecated metrics feature has been removed

We deprecated the previewFeature metrics some 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

  • #28493: Stop shimming WeakRef in Cloudflare Workers. This will now avoid any unexpected memory leaks.
  • #28297: Remove hardcoded URL validation. Users are now required to make sure they don’t include sensitive information in their config files.
  • #28273: Removed Prisma v1 detection
  • #28343: Remove undocumented --url flag from prisma db pull
  • #28286: Remove deprecated prisma introspect command.
  • #28480: Rename /wasm to /edge
    • This change only affects prisma-client-js
    • Before:
      • /edge → meant “for Prisma Accelerate”
      • /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_TYPE
    • PRISMA_CLIENT_ENGINE_TYPE
    • PRISMA_QUERY_ENGINE_BINARY
    • PRISMA_QUERY_ENGINE_LIBRARY
    • PRISMA_GENERATE_SKIP_AUTOINSTALL
    • PRISMA_SKIP_POSTINSTALL_GENERATE
    • PRISMA_GENERATE_IN_POSTINSTALL
    • PRISMA_GENERATE_DATAPROXY
    • PRISMA_GENERATE_NO_ENGINE
    • PRISMA_CLIENT_NO_RETRY
    • PRISMA_MIGRATE_SKIP_GENERATE
    • PRISMA_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 @map attribute for enum members, which can be used to set their expected runtime values

enum 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 --url flag. 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: https://prisma.io/enterprise.

6.19.0

Today, we are excited to share the 6.19.0 stable 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

Prisma ORM is the most popular ORM in the TypeScript ecosystem. Today’s release brings a bunch of new bug fixes and overall improvements:

  • #5675: When dropping a model from a schema, do not append the default schema to the migration.
  • #5656: Align naming conventions for fields and relation fields
  • #28341: Add biome ignore comments to generated client files. This was a community contribution from @lonelyevil, thank you!

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:

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=true to 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.

Screenshot 2025-10-31 at 3 56 59 PM

#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/client up 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-js prisma-client
  • New engine and datasource keys in prisma.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: https://prisma.io/enterprise.

6.18.0

Today, we are excited to share the 6.18.0 stable 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 init now creates a prisma.config.ts automatically

When creating a new project with 6.18.0, prisma init will now create a prisma.config.ts file automatically. This prepares new applications for the future of Prisma 7. Some fields that have been historically set in the schema.prisma file are now able to be set in the prisma.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 datasource in prisma.config.ts

If you’re adopting the new prisma.config.ts setup 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 your schema.prisma will be ignored. To set the datasource, we also must include the new engine key which we can set to "classic" , which will be required for Prisma v7

import { defineConfig, env } from "prisma/config";
export default defineConfig({
    // The Rust-compiled schema engine 
    engine: "classic",
    datasource: {
        url: env('DATABASE_URL'),
    }
});

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.ts will 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

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: https://prisma.io/enterprise.

6.17.1

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 as Unsupported in their schema files.

Changes

6.17.0

Today, we are excited to share the 6.17.0 stable 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 config object 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/instrumentation to 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: https://prisma.io/enterprise.

6.16.3

Today, we are issuing a 6.16.3 patch release focused on bug fixes.

🛠 Fixes

⚠️ 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.JsonNull imported 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

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 = client with 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 like workerd, where it has resulted in runtime errors. This behavior has been made conditional to prevent these runtime errors.

6.16.1

Today, we are issuing a 6.16.1 patch release.

Bug fixes

  • In Prisma ORM 6.16.0, the driverAdapters and queryCompiler features were stabilized, but leftover code in the prisma-client-ts generator required them to still be specified in edge runtimes. This has now been fixed, runtimes like workerd and vercel-edge no longer require these preview features.

6.16.0

Today, we are excited to share the 6.16.0 stable 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:

  1. Configure the generator block 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 queryCompiler and driverAdapter feature flags from the previewFeatures array. And if you used binaryTargets, you can also get rid of these.
  2. Install the driver adapter for your database, e.g. to use pg for PostgreSQL:
    npm install @prisma/adapter-pg
    
  3. Finally, you can instantiate PrismaClient using the PrismaPg driver 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-client generator (see below), not with prisma-client-js. Use the old generator at your discretion.

New ESM-first prisma-client generator is Generally Available

Another major milestone has been achieved in this release: The new, flexible and ESM-first prisma-client generator 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 developer
  • ESM-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-client generator:

  • removed Prisma.validator; you can use TypeScript native satisfies keyword instead
  • created a new ./generared/prisma/browser entrypoint 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 postgresqlExtensions Preview feature

We're deprecating the postgresqlExtensions Preview 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-only flag:

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: https://prisma.io/enterprise.

6.15.0

Today, we are excited to share the 6.15.0 stable 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 --force is 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 flexibility

We 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:

  • node has been removed, use runtime = "nodejs" instead
  • deno-deploy has been removed, use runtime = "deno" instead
  • vercel has been replaced by the new runtime = "vercel-edge"
  • edge-light is now just an alias for vercel-edge
  • nodejs, deno, and bun now share the same internal code path, while still keeping their separate input values for clarity
  • The VS Code extension has been updated to reflect these changes

The updated list of supported runtimes is now:

nodejs, deno, bun, workerd (alias cloudflare), vercel-edge (alias edge-light), and react-native.

In addition, we fixed an issue where running prisma generate would fail if your schema contained no models. This is now supported with the new prisma-client generator, just like it already worked with the older prisma-client-js generator.

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 generate with 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 attachDatabasePool utility 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.

Screenshot 2025-08-26 at 3 15 19 PM

New --json flag for npx create-db

The npx create-db command 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 --json flag 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: https://prisma.io/enterprise.

6.14.0

Today, we are excited to share the 6.14.0 stable release 🎉

🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!

Highlights

@unique attributes 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 @unique attribute for views. This attribute enables:

  • relationships involving views
  • findUnique queries, cursor-based pagination & implicit ordering for views

Here's an example schema using @unique and 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-client generator and the queryCompiler Preview 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.$use method), which was deprecated since v4.16.0. Use Prisma Client extensions instead.
  • Deprecated metrics Preview 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 for earlyAccess flag 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 pgvectorpg_searchpg_stat_statementscitextpg_trgmfuzzystrmatch, and unaccent. 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

Today, we are excited to share the 6.13.0 stable 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.ts file 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 seed command to populate your database based on some executable script
  • externally 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 db directory:

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.seed command in package.json.

We’re excited to move the prisma.config.ts file into General Availability. If you used it before in your projects, you can now drop earlyAccess from 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 experimental field.

For example, usage of adapters is 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}, where extension is 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 @@schema attribute:

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 multiSchema feature flag from the generator block 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, @index and @unique can’t be used on a view block 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 findUnique queries and cursor-based pagination in Prisma Client
  • disallowed 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 tables option in prisma.config.ts:

 // prisma.config.ts
 export default defineConfig({
  tables: {
    external: [
      "users",
    ]
  },
  ...
})

A typical use case for this is the users table 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

pgvector extension 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 pgvector PostgreSQL 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. pgvector essentially 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 pgvector in Prisma ORM is going to follow soon, until then you can use pgvector via custom migrations and TypedSQL.

Note

: For now, pgvector is 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 for pg_search, pg_stat_statements, citext, pg_trgm, fuzzystrmatch, and unaccent. 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 required

We 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: https://prisma.io/enterprise.

6.12.0

Today, we are excited to share the 6.12.0 stable release 🎉

🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!

Highlights

ESM-compatible prisma-client generator now in Preview

We’re excited to share that our new and more flexible prisma-client generator 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_modules and 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-client generator will become the default in Prisma v7, replacing the current prisma-client-js generator.

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 views and migrations folder locations in prisma.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 (migrations and views) 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: https://prisma.io/enterprise

6.11.1

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 https://github.com/prisma/prisma/issues/27569.
    Namely, using @prisma/client with @prisma/extension-accelerate on a prisma+postgres://... connection string, while generating the Prisma Client definitions via prisma generate, resulted in a PrismaClientInitializationError.

    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

Today, we are excited to share the 6.11.0 stable 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-mariadb driver adapter, as well as for Neon and CockroachDB via the already existing @prisma/adapter-neon and @prisma/adapter-pg adapters.

Note: The mariadb driver 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 queryCompiler and driverAdapters feature flags on your generator block, 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 mydb command 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 instances
  • prisma 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-client generator

Our new prisma-client generator 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-core npm package.

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.

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:

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: Paris
  • us-west-1: San Francisco
  • us-east-1: North Virginia
  • ap-northeast-1: Tokyo
  • ap-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

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 dev command with an ORM version older than 6.10.x.

Performance improvements

The queryCompiler preview feature recently introduced a performance regression related to in-memory joins in TypeScript-based query execution (users who use the queryCompiler and the relationJoins preview features together were not affected, unless using relationLoadStrategy: "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

Today, we are excited to share the 6.10.0 stable 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 generator like 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-mssql and existing @prisma/adapter-planetscale driver 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 dev

We improved the prisma migrate dev command 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 @shardKey and @@shardKey attributes 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 shardKeys Preview 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-worker package. It's not needed any more, you can simply use pg when using Prisma ORM in Cloudflare Workers.
  • Entrypoint for new prisma-client generator 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 dev command and use the direct connection string starting with postgres:// 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/mcp command.

📚 Learn more in the docs.

6.9.0

Today, we are excited to share the 6.9.0 stable 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 queryCompiler and driverAdapters preview feature flags to your generator, 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 generate to 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 PrismaClient 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 })

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 dev command. 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 dev invocations.
  • Enables you to have multiple local Prisma Postgres instances running at the same time.
  • Running prisma init now 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 Virginia
  • eu-west-3: Paris
  • ap-northeast-1: Tokyo
  • ap-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

Today, we are issuing the 6.8.2 patch release. It fully resolves an issue with the prisma init and prisma dev commands for some Windows users who were still facing problems after the previous incomplete fix in version 6.8.1.

Fixes:

6.8.1

Today, we are issuing the 6.8.1 patch release. It fixes an issue with the prisma init and prisma dev commands on Windows.

Fixes

6.8.0

Today, we are excited to share the 6.8.0 stable 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 dev command:

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 url of your datasource block 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 dev process running in order to interact with the local Prisma Postgres instance.

📚 Learn more in the docs.

Native Deno support in prisma-client generator (Preview)

In this release, we're removing the deno Preview feature from the prisma-client-js generator. If you want to use Prisma ORM with Deno, you can now do so with the new prisma-client generator:

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-1 region.

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

Today, we are excited to share the 6.7.0 stable 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) and driverAdapters feature flags to your client generator:

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["queryCompiler", "driverAdapters"]
  output          = "../generated/prisma"
}

Now run prisma generate to 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 PrismaClient as 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 PrismaClient doesn'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-sqlite3 JavaScript 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 the better-sqlite3 package, so you can now interact with SQLite database in a JS-native way.

To use it, first enable the driverAdapters Preview feature flag in on your client generator, 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 prismaSchemaFolder Preview 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 generator

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

prisma/models/posts.prisma → defines Post model

model 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 → defines User model

model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
  posts Post[]
}

⚠️ Note that there have been breaking changes to the prismaSchemaFolder Preview 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-client generator (Preview)

With the prisma-client-js generator, the generated Prisma Client library is put into a single index.d.ts file. 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-client generator (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.node

After

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

Today, we are excited to share the 6.6.0 stable 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-client generator (Early Access)

We are excited to introduce a new prisma-client generator that's more flexible, comes with ESM support and removes any magic behaviours that may cause friction with the current prisma-client-js generator.

Note

: The prisma-client generator is currently in Early Access and will likely have some breaking changes in the next releases.

Here are the main differences:

  • Requires an output path; no “magic” generation into node_modules any more
  • Supports ESM and CommonJS via the moduleFormat field
  • Outputs plain TypeScript that's bundled just like the rest of your application code

Here's how you can use the new prisma-client generator 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 PrismaClient constructor (and anything else) from the generated folder:

// src/index.ts
import { PrismaClient } from './generated/prisma/client'

⚠️ Important: We recommend that you add the output path to .gitignore so 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 schema
  • prisma db pull: Introspects the schema of the remote database and updates your local Prisma schema
  • prisma migrate diff: Outputs the difference between the schema of the remote database and your local Prisma schema

Note

: Support for prisma migrate dev and prisma migrate deploy will 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.ts file. 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 --prompt option on prisma init

You can now pass a --prompt option to the prisma init command 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 --vibe for 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/client driver 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

prismaSchemaFolder breaking changes

If you are using the prismaSchemaFolder Preview 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:

  • pass the the --schema option to your Prisma CLI command (e.g. prisma migrate dev --schema ./prisma/schema)
  • set the prisma.schema field in package.json:
    // package.json
    {
      "prisma": {
        "schema": "./schema"
      }
    }
    
  • set the schema property in prisma.config.ts:
    import path from 'node:path'
    import type { PrismaConfig } from 'prisma'
    
    export default {
      earlyAccess: true,
      schema: path.join('prisma', 'schema'),
    } satisfies PrismaConfig<Env>
    

migrations folder must live next to .prisma file with datasource block

Your migrations directory must live next to the .prisma file that defines your datasource blog. If you relied on the implicit schema folder location of ./prisma/schema make sure to move your migrations folder from ./prisma/migrations to ./prisma/schema/migrations.

Assuming schema.prisma defines the datasource in this example, here's how how need to place the migrations folder:

# `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 generate would 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

Today, we are excited to share the 6.5.0 stable 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 migrate command 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 reset directly.

Support for prisma.config.ts in Prisma Studio

We've expanded support for our prisma.config.ts file 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 studio block to your prisma.config.ts file:

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 PrismaConfig

Notice how this looks a little different from last release! Instead of an @prisma/config package there’s now two different options:

  1. Using the defineConfig helper exported by prisma/config.
  2. Using the PrismaConfig utility type exported by Prisma.

All the relevant info for the prisma.config.ts file, including these new ways of defining your config, can be found in our docs.

Allow for chaining $on and $extends.

In previous versions of Prisma ORM, the return type of the $on client method was void. This did not allow for chaining $on() and $extends() calls, as $on is not available on extended clients.

In this version we've resolved this issue and $on will now return the modified Prisma Client.

Community fixes

We have a number of community-submitted fixes that improve Prisma ORM:

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.

Credits

Thank you to @overbit, @RaHehl, @toniopelo, and @de-novo for your contributions to this release!


This PR was created by Minori, your friendly dependency updater! 🌸

## Dependency Update Updates **@prisma/client** from `5.20.0` to `7.3.0`. ### Type dependencies ### Changelog ## Changelog ### 7.3.0 Today, we are excited to share the `7.3.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!** ## ORM - [#28976](https://github.com/prisma/prisma/pull/28976): 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 new `compilerBuild` option for the client generator block in `schema.prisma` with two options: `fast` and `small`. 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, the `fast` mode is used, but this can be set by the user: ```groovy generator client { provider = "prisma-client" output = "../src/generated/prisma" compilerBuild = "fast" // "fast" | "small" } ``` We still have more in progress for performance, but this new `compilerBuild` option is our first step toward addressing your concerns! - [#29005](https://github.com/prisma/prisma/pull/29005): 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. - [#28965](https://github.com/prisma/prisma/pull/28965): Update MSSQL to v12.2.0 This community PR updates the `@prisma/adapter-mssql` to use MSSQL v12.2.0. Thanks [Jay-Lokhande](https://github.com/Jay-Lokhande)! - [#29001](https://github.com/prisma/prisma/pull/29001): Pin better-sqlite3 version to avoid SQLite bug An underlying bug in SQLite 3.51.0 has affected the `better-sqlite3` adapter. We’ve bumped the version that powers `@prisma/better-sqlite3` and have pinned the version to prevent any unexpected issues. If you are using `@prisma/better-sqlite3` , please upgrade to v7.3.0. - [#29002](https://github.com/prisma/prisma/pull/29002): Revert `@map` enums 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 `@map` function. 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](https://github.com/prisma/prisma-engines/pull/5745): Cast BigInt to text in JSON aggregation When using `relationJoins` with BigInt fields in Prisma 7, JavaScript's `JSON.parse` loses precision for integers larger than `Number.MAX_SAFE_INTEGER` (2^53 - 1). This happens because PostgreSQL's `JSONB_BUILD_OBJECT` returns 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 `::text` inside `JSONB_BUILD_OBJECT` calls, similar to how `MONEY` is 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](https://www.prisma.io/careers#current)](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise. ### 6.19.2 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/edge` entrypoint is not being used. Changes: * https://github.com/prisma/prisma/pull/28934 ### 7.2.0 Today, we are excited to share the `7.2.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!** ## Highlights ## ORM - [#28830](https://github.com/prisma/prisma/pull/28830): feat: add `sqlcommenter-query-insights` plugin - Adds a new SQL commenter plugin to support query insights metadata. - [#28860](https://github.com/prisma/prisma/pull/28860): feat(migrate): add `-url` param for `db pull`, `db push`, `migrate dev` - Adds a `-url` flag to key migrate commands to make connection configuration more flexible. - [#28895](https://github.com/prisma/prisma/pull/28895): feat(config): allow undefined URLs in e.g. `prisma generate` - Allows certain workflows (such as `prisma generate`) to proceed even when URLs are undefined. - [#28903](https://github.com/prisma/prisma/pull/28903): feat(cli): customize `prisma init` based on the JS runtime (Bun vs others) - Makes `prisma init` tailor generated setup depending on whether the runtime is Bun or another JavaScript runtime. - [#28846](https://github.com/prisma/prisma/pull/28846): fix(client-engine-runtime): make `DataMapperError` a `UserFacingError` - Ensures `DataMapperError` is surfaced as a user-facing error for clearer, more actionable error reporting. - [#28849](https://github.com/prisma/prisma/pull/28849): fix(adapter-{pg,neon,ppg}): handle 22P02 error in Postgres - Improves Postgres adapter error handling for invalid-text-representation errors (`22P02`). - [#28913](https://github.com/prisma/prisma/pull/28913): fix: fix byte upserts by removing legacy byte array representation - Fixes byte upsert behavior by removing a legacy byte-array representation path. - [#28535](https://github.com/prisma/prisma/pull/28535): fix(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. - [#28911](https://github.com/prisma/prisma/pull/28911): fix(cli): make `prisma version --json` emit JSON only to stdout - Ensures machine-readable JSON output is emitted cleanly to stdout without extra noise. ## VS Code Extension - [#1950](https://github.com/prisma/language-tools/pull/1950): fix: 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](https://www.prisma.io/careers#current)](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise. ### 6.19.1 Today, we are issuing a patch release for Prisma 6 that includes a fix for a [diffing bug introduced in Prisma 6.13.1](https://github.com/prisma/prisma/issues/28240), which led to incorrectly reported empty diffs. ## Changes * https://github.com/prisma/prisma-engines/pull/5706 ### 7.1.0 Today, we are excited to share the `7.1.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!** This release brings quality of life improvements and fixes various bugs. ## Prisma ORM - [#28735](https://github.com/prisma/prisma/pull/28735): **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`. - [#28769](https://github.com/prisma/prisma/pull/28769):  **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](https://google.github.io/sqlcommenter/). Here’s two related PRs that were also merged: - [#28796](https://github.com/prisma/prisma/pull/28796): **implement query tags for SQL commenter plugin** - [#28802](https://github.com/prisma/prisma/pull/28802): **add `traceContext` SQL commenter plugin** - [#28737](https://github.com/prisma/prisma/pull/28737): **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. Thanks to @xio84 for this community contribution! - [#28820](https://github.com/prisma/prisma/pull/28820): **mark `@opentelemetry/api` as external in instrumentation** Ensures `@opentelemetry/api` is 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. - [#28694](https://github.com/prisma/prisma/pull/28694): **allow `env()` helper to accept interface-based generics** Updates the `env()` 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. Thanks to @SaubhagyaAnubhav for this community contribution! ## Read Replicas extension - [#53](https://github.com/prisma/extension-read-replicas/pull/53): **Add support for Prisma 7** Users of the read-replicas extension can now use the extension in Prisma v7. You can update by installing: ```bash npm install @prisma/extension-read-replicas@latest ``` For folks still on Prisma v6, install version `0.4.1`: ```bash npm install @prisma/extension-read-replicas@0.4.1 ``` For more information, [visit the repo](https://github.com/prisma/extension-read-replicas) ## 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](https://google.github.io/sqlcommenter/) developed by Google, which is widely supported by database monitoring tools. With this feature, your SQL queries can include rich metadata: ```sql SELECT "id", "name" FROM "User" /*application='my-app',traceparent='00-abc123...-01'*/ ``` ### Basic usage Pass an array of SQL commenter plugins to the new `comments` option when creating a `PrismaClient` instance: ```tsx 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-tags` package lets you add arbitrary tags to queries within an async context: ```tsx 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: ```sql SELECT ... FROM "User" /*requestId='abc-123',route='/api/users'*/ ``` Use `withMergedQueryTags` to merge tags with outer scopes: ```tsx 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-context` package adds W3C Trace Context (`traceparent`) headers for distributed tracing correlation: ```tsx import { traceContext } from '@prisma/sqlcommenter-trace-context'; const prisma = new PrismaClient({ adapter, comments: [traceContext()], }); ``` When tracing is enabled and the span is sampled: ```sql 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: ```tsx 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**: ```tsx 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](https://www.prisma.io/docs/orm/prisma-client/observability-and-logging/sql-comments). We'd love to hear your feedback on this feature! Please open an issue on [GitHub](https://github.com/prisma/prisma) or join the discussion in our [Discord community](https://pris.ly/discord). ## 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](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise. ### 7.0.1 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 https://github.com/prisma/prisma/pull/28583) - Fix collisions between user and internal Studio columns when querying (via https://github.com/prisma/prisma/pull/28677) - Warn when SQLite file doesn't exist (via https://github.com/prisma/prisma/pull/28711/commits/c33a1ea9e5a94e6a5c876bc4567915cc5f354658) - Fix https://github.com/prisma/studio/issues/1363 (via https://github.com/prisma/prisma/pull/28711/commits/07224d4651d043f4b08735eeaa144aa9d75f9fe3) - Sort tables alphabetically (via https://github.com/prisma/prisma/pull/28702) - **Prisma CLI** - Fix potential vulnerabilities in installed dependencies (via https://github.com/prisma/prisma/pull/28592) - Fix https://github.com/prisma/prisma/issues/28240, an exit code regression affecting `prisma migrate diff` (via https://github.com/prisma/prisma-engines/pull/5699) - Show informative message when `prisma db seed` is run, but no `migrations.seed` command is specified in the Prisma config file (via https://github.com/prisma/prisma/pull/28711) - Relax `engines` check in `package.json`, to let Node.js 25+ users adopt Prisma, although Node.js 25+ isn't considered stable yet (via https://github.com/prisma/prisma/pull/28600). Thanks @Sajito! - **Prisma Client** - Restore `cockroachdb` support in `prisma-client-js` generator, after it was accidentally not shipped in Prisma 7.0.0 (via https://github.com/prisma/prisma/pull/28690) - **@prisma/better-sqlite3** - Bump underlying version of `better-sqlite3` to `^12.4.5`, fixing https://github.com/prisma/prisma/issues/28624 (via https://github.com/prisma/prisma/pull/28625). Thank you @bhbs! ### 7.0.0 Today, we are excited to share the `7.0.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — and [follow us on X](https://pris.ly/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](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6), 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-js` provider for `prisma-client` in your main `schema.prisma` : ```diff // 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 `accelerteUrl` when creating a new instance of `PrismaClient`. For Driver Adapters ```tsx 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: ```tsx // 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 removed - `new PrismaClient({datasourceUrl: ..})` support has been removed - `new PrismaClient()` support has been removed - `new PrismaClient({})` support has been removed For Prisma Accelerate users: ```tsx 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_modules` When running `prisma generate`, the generated Client runtime and project types will now **require** a `output` path to be set in your project’s main `schema.prisma`. We recommend that they be generated inside of your project’s `src` directory to ensure that your existing tools are able to consume them like any other piece of code you might have. ```groovy // schema.prisma generator client { provider = "prisma-client" // Generate my Client and Project types output = "../src/generated/prisma" } ``` Update your code to import `PrismaClient` from this generated output: ```tsx // Import from the generated prisma client import { PrismaClient } from './generated/prisma/client'; ``` For developers who still need to stay on the `prisma-client-js` but are using the new `output` option, theres’s a new required package, `@prisma/client-runtime-utils` , which needs to be installed: ```bash # for prisma-client-js users only npm install @prisma/client-runtime-utils ``` ### Removal of implicit Prisma commands In previous releases, Prisma would run `generate` and `seed` in various situations: - post-install hook would run `prisma generate` - `prisma migrate` would run `prisma generate` and `prisma seed` This behaviour has been removed in favor of explicitly requiring commands to be run by users. ### Removal of `prisma generate` flags For `prisma generate` , we’ve removed a few flags that were no longer needed: - `prisma generate --data-proxy` - `prisma generate --accelerate` - `prisma generate --no-engine` - `prisma generate --allow-no-models` ### Removal of `prisma db` flags For `prisma db`, we’ve removed the following flag: - `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: ```ts import { defineConfig } from '@prisma/config' import { listLocalDatabases } from '@prisma/adapter-d1' export default defineConfig({ datasource: { url: `file://${listLocalDatabases().pop()}`, }, }) ``` ### Removal of `prisma migrate` flags For `prisma migrate diff`, we’ve removed the following flags: - `prisma --[from/to]-schema-datamodel` - This is now replaced with just `--[from/to]-schema`. The usage is otherwise the same. - `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. - `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. Our `listLocalDatabases` helper function can be used for that, analogously to the `db pull --local-d1` example above (where the user sets the datasource URL to `file://${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` ⇒ `PrismaBetterSqlite3` - `PrismaD1HTTP` ⇒ `PrismaD1Http` - `PrismaLibSQL` ⇒ `PrismaLibSql` - `PrismaNeonHTTP` ⇒ `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.ts` is now required for projects looking to perform introspection and migration. **Schema changes** - `datasource.url` is now configured in the config file - `datasource.shadowDatabaseUrl` is now configured in the config file - `datasource.directUrl` has been made unnecessary and has removed - `generator.runtime=”react-native”` has been removed For early adopters of the config file, a few things have been removed with this release - `engine: 'js'| 'classic'` has been removed - `adapter` has been removed A brief before/after: ```groovy // schema.prisma datasource db { provider = "postgresql" url = ".." directUrl = ".." shadowDatabaseUrl = ".." } ``` ```tsx // ./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 `dotenv` to 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 `prisma` keyword in `package.json` In previous releases, users could configure their schema entry point and seed script in a `prisma` block in the `package.json` of their project. With the move to `prisma.config.ts`, this no longer makes sense and has been removed. To migrate, use the Prisma config file instead: ```json { "name": "my-project", "version": "1.0.0", "prisma": { "schema": "./custom-path-to-schema/schema.prisma", "seed": "tsx ./prisma/seed.ts" } } ``` ```tsx 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: - `LibraryEngine` (`engineType = "library"`, the Node-API Client) - `BinaryEngine` (`engineType = "binary"`, the long-running executable binary) - `DataProxyEngine` and `AccelerateEngine` (Accelerate uses a new `RemoteExecutor` now) - `ReactNativeEngine` ### Deprecated metrics feature has been removed We deprecated the previewFeature `metrics` some 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 - [#28493](https://github.com/prisma/prisma/pull/28493): Stop shimming `WeakRef` in Cloudflare Workers. This will now avoid any unexpected memory leaks. - [#28297](https://github.com/prisma/prisma/pull/28297): Remove hardcoded URL validation. Users are now required to make sure they don’t include sensitive information in their config files. - [#28273](https://github.com/prisma/prisma/pull/28273): Removed Prisma v1 detection - [#28343](https://github.com/prisma/prisma/pull/28343): Remove undocumented `--url` flag from `prisma db pull` - [#28286](https://github.com/prisma/prisma/pull/28286): Remove deprecated `prisma introspect` command. - [#28480](https://github.com/prisma/prisma/pull/28480): Rename `/wasm` to `/edge` - This change only affects `prisma-client-js` - Before: - `/edge` → meant “for Prisma Accelerate” - `/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_TYPE` - `PRISMA_CLIENT_ENGINE_TYPE` - `PRISMA_QUERY_ENGINE_BINARY` - `PRISMA_QUERY_ENGINE_LIBRARY` - `PRISMA_GENERATE_SKIP_AUTOINSTALL` - `PRISMA_SKIP_POSTINSTALL_GENERATE` - `PRISMA_GENERATE_IN_POSTINSTALL` - `PRISMA_GENERATE_DATAPROXY` - `PRISMA_GENERATE_NO_ENGINE` - `PRISMA_CLIENT_NO_RETRY` - `PRISMA_MIGRATE_SKIP_GENERATE` - `PRISMA_MIGRATE_SKIP_SEED` ### Mapped enums If [you followed along on twitter](https://x.com/prisma/status/1988970132690071600), 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 `@map` attribute for enum members, which can be used to set their expected runtime values ```groovy enum PaymentProvider { MixplatSMS @map("mixplat/sms") InternalToken @map("internal/token") Offline @map("offline") @@map("payment_provider") } ``` ```tsx 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 `--url` flag. 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](https://github.com/prisma/studio). ![ScreenRecording2025-11-18at7 40 46PM-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/0509b554-cbc6-48cc-adc5-ba491759895c) ## Prisma Postgres [Prisma Postgres](https://www.prisma.io/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](https://github.com/user-attachments/assets/172b43ee-70b3-43c7-a3ca-2cc12873d1a4) ### 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](https://www.prisma.io/docs/postgres/database/serverless-driver) 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](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise. ### 6.19.0 Today, we are excited to share the `6.19.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)** # Highlights This release brings a lot of bug fixes and improvements to both the ORM and Prisma Postgres. ## [Prisma ORM](https://www.prisma.io/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: - [#5675](https://github.com/prisma/prisma-engines/pull/5675): When dropping a model from a schema, do not append the default schema to the migration. - [#5656](https://github.com/prisma/prisma-engines/pull/5656): Align naming conventions for fields and relation fields - [#28341](https://github.com/prisma/prisma/pull/28341): Add biome ignore comments to generated client files. This was a community contribution from [@lonelyevil](https://github.com/lonelyevil), thank you! ## [Prisma Postgres](https://www.prisma.io/postgres) [Prisma Postgres](https://www.prisma.io/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=true` to 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](https://www.prisma.io/docs/postgres/database/local-development) 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. <img width="1920" height="816" alt="Screenshot 2025-10-31 at 3 56 59 PM" src="https://github.com/user-attachments/assets/8fe7b8ea-6190-42ea-a9e0-160a7164dc5b" /> [#1924](https://github.com/prisma/language-tools/pull/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/client` up 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-js` `prisma-client` - New `engine` and `datasource` keys in `prisma.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](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise. ### 6.18.0 Today, we are excited to share the `6.18.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/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 init` now creates a `prisma.config.ts` automatically When creating a new project with 6.18.0, `prisma init` will now create a `prisma.config.ts` file automatically. This prepares new applications for the future of Prisma 7. Some fields that have been historically set in the `schema.prisma` file are now able to be set in the `prisma.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 `datasource` in `prisma.config.ts` If you’re adopting the new `prisma.config.ts` setup 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 your `schema.prisma` will be ignored. To set the datasource, we also must include the new `engine` key which we can set to `"classic"` , which will be required for Prisma v7 ```tsx import { defineConfig, env } from "prisma/config"; export default defineConfig({ // The Rust-compiled schema engine engine: "classic", datasource: { url: env('DATABASE_URL'), } }); ``` - https://github.com/prisma/prisma/pull/28291 Support multiple Prisma instances with different providers - https://github.com/prisma/prisma/pull/28305 Add `env` helper function - https://github.com/prisma/prisma/pull/28266 Add support for `js` or `classic` as engine types in `prisma.config` - https://github.com/prisma/prisma/pull/28139 Map `Bytes` to `Uint8Array` depending 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.ts` will 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](https://www.prisma.io/postgres) [Prisma Postgres](https://www.prisma.io/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](https://www.prisma.io/careers#current) 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: https://prisma.io/enterprise. ### 6.17.1 Today, we are issuing a patch release to address a [regression in v6.17.0 that affected diffing of unsupported types](https://github.com/prisma/prisma/issues/28237), 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 as `Unsupported` in their schema files. ## Changes * https://github.com/prisma/prisma-engines/pull/5633 ### 6.17.0 Today, we are excited to share the `6.17.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/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 `config` object to configure [DefaultAzureCredential](https://learn.microsoft.com/en-gb/azure/developer/javascript/sdk/authentication/credential-chains#use-defaultazurecredential-for-flexibility): ```ts 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](https://github.com/prisma/prisma/pull/28156/files#diff-351f5d894309f058776099c378e3956271f34f34c04e2b54576045b9773ab61aR61-R62). - Relaxed the support package range for `@opentelemetry/instrumentation` to be compatible with `">=0.52.0 <1"`. Learn more in this [PR](https://github.com/prisma/prisma/pull/28199/files). - Added Codex CLI detection, ensuring dangerous Prisma operations are not executed by Codex without explicit user consent. Learn more in this [PR](https://github.com/prisma/prisma/pull/28159). - Fixed JSON column handling when using a MariaDB database. Learn more in this [PR](https://github.com/prisma/prisma/pull/28211). - 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](https://github.com/prisma/prisma-engines/pull/5629). ## Prisma Postgres [Prisma Postgres](https://www.prisma.io/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](https://console.prisma.io) 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](https://atlasgo.io/) or interfaces like DBeaver, Postico, and more. 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/database/direct-connections). ## 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: https://prisma.io/enterprise. ### 6.16.3 Today, we are issuing a 6.16.3 patch release focused on bug fixes. ## 🛠 Fixes * **Prisma Client** (`prisma-client` generator): fixed missing JSON null type definitions (`JsonNull`, `DbNull`, `AnyNull`) in the `browser.ts` entrypoint. _(https://github.com/prisma/prisma/pull/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. _(https://github.com/prisma/prisma-engines/pull/5614)_ * **Prisma Client**: enabled negative `take` with `findFirst` again. _(https://github.com/prisma/prisma-engines/pull/5616 — contributed by @jay-l-e-e)_ * **Prisma Accelerate**: aligned the behaviour of the new Rust-free client with Query Engine to handle self-signed certificates consistently and ensure backward compatibility. _(https://github.com/prisma/prisma/pull/28134)_ * **`@prisma/adapter-mariadb`**: fixed error event listeners leak. _(https://github.com/prisma/prisma/pull/28177 — contributed by @Tiaansu)_ ## ⚠️ 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.JsonNull` imported 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 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 = client` with 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 like `workerd`, where it has resulted in runtime errors. This behavior has been made conditional to prevent these runtime errors. ### 6.16.1 Today, we are issuing a 6.16.1 patch release. ## Bug fixes - In Prisma ORM 6.16.0, the `driverAdapters` and `queryCompiler` features were stabilized, but leftover code in the `prisma-client-ts` generator required them to still be specified in edge runtimes. This has now been fixed, runtimes like `workerd` and `vercel-edge` no longer require these preview features. ### 6.16.0 Today, we are excited to share the `6.16.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/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](https://www.prisma.io/blog/prisma-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](https://www.prisma.io/blog/prisma-orm-without-rust-latest-performance-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: 1. Configure the `generator` block in your Prisma schema: ```prisma 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 `queryCompiler` and `driverAdapter` feature flags from the `previewFeatures` array. And if you used `binaryTargets`, you can also get rid of these. 2. Install the [driver adapter](https://www.prisma.io/docs/orm/overview/databases/database-drivers#driver-adapters) for your database, e.g. to use [`pg`](https://node-postgres.com/) for PostgreSQL: ``` npm install @prisma/adapter-pg ``` 3. Finally, you can instantiate `PrismaClient` using the `PrismaPg` driver adapter as follows: ```ts 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](https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/no-rust-engine). > The Rust-free version of Prisma ORM has been thoroughly tested with the `prisma-client` generator (see below), not with `prisma-client-js`. Use the old generator at your discretion. ### New ESM-first `prisma-client` generator is Generally Available Another major milestone has been achieved in this release: The new, flexible and ESM-first `prisma-client` generator is ready for production too. Here's a quick overview of its main benefits: - No more [magic generation into `node_modules`](https://www.prisma.io/blog/why-prisma-orm-generates-code-into-node-modules-and-why-it-ll-change); generated code is fully under control by the developer - ESM-compatible by default - Flexible configuration for specific runtimes (Node.js, Deno, Bun, Cloudflare, …) ```prisma 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-client` generator: - removed `Prisma.validator`; you can use TypeScript native [`satisfies`](https://www.prisma.io/blog/satisfies-operator-ur8ys8ccq7zb) keyword instead - created a new `./generared/prisma/browser` entrypoint 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](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client) (e.g. for [Next.js](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/nextjs-starter-webpack-turborepo), [Nuxt](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/nuxt3-starter-nodejs) or [React Router](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/react-router-starter-nodejs)). 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client). ### 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](https://x.com/ssalbdivad) 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**](https://www.prisma.io/blog/why-prisma-orm-checks-types-faster-than-drizzle) ### Deprecating the `postgresqlExtensions` Preview feature We're deprecating the `postgresqlExtensions` Preview 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](https://www.prisma.io/docs/orm/prisma-migrate/workflows/customizing-migrations) via the `--create-only` flag: ``` 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: ```sql CREATE EXTENSION IF NOT EXISTS "pgcrypto"; ``` ## Prisma Postgres [Prisma Postgres](https://www.prisma.io/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](https://console.prisma.io), 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: ```prisma 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](https://github.com/prisma/prisma/issues) 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: https://prisma.io/enterprise. ### 6.15.0 Today, we are excited to share the `6.15.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/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 --force` is attempted, Prisma ORM will prompt for explicit confirmation before proceeding. ![Cursor AI guardrail](https://github.com/user-attachments/assets/81b47674-ad93-4270-b073-69fe583e34a5) 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](https://www.prisma.io/docs/orm/reference/prisma-cli-reference#ai-safety-guardrails-for-prisma-migrate-reset). ### `prisma-client`: runtime improvements and schema flexibility We 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: - `node` has been removed, use `runtime = "nodejs"` instead - `deno-deploy` has been removed, use `runtime = "deno"` instead - `vercel` has been replaced by the new `runtime = "vercel-edge"` - `edge-light` is now just an alias for `vercel-edge` - `nodejs`, `deno`, and `bun` now share the same internal code path, while still keeping their separate input values for clarity - The VS Code extension has been updated to reflect these changes The updated list of supported runtimes is now: `nodejs`, `deno`, `bun`, `workerd` (alias `cloudflare`), `vercel-edge` (alias `edge-light`), and `react-native`. In addition, we fixed an issue where running `prisma generate` would fail if your schema contained no models. This is now supported with the new `prisma-client` generator, just like it already worked with the older `prisma-client-js` generator. For example, the following schema will now generate a client without errors: ```prisma generator client { provider = "prisma-client" output = "../generated/client" } datasource db { provider = "postgresql" url = env("DATABASE_URL") } ``` Running `prisma generate` with this schema will succeed and create the client in `./generated/client`. 📚 Learn more [in the docs](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client-preview). ### Using Prisma ORM with Vercel Fluid [Fluid compute](https://vercel.com/fluid) 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 [`attachDatabasePool`](https://vercel.com/blog/the-real-serverless-compute-to-database-connection-problem-solved) utility 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: ```ts 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](https://www.prisma.io/docs/orm/prisma-client/deployment/serverless/deploy-to-vercel#using-prisma-orm-with-vercel-fluid). ## Other news ### Prisma Postgres Management API is Generally Available The Prisma Postgres Management API allows you to [programmatically](https://www.prisma.io/docs/guides/management-api-basic) 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](https://github.com/marketplace/actions/create-prisma-postgres-database) and [deleting](https://github.com/marketplace/actions/delete-prisma-postgres-database) 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](http://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](https://www.prisma.io/blog/how-co-dev-uses-prisma-postgres-to-power-ai-driven-app-development-for-non-developers)? 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](https://www.prisma.io/docs/postgres/introduction/management-api). ### 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](https://pipedream.com/apps/prisma-management-api). <img width="1624" height="994" alt="Screenshot 2025-08-26 at 3 15 19 PM" src="https://github.com/user-attachments/assets/f0d98f8f-362d-4887-baeb-019ed9625c66" /> ### New `--json` flag for `npx create-db` The `npx create-db` command 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 `--json` flag 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](https://www.prisma.io/docs/postgres/introduction/npx-create-db). ![npx create-db --json command](https://github.com/user-attachments/assets/5fa40e7c-d531-4f81-b26c-2e150c5cade3) ### 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](https://www.prisma.io/docs/postgres/database/direct-connections). ## 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: [https://prisma.io/enterprise](https://prisma.io/enterprise). ### 6.14.0 Today, we are excited to share the `6.14.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!** ## Highlights ### `@unique` attributes for SQL views (Preview) [Last release](https://pris.ly/release/6.13.0), we improved the robustness of [SQL views](https://www.prisma.io/docs/orm/prisma-schema/data-model/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 `@unique` attribute for views. This attribute enables: - relationships involving views - `findUnique` queries, cursor-based pagination & implicit ordering for views Here's an example schema using `@unique` and defining a relationship from a model to a view: ```prisma 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? } ``` <details><summary>Expand to view the SQL code for this view</summary> ```sql 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; ``` </details> You can now query this view and its relationship using `include`: ```ts const userPostStats = await prisma.userPostStats.findMany({ include: { user: true, } }) ``` 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-schema/data-model/views). ### Various fixes & stability improvements - Fixed several issues related to new `prisma-client` generator and the `queryCompiler` Preview 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](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client). - Fixed several regressions, e.g. related to Prisma Config - Removed middleware from Prisma Client (i.e. the `prisma.$use` method), which was deprecated since v4.16.0. Use [Prisma Client extensions](https://www.prisma.io/docs/orm/prisma-client/client-extensions) instead. - Deprecated `metrics` Preview 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](https://github.com/prisma/prisma/pull/27777). ## Other news ### Increased robustness of Management API (Early Access) We recently released an [API for programmatically managing Prisma Postgres instances](https://www.prisma.io/docs/postgres/introduction/management-api) 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](https://pris.ly/release/6.14.0) 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 for `earlyAccess` flag 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`, and `unaccent`. If you don't see the extension you need, you can [request it here](https://pris.ly/i-want-extensions). Extensions only work on _new_ instances, if you want to use any of them on your existing instance, [reach out to us](mailto:support@prisma.io). - **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 Today, we are excited to share the `6.13.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!** ## Highlights In this ORM release, we’re moving the Prisma Config file and the multi-schema feature into [General Availability](https://www.prisma.io/docs/orm/more/releases#generally-available-ga). 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.ts`](https://www.prisma.io/docs/orm/reference/prisma-config-reference) file 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 `seed` command to populate your database based on some executable script - externally 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 `db` directory: ```tsx 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.seed` command in `package.json`. We’re excited to move the [`prisma.config.ts`](https://www.prisma.io/docs/orm/reference/prisma-config-reference) file into General Availability. If you used it before in your projects, you can now drop `earlyAccess` from its options: ```diff 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 `experimental` field. For example, usage of `adapters` is currently still in Preview: ```tsx 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}`, where `extension` is the same one as file extensions above. 📚 Learn more [in the docs](https://www.prisma.io/docs/orm/reference/prisma-config-reference). ### 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 `@@schema` attribute: ```tsx 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 `multiSchema` feature flag from the `generator` block in your Prisma schema: ```diff generator client { // ... - previewFeatures = ["multiSchema"] } ``` 📚 Learn more [in the docs](https://www.prisma.io/docs/orm/prisma-schema/data-model/multi-schema). ### 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`, `@index` and `@unique` can’t be used on a `view` block 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 `findUnique` queries and cursor-based pagination in Prisma Client - disallowed 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](https://www.prisma.io/docs/orm/prisma-schema/data-model/views). ### 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 `tables` option in `prisma.config.ts`: ```tsx // prisma.config.ts export default defineConfig({ tables: { external: [ "users", ] }, ... }) ``` A typical use case for this is the [`users` table from Supabase](https://supabase.com/docs/guides/auth/managing-user-data) which you never want be changed by Prisma Migrate but still may want to query with Prisma Client. 📚 Learn more [in the docs](https://www.prisma.io/docs/orm/prisma-schema/data-model/externally-managed-tables). ## Other news ### [`pgvector`](https://github.com/pgvector/pgvector) extension support for Prisma Postgres (Early Access) In this release, we’ve implemented a highly popular feature request for Prisma Postgres: [Early Access](https://www.prisma.io/docs/platform/maturity-levels#early-access) support for the [`pgvector`](https://github.com/pgvector/pgvector) PostgreSQL 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. `pgvector` essentially 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 `pgvector` in Prisma ORM is going to follow soon, until then you can use `pgvector` via [custom migrations](https://www.prisma.io/docs/orm/prisma-migrate/workflows/customizing-migrations) and [TypedSQL](https://www.prisma.io/blog/announcing-typedsql-make-your-raw-sql-queries-type-safe-with-prisma-orm). > **Note**: For now, `pgvector` is 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 for `pg_search`, `pg_stat_statements`, `citext`, `pg_trgm`, `fuzzystrmatch`, and `unaccent`. If you don’t see the extension you need, you can [request it here](https://pris.ly/i-want-extensions). 📚 Learn more [in the docs](https://www.prisma.io/docs/postgres/database/postgres-extensions). ### 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](https://console.prisma.io/). 📚 Learn more [in the docs](https://www.prisma.io/docs/postgres/database/api-reference/management-api). ### 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: - [**Create Prisma Postgres Database Action**](https://github.com/marketplace/actions/create-prisma-postgres-database) - [**Delete Prisma Postgres Database Action**](https://github.com/marketplace/actions/delete-prisma-postgres-database) These Actions serve as the foundational building blocks for integrating Prisma Postgres into CI/CD pipelines. ![Prisma Postgres GH Actions](https://github.com/user-attachments/assets/e319ab2e-70c3-4dc2-ae88-ec6e67deb693) 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 required We launched a new CLI command that allows you to spin up a new database within seconds: ```bash 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](https://github.com/user-attachments/assets/b1e3ba6f-0a48-4b6f-8621-247943717903) Your instance will be automatically deleted after 24 hours *but* you can claim it and put it into your [Prisma Console](https://console.prisma.io) account if you want to keep using it after that period. Visit [the docs](https://www.prisma.io/docs/postgres/introduction/npx-create-db) to learn more. ### New navigation UI for [Prisma Console](https://console.prisma.io/) The [Prisma Console](https://console.prisma.io) 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](https://github.com/user-attachments/assets/7509abd2-8297-466b-bcee-57318f0e13bb) We’re eager to hear your feedback, [let us know on X](https://pris.ly/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: [https://prisma.io/enterprise](https://prisma.io/enterprise). ### 6.12.0 Today, we are excited to share the `6.12.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!** ## Highlights ### ESM-compatible `prisma-client` generator now in Preview We’re excited to share that our new and more flexible `prisma-client` generator is moving into [Preview](https://www.prisma.io/docs/orm/more/releases#preview)! As a reminder, here’s what it looks like: ```prisma 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_modules`](https://www.prisma.io/blog/why-prisma-orm-generates-code-into-node-modules-and-why-it-ll-change) and 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-client` generator will become the default in Prisma v7, replacing the current `prisma-client-js` generator. 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: - [React Router + Vite + Cloudflare](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/react-router-starter-cloudflare-workerd) - [React Router + Vite + Node.js](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/react-router-starter-nodejs) - [Nuxt 3 + Vite + Nitro](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/nuxt3-starter-nodejs) - [Deno Deploy](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/deno-deploy) 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client-preview). ### Specify `views` and `migrations` folder locations in `prisma.config.ts` (Early Access) As we’re getting closer to the [General Availability](https://www.prisma.io/docs/orm/more/releases#generally-available-ga) release of [`prisma.config.ts`](https://www.prisma.io/docs/orm/reference/prisma-config-reference), 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 (`migrations` and `views`) to give you more flexibility and clarity on how to locate these files: ```ts // prisma.config.ts export default defineConfig({ earlyAccess: true, migrations: { path: './db/migrations' }, views: { path: './db/views' } // ... }) ``` 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/reference/prisma-config-reference). <!-- ## Other news ### 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](https://console.prisma.io). 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/database/api-reference/management-api). ### New navigation UI for Prisma Console The [Prisma Console](https://console.prisma.io) 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: ![](https://cdn.sanity.io/images/p2zxqf70/production/45bd4d06a3dcc685e428b6b08df4a8c3fbadcae8-2560x1664.png) We’re eager to hear your feedback, [let us know on X](https://pris.ly/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: [https://prisma.io/enterprise](https://prisma.io/enterprise) ### 6.11.1 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 https://github.com/prisma/prisma/issues/27569. Namely, using `@prisma/client` with `@prisma/extension-accelerate` on a `prisma+postgres://...` connection string, while generating the Prisma Client definitions via `prisma generate`, resulted in a `PrismaClientInitializationError`. 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 Today, we are excited to share the `6.11.0` stable release 🎉 **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/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](https://www.prisma.io/blog/from-rust-to-typescript-a-new-chapter-for-prisma-orm). This week, we're adding Preview support for the Rust-free Prisma ORM version for MySQL via a new `@prisma/adapter-mariadb` driver adapter, as well as for Neon and CockroachDB via the already existing `@prisma/adapter-neon` and `@prisma/adapter-pg` adapters. > **Note:** The [`mariadb`](https://github.com/mariadb-corporation/mariadb-connector-nodejs) driver is compatible with all MySQL databases. It's the recommended option to use MySQL with Prisma ORM when using [driver adapters.](https://www.prisma.io/docs/orm/overview/databases/database-drivers) To use it, enable the `queryCompiler` and `driverAdapters` feature flags on your `generator` block, install the driver adapter for your database and start querying! ```prisma generator client { provider = "prisma-client-js" // or `prisma-client` output = "../generated/prisma" previewFeatures = ["queryCompiler", "driverAdapters"] } ``` 📚Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/no-rust-engine). ### Stop and remove local Prisma Postgres instances via CLI You can start a *local* Prisma Postgres instance using the `prisma dev --name mydb` command or via the [Prisma VS Code extension UI](https://www.prisma.io/docs/postgres/integrations/vscode-extension#database-management-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 instances - `prisma dev rm <globs>`: Removes one or more local Prisma Postgres instances from your file system 📚Learn more in the [docs](https://www.prisma.io/docs/postgres/database/local-development). ### Ready-to-run examples for new `prisma-client` generator Our new [`prisma-client`](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client-early-access) generator 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: - [`nextjs-starter-webpack`](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/nextjs-starter-webpack) - [`nextjs-starter-turbopack`](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/nextjs-starter-turbopack) - [`neextjs-starter-webpack-monorepo`](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/neextjs-starter-webpack-monorepo) - [`nextjs-starter-webpack-with-middleware`](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/nextjs-starter-webpack-with-middleware) ### 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](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma)? 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](https://github.com/prisma/prisma/issues/new). # 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-core`](https://www.npmjs.com/package/@prisma/studio-core) npm package. ![](https://cdn.sanity.io/images/p2zxqf70/production/d2c35b8243dd6f86ff9a353d5bb64ad79510920f-2836x981.png) [Try out the demo](https://www.github.com/prisma/studio-core-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](https://www.prisma.io/pricing?calculator). Put in the predicted storage and number of operations to see how much you're going to be charged on each plan. ![](https://cdn.sanity.io/images/p2zxqf70/production/a6a82eb9c6a5a6ab82a0d8073bf07032aa5d2fc9-2028x2082.png) ### 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: - [Next.js SaaS Starter with Drizzle ORM](https://vercel.com/templates/authentication/next-js-saas-starter) - [Postgres SvelteKit Starter with Postgres.js](https://vercel.com/templates/svelte/postgres-sveltekit) - [Next.js + PostgreSQL Auth Starter with Drizzle ORM](https://vercel.com/templates/authentication/drizzle-postgres-auth-starter) - … 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](https://www.prisma.io/docs/postgres/database/direct-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](https://x.com/prisma/status/1932784967945499021). Here are all the regions where you can spin up Prisma Postgres instances today: - **`eu-central-1`: Frankfurt (*new!*)** - `eu-west-3`: Paris - `us-west-1`: San Francisco - `us-east-1`: North Virginia - `ap-northeast-1`: Tokyo - `ap-southeast-1`: Singapore [Keep an eye on our X account](https://pris.ly/x) to take part in the poll and vote for the next availability zone of Prisma Postgres! ### 6.10.1 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 dev` command](https://www.prisma.io/docs/postgres/database/local-development) with an ORM version older than 6.10.x. ## Performance improvements The `queryCompiler` preview feature recently introduced a performance regression related to in-memory joins in TypeScript-based query execution (users who use the `queryCompiler` and the `relationJoins` preview features together were not affected, unless using `relationLoadStrategy: "query"`). This has now been fixed, leading to significant performance improvements: in our [Query Compiler benchmarks](https://github.com/prisma/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](https://github.com/user-attachments/assets/19bd87ff-2276-4c63-8ff1-9cadf933ac17) ## Other news Please see the [release notes for Prisma ORM 6.10.0](https://github.com/prisma/prisma/releases/tag/6.10.0) for other recent news and announcements. ### 6.10.0 Today, we are excited to share the `6.10.0` stable release 🎉  🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v6.10.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/6.10.0) 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 `generator` like this: ```prisma 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-mssql` and existing `@prisma/adapter-planetscale` driver adapters). 📚Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/no-rust-engine). ### Manage local Prisma Postgres instances in VS Code We recently released a [database management UI](https://www.prisma.io/docs/postgres/integrations/vscode-extension#database-management-ui) as part of the Prisma VS Code extension to enable visual database management workflows for [Prisma Postgres](https://www.prisma.io/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](https://www.prisma.io/docs/postgres/integrations/vscode-extension#database-management-ui). ### Performance improvements for `prisma migrate dev` We improved the `prisma migrate dev` command 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](https://www.prisma.io/docs/postgres/integrations/vscode-extension#database-management-ui). ### Support for shard keys on PlanetScale (Preview) [Sharding](https://planetscale.com/docs/vitess/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 `@shardKey` and `@@shardKey` attributes in the Prisma schema which you can apply to the fields in your models that should serve as shard keys in your database setup: ```prisma // 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 `shardKeys` Preview feature flag on your generator definition: ```prisma generator client { provider = "prisma-client-js" // or `prisma-client` output = "../generated/prisma" previewFeatures = ["shardKeys"] } ``` 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/overview/databases/planetscale#how-to-define-shard-keys-in-your-prisma-schema-preview). ### Other changes - We deprecated the [`pg-worker`](https://www.npmjs.com/package/@prisma/pg-worker) package. It's not needed any more, you can simply use `pg` when using Prisma ORM in Cloudflare Workers. - Entrypoint for new `prisma-client` generator changed. Learn how this affects imports in the [docs](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#4-use-prisma-client-in-your-application). ## More news ### Local Prisma Postgres now works with any ORM & tool (Early Access) We recently released [direct connections](https://www.prisma.io/docs/postgres/database/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 dev` command and use the direct connection string starting with `postgres://` in order to connect from any tool. 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/database/local-development). ### Let your favorite AI tool manage Prisma Postgres via remote MCP We just released a new [_remote_ MCP server](https://www.prisma.io/docs/postgres/integrations/mcp-server#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/mcp` command. 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/integrations/mcp-server#remote-mcp-server). ### 6.9.0 Today, we are excited to share the `6.9.0` stable release 🎉  🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v6.9.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/6.9.0) 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](https://www.prisma.io/docs/orm/more/releases#early-access) (EA) phase, now is a great time for you to get your hands on the [Rust-free Prisma ORM version](https://www.prisma.io/blog/try-the-new-rust-free-version-of-prisma-orm-early-access). This major architectural change has moved from EA into [Preview](https://www.prisma.io/docs/orm/more/releases#preview) in this release, meaning there are no more know major issues. If you want to try it out, add the `queryCompiler` and `driverAdapters` preview feature flags to your `generator`, install the driver adapter for your database, and get going: ```prisma generator client { provider = "prisma-client-js" previewFeatures = ["queryCompiler", "driverAdapters"] output = "../generated/prisma" } ``` Now run `prisma generate` to re-generate Prisma Client. If you didn't use a [driver adapter](https://www.prisma.io/docs/orm/overview/databases/database-drivers#driver-adapters) before, you'll need to install, e.g. the one for PostgreSQL: ``` npm install @prisma/adapter-pg ``` Once installed, you can instantiate `PrismaClient` as follows: ```ts 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](https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/no-rust-engine). ### 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 dev` command. [Local Prisma Postgres](https://www.prisma.io/blog/prisma-6-8-0-release#local-development-for-prisma-postgres-early-access) 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 dev` invocations. - Enables you to have multiple local Prisma Postgres instances running at the same time. - Running `prisma init` now uses local Prisma Postgres by default. Try it out and let us know what you think! 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/database/local-development). ## More news ### Connect to Prisma Postgres with any ORM (Preview) Since its [GA release](https://www.prisma.io/blog/prisma-postgres-the-future-of-serverless-databases), you could only interact with Prisma Postgres using Prisma ORM via a [custom connection string](https://www.prisma.io/docs/orm/reference/connection-urls#prisma-postgres). 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](https://www.prisma.io/docs/postgres/database/serverless-driver) (Early Access). 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/database/direct-connections). ### 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](https://www.prisma.io/docs/postgres/database/backups). ### 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](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma) 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](https://console.prisma.io) - 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](https://cdn.sanity.io/images/p2zxqf70/production/f7a4f862f7f12d96c98eafef1b6bf0f2d0cac943-3740x1964.png) 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](https://www.prisma.io/docs/postgres/integrations/vscode-extension#database-management-ui). ### 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](https://x.com/prisma/status/1924494260910612841). Here are all the regions where you can spin up Prisma Postgres instances today: - **`us-west-1`: San Francisco (_new!_)** - `us-east-1`: North Virginia - `eu-west-3`: Paris - `ap-northeast-1`: Tokyo - `ap-southeast-1`: Singapore [Keep an eye on our X account](https://pris.ly/x) to take part in the poll and vote for the next availability zone of Prisma Postgres! ### 6.8.2 Today, we are issuing the 6.8.2 patch release. It fully resolves an issue with the `prisma init` and `prisma dev` commands for some Windows users who were still facing problems after the previous incomplete fix in version 6.8.1. Fixes: * https://github.com/prisma/prisma/issues/27195 ### 6.8.1 Today, we are issuing the 6.8.1 patch release. It fixes an issue with the `prisma init` and `prisma dev` commands on Windows. Fixes - https://github.com/prisma/prisma/issues/27192 ### 6.8.0 Today, we are excited to share the `6.8.0` stable release 🎉  🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v6.8.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/6.8.0) 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 dev` command: ```bash 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 `url` of your `datasource` block to point to a local Prisma Postgres instance. It looks similar to this: ```prisma 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 dev` process running in order to interact with the local Prisma Postgres instance. 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/database/local-development). ### Native Deno support in `prisma-client` generator (Preview) In this release, we're removing the `deno` Preview feature from the `prisma-client-js` generator. If you want to use Prisma ORM with Deno, you can now do so with the new [`prisma-client`](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client-early-access) generator: ```prisma generator client { provider = "prisma-client" output = "../src/generated/prisma" runtime = "deno" } ``` 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-deno-deploy). ### VS Code Agent Mode: AI support with your database workflows Have you tried [agent mode in VS Code](https://code.visualstudio.com/blogs/2025/04/07/agentMode) 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](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma) and your agent is ready to go 🚀 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/integrations/vscode-agent). ## Other news ### You voted, we acted: New Singapore region for Prisma Postgres We recently [ran a poll](https://x.com/prisma/status/1916808960868552943) 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-1` region. We're not stopping here — [keep an eye out on X](https://pris.ly/x) for another poll asking for your favorite regions that we should add! ### 6.7.0 Today, we are excited to share the `6.7.0` stable release 🎉  🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v6.7.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/6.7.0) 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](https://www.prisma.io/blog/from-rust-to-typescript-a-new-chapter-for-prisma-orm) and already shared [the first measurements of performance boosts](https://www.prisma.io/blog/rust-to-typescript-update-boosting-prisma-orm-performance) 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](https://www.prisma.io/docs/orm/more/releases#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_) and `driverAdapters` feature flags to your client generator: ```prisma generator client { provider = "prisma-client-js" previewFeatures = ["queryCompiler", "driverAdapters"] output = "../generated/prisma" } ``` Now run `prisma generate` to re-generate Prisma Client. If you didn't use a [driver adapter](https://www.prisma.io/docs/orm/overview/databases/database-drivers#driver-adapters) before, you'll need to install one. For example, the one for PostgreSQL: ``` npm install @prisma/adapter-pg ``` Once installed, you can instantiate `PrismaClient` as follows: ```ts 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 `PrismaClient` doesn't have a Query Engine binary and you can use it in the exact same way as before. 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/no-rust-engine). ### Support for `better-sqlite3` JavaScript driver (Preview) [Driver adapters](https://www.prisma.io/docs/orm/overview/databases/database-drivers) are Prisma ORM's way of letting you use JS-native drivers (like [`pg`](https://node-postgres.com/)) to interact with your database. In this release, we're introducing a new driver adapter for using the [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) package, so you can now interact with SQLite database in a JS-native way. To use it, first enable the `driverAdapters` Preview feature flag in on your client `generator`, then install these libraries: ``` npm install @prisma/adapter-better-sqlite3 ``` Now you can instantiate Prisma Client as follows: ```ts 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](https://www.prisma.io/docs/orm/overview/databases/sqlite#using-the-better-sqlite3-driver). ### Multi-file Prisma schemas are now production-ready The `prismaSchemaFolder` Preview 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 generator ```prisma datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" } ``` **`prisma/models/posts.prisma`** → defines `Post` model ```prisma model 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`** → defines `User` model ```prisma model User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] } ``` ⚠️ Note that there have been [breaking changes to the `prismaSchemaFolder` Preview feature in the last 6.6.0 release](https://github.com/prisma/prisma/releases/tag/6.6.0). 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](https://www.prisma.io/docs/orm/prisma-schema/overview/location#multi-file-prisma-schema). ### Splitting generated output with new `prisma-client` generator (Preview) With the `prisma-client-js` generator, the generated Prisma Client library is put into a single `index.d.ts` file. This sometimes led to [issues](https://github.com/prisma/prisma/issues/4807) 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-client` generator (that was released in [6.6.0](https://github.com/prisma/prisma/releases/tag/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.node ``` **After** ``` 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](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#output-splitting-and-importing-types). ## 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: - [Announcing: Prisma Postgres Integration for Vercel Marketplace](https://www.prisma.io/blog/connect-your-apps-to-prisma-postgres-via-vercel-marketplace-integration) - [Securely Access Prisma Postgres from the Frontend (Early Access)](https://www.prisma.io/blog/securely-access-prisma-postgres-from-the-frontend-early-access) - [Announcing Prisma's MCP Server: Vibe Code with Prisma Postgres](https://www.prisma.io/blog/announcing-prisma-s-mcp-server-vibe-code-with-prisma-postgres) ### 6.6.0 Today, we are excited to share the `6.6.0` stable 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](https://pris.ly/6.6.0-release?utm_source=github&utm_medium=6.6.0-release-notes) 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [posting on X](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v6.6.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/6.6.0) about the release.** 🌟 ## Highlights ### ESM support with more flexible `prisma-client` generator (Early Access) We are excited to introduce a new `prisma-client` generator that's more flexible, comes with ESM support and removes any magic behaviours that may cause friction with the current `prisma-client-js` generator. > **Note**: The `prisma-client` generator is currently in [Early Access](https://www.prisma.io/docs/orm/more/releases#early-access) and will likely have some breaking changes in the next releases. Here are the main differences: - Requires an `output` path; no “magic” generation into `node_modules` any more - Supports ESM and CommonJS via the `moduleFormat` field - Outputs plain TypeScript that's bundled just like the rest of your application code Here's how you can use the new `prisma-client` generator in your Prisma schema: ```prisma // 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 `PrismaClient` constructor (and anything else) from the generated folder: ```ts // src/index.ts import { PrismaClient } from './generated/prisma/client' ``` **⚠️ Important:** We recommend that you add the `output` path to `.gitignore` so that the query engine that's part of the generated Prisma Client is kept out of version control: ```bash # .gitignore ./src/generated/prisma ``` 📚 Learn more in the [docs](https://www.prisma.io/docs/orm/prisma-schema/overview/generators#prisma-client-early-acess). ### 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](https://www.prisma.io/docs/orm/more/releases#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 schema - `prisma db pull`: Introspects the schema of the remote database and updates your local Prisma schema - `prisma migrate diff`: Outputs the difference between the schema of the remote database and your local Prisma schema > **Note**: Support for `prisma migrate dev` and `prisma migrate deploy` will 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.ts`](https://www.prisma.io/docs/orm/reference/prisma-config-reference) file. Here is an example for D1: ```ts 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: - [Cloudflare D1](https://www.prisma.io/docs/orm/overview/databases/cloudflare-d1) - [Turso / LibSQL](https://www.prisma.io/docs/orm/overview/databases/turso) ### MCP server to manage Prisma Postgres via LLMs (Preview) [Prisma Postgres](https://www.prisma.io/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: ```json { "mcpServers": { "Prisma": { "command": "npx", "args": ["-y", "prisma", "mcp"] } } } ``` 📚 Learn more in the [docs](https://www.prisma.io/docs/postgres/mcp-server). ### New `--prompt` option on `prisma init` You can now pass a `--prompt` option to the `prisma init` command 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 `--vibe` for 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](https://www.prisma.io/docs/orm/overview/databases/database-drivers#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/client` driver for LibSQL: ```typescript 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.: ```typescript 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 ### `prismaSchemaFolder` breaking changes If you are using the `prismaSchemaFolder` Preview 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: - pass the the `--schema` option to your Prisma CLI command (e.g. `prisma migrate dev --schema ./prisma/schema`) - set the `prisma.schema` field in `package.json`: ```jsonc // package.json { "prisma": { "schema": "./schema" } } ``` - set the `schema` property in `prisma.config.ts`: ```ts import path from 'node:path' import type { PrismaConfig } from 'prisma' export default { earlyAccess: true, schema: path.join('prisma', 'schema'), } satisfies PrismaConfig<Env> ``` #### `migrations` folder must live next to `.prisma` file with `datasource` block Your `migrations` directory must live next to the `.prisma` file that defines your `datasource` blog. If you relied on the implicit schema folder location of `./prisma/schema` make sure to **move your migrations folder from `./prisma/migrations` to `./prisma/schema/migrations`**. Assuming `schema.prisma` defines the `datasource` in this example, here's how how need to place the `migrations` folder: ```bash # `migrations` and `schema.prisma` are on the same level . ├── migrations ├── models │   ├── posts.prisma │   └── users.prisma └── schema.prisma ``` See this [PR](https://github.com/prisma/prisma/pull/26663) for more details. ### No more Bun issues if Node.js is not installed Bun users reported an [issue](https://github.com/prisma/prisma/issues/26560) that `prisma generate` would 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](https://www.prisma.io/enterprise#contact-us) for Prisma ORM. Get direct help from our team and a joint slack channel! With [Prisma ORM 7](https://www.prisma.io/blog/rust-to-typescript-update-boosting-prisma-orm-performance) 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](https://ats.rippling.com/en-GB/prisma-careers/jobs/cb7cea20-ada5-4cf8-8c91-174c7acd3047). ### 6.5.0 Today, we are excited to share the `6.5.0` stable release 🎉 🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v6.5.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/6.5.0) about the release.** 🌟 ## Highlights ### Databases can only be reset manually and explicitly In previous versions, if Prisma ORM determined that a `migrate` command 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 reset` directly. ### Support for `prisma.config.ts` in Prisma Studio We've expanded support for our `prisma.config.ts` file 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 `studio` block to your `prisma.config.ts` file: ```ts 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 PrismaConfig ``` Notice how this looks a little different from last release! Instead of an `@prisma/config` package there’s now two different options: 1. Using the `defineConfig` helper exported by `prisma/config`. 2. Using the `PrismaConfig` utility type exported by `Prisma`. All the relevant info for the `prisma.config.ts` file, including these new ways of defining your config, [can be found in our docs](https://www.prisma.io/docs/orm/reference/prisma-config-reference). ### Allow for chaining `$on` and `$extends`. In previous versions of Prisma ORM, the return type of the `$on` client method was `void`. This did not allow for chaining `$on()` and `$extends()` calls, as `$on` is not available on extended clients. In this version we've resolved this issue and `$on` will 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](https://github.com/prisma/prisma/pull/23001). Thank you @RaHehl! - [Enhance type safety of the AtLeast utility type](https://github.com/prisma/prisma/pull/24056). Thank you @de-novo! - [Resolve a race condition in the NextJS monorepo plugin](https://github.com/prisma/prisma/pull/21370). Thank you @toniopelo! - [allow for filtering out spans with PrismaInstrumentation](https://github.com/prisma/prisma/pull/20113). Thank you @overbit! ## Prisma is hiring Join us at Prisma and work on [our TypeScript ORM (now faster than ever)](https://www.prisma.io/blog/rust-to-typescript-update-boosting-prisma-orm-performance) and our Cloud products [like Prisma Postgres (now in GA!)](https://www.prisma.io/blog/prisma-postgres-the-future-of-serverless-databases) We currently have two open roles in our Engineering team: - [Developer Support Engineer (Americas)](https://ats.rippling.com/prisma-careers/jobs/99a4a4e0-02ff-4e0a-867e-3730bcd9b6c3) - [Senior Engineering Manager](https://ats.rippling.com/prisma-careers/jobs/0f9295a1-6111-4814-bf9b-a5eb2002bf34) If these don’t fit, you can still check out our [jobs page](https://www.prisma.io/careers) and send a general application. ## Enterprise support Prisma offers an [enterprise support plan](https://www.prisma.io/enterprise#contact-us) for Prisma ORM. Get direct help from our team and a joint slack channel! [With Prisma ORM 7 on the horizon](https://www.prisma.io/blog/rust-to-typescript-update-boosting-prisma-orm-performance) this is a great time to upgrade your support today. ## Credits Thank you to @overbit, @RaHehl, @toniopelo, and @de-novo for your contributions to this release! --- ✨ This PR was created by Minori, your friendly dependency updater! 🌸
minori added 1 commit 2026-02-03 19:25:29 -08:00
deps: update @prisma/client to 7.3.0
Node.js CI / CI (pull_request) Failing after 29s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m17s
1e8edd4eb1
Some required checks failed
Node.js CI / CI (pull_request) Failing after 29s
Required
Details
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m17s
This pull request doesn't have enough required approvals yet. 0 of 1 approvals granted from users or teams on the allowlist.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dependencies/update--prisma-client:dependencies/update--prisma-client
git checkout dependencies/update--prisma-client
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/rig-task-bot#2