Skip to content

chore(deps): update dependency prisma to v6 #639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 27, 2021

This PR contains the following updates:

Package Change Age Confidence
prisma (source) 1.34.12 -> 6.13.0 age confidence

Release Notes

prisma/prisma (prisma)

v6.13.0

Compare Source

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: Support for the pgvector PostgreSQL extension in Early Access!

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.

📚 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.

v6.12.0

Compare Source

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

v6.11.1

Compare Source

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.

v6.11.0

Compare Source

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!

v6.10.1

Compare Source

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.

v6.10.0

Compare Source

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 @@&#8203;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 @&#8203;default(uuid())
  region String @&#8203;shardKey
}

// Multi-column shard key
model User {
  id         String @&#8203;default(uuid())
  country    String
  customerId String
  @&#8203;@&#8203;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.

v6.9.0

Compare Source

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 @&#8203;prisma/adapter-pg

Once installed, you can instantiate PrismaClient as follows:

import { PrismaClient } from './generated/prisma'
import { PrismaPg } from '@&#8203;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!

v6.8.2

Compare Source

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:

v6.8.1

Compare Source

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

v6.8.0

Compare Source

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!

v6.7.0

Compare Source

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 @&#8203;prisma/adapter-pg

Once installed, you can instantiate PrismaClient as follows:

import { PrismaPg } from '@&#8203;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 @&#8203;prisma/adapter-better-sqlite3

Now you can instantiate Prisma Client as follows:

import { PrismaBetterSQLite3 } from '@&#8203;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     @&#8203;id @&#8203;default(autoincrement())
  title     String
  content   String?
  published Boolean @&#8203;default(false)
  author    User?   @&#8203;relation(fields: [authorId], references: [id])
  authorId  Int?
}

prisma/models/users.prisma → defines User model

model User {
  id    Int     @&#8203;id @&#8203;default(autoincrement())
  email String  @&#8203;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:

v6.6.0

Compare Source

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 '@&#8203;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


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from eb59a7f to 424c8b6 Compare February 8, 2021 10:17
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 424c8b6 to 125ffaf Compare February 16, 2021 13:41
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 125ffaf to 3ef39e2 Compare March 2, 2021 15:06
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 3ef39e2 to 568b4ad Compare March 16, 2021 16:21
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 3221bb9 to 6db2aeb Compare March 31, 2021 09:04
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 3 times, most recently from 1d457ab to fe68bbc Compare April 15, 2021 16:17
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 738aa10 to a8668ea Compare May 7, 2021 10:17
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from a8668ea to 10682ec Compare May 19, 2021 09:44
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from b180921 to a74dd55 Compare June 3, 2021 18:14
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from a74dd55 to aa3ff03 Compare June 15, 2021 15:33
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from aa3ff03 to 85a14c9 Compare June 29, 2021 10:41
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 85a14c9 to 2ff8956 Compare July 13, 2021 13:24
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 2ff8956 to 564c4e3 Compare July 27, 2021 09:51
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 899740b to 01fbaee Compare August 13, 2021 14:05
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 01fbaee to 64d070c Compare October 18, 2021 19:44
@renovate renovate bot changed the title chore(deps): update dependency prisma to v2 chore(deps): update dependency prisma to v3 Oct 18, 2021
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 64d070c to 84597f5 Compare March 7, 2022 09:43
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 84597f5 to a9e872e Compare March 26, 2022 12:52
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from a9e872e to 13bbcf9 Compare April 24, 2022 18:56
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 13bbcf9 to 04dfbef Compare May 15, 2022 19:55
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 04dfbef to 9c409d4 Compare June 18, 2022 13:51
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 9c409d4 to 2c2e8dc Compare September 25, 2022 12:44
@renovate renovate bot changed the title chore(deps): update dependency prisma to v3 chore(deps): update dependency prisma to v4 Sep 25, 2022
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from b5d9467 to e463d91 Compare August 6, 2024 16:56
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 94b24d7 to f73b7b5 Compare September 2, 2024 16:37
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from f73b7b5 to 5695a4f Compare September 24, 2024 16:27
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from d4bff18 to e9343bf Compare October 17, 2024 19:01
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from e9343bf to c96bc4b Compare November 5, 2024 17:16
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from c96bc4b to cb77108 Compare November 28, 2024 19:00
@renovate renovate bot changed the title chore(deps): update dependency prisma to v5 chore(deps): update dependency prisma to v6 Nov 28, 2024
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from cb77108 to ea6ba61 Compare December 2, 2024 16:00
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from ea6ba61 to 2470428 Compare December 17, 2024 20:44
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 2470428 to 0a1ffcd Compare January 8, 2025 15:06
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 5ecef22 to 4318804 Compare February 4, 2025 12:50
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from f5b8819 to ca74b58 Compare February 20, 2025 19:14
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from ca74b58 to 096d395 Compare March 11, 2025 17:57
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 096d395 to 9068ce9 Compare April 8, 2025 22:29
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 9068ce9 to f524210 Compare April 29, 2025 16:37
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 3 times, most recently from 8edea59 to 24e3b48 Compare May 16, 2025 18:59
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 24e3b48 to fadc1cb Compare June 3, 2025 21:06
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 0bba9d4 to 582e840 Compare June 18, 2025 21:51
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch 2 times, most recently from 9040ada to 9d66346 Compare July 3, 2025 17:08
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from 9d66346 to c7829ef Compare July 15, 2025 17:35
@renovate renovate bot force-pushed the renovate/major-prisma-monorepo branch from c7829ef to 54abb16 Compare August 7, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants