Download Latest Version 6.14.0 source code.tar.gz (14.0 MB)
Email in envelope

Get an email when there's a new version of Prisma

Home / 6.14.0
Name Modified Size InfoDownloads / Week
Parent folder
6.14.0 source code.tar.gz 2025-08-12 14.0 MB
6.14.0 source code.zip 2025-08-12 16.2 MB
README.md 2025-08-12 6.5 kB
Totals: 3 Items   30.2 MB 17

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:

:::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?
}
Expand to view the SQL code for this view :::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;

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.

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.

Big fixes in Prisma Console

  • Fixed a 500 HTTP error happening after session expiration
  • Fixed a bug around updating notification settings
  • Fixed a bug where some settings pages didn't show the aside menu

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.
Source: README.md, updated 2025-08-12