generated from nhcarrigan/template
deps: update prisma to 7.3.0 #9
Open
minori
wants to merge 1 commits from
dependencies/update-prisma into main
pull from: dependencies/update-prisma
merge into: nhcarrigan:main
nhcarrigan:main
nhcarrigan:dependencies/update--types-node
nhcarrigan:dependencies/update--anthropic-ai-sdk
nhcarrigan:dependencies/update-eslint
nhcarrigan:dependencies/update-fastify
nhcarrigan:dependencies/update-vitest
nhcarrigan:dependencies/update-typescript
nhcarrigan:dependencies/update--vitest-coverage-istanbul
nhcarrigan:dependencies/update--nhcarrigan-eslint-config
nhcarrigan:dependencies/update-discord.js
nhcarrigan:dependencies/update--prisma-client
No Reviewers
Labels
Clear labels
aspect
code
Concerns the software code in the repository
aspect
dx
Concerns developers' experience with the codebase
aspect
interface
Concerns end-users' experience with the software
aspect
text
Concerns the documentation material in the repository
contribute
good first issue
A great opportunity for a team member to learn a new codebase
contribute
help wanted
Open for anyone on our team to grab.
contribute
staff only
Restricted to our executive leadership.
goal
addition
Addition of new feature
goal
fix
Bug fix
goal
improvement
Improvement to an existing feature
points
1
Very simple issue requiring minimal effort and complexity.
points
13
Extremely complex issue representing major undertakings. Should be broken down into smaller pieces.
points
2
Simple issue that requires a bit more thought or investigation.
points
3
Moderate complexity issue requiring more substantial work.
points
5
Complex issue requiring significant effort and expertise.
points
8
Very complex issue requiring extensive work and deep expertise.
priority
critical
1
Must be fixed ASAP
priority
high
2
Stalls work on the project or its dependents
priority
low
4
Low priority and doesn't need to be rushed
priority
medium
3
Not blocking but should be fixed soon
priority
none
5
No priority, should only be performed when a developer is available
status
awaiting triage
Has not been triaged & therefore, not ready for work
status
blocked
Blocked and therefore not ready for work
status
discarded
Will not be worked on
status
discontinued
Not suitable for work as repo is in maintenance
status
label work required
Needs proper labelling before it can be worked on
status
ready for dev
Ready for work
status
ticket work required
Needs more details before it can be worked on
talk
discussion
Open for discussions and feedback
talk
question
Can be resolved with an answer
time
1 day
Approximately one full day of development work.
time
1-2 weeks
One to two weeks of focused development effort.
time
2-3 days
Two to three days of development effort.
time
4-5 days
Approximately one week of development work.
time
<1 day
Less than one day of focused work. Quick fixes or simple tasks.
time
>2 weeks
More than two weeks of development work. Must be broken down into smaller pieces.
No Label
Milestone
No items
No Milestone
Assignees
gurkirat
hanna (Hanna Rose)
hikari (Hikari)
minori (Minori)
naomi (Naomi Carrigan)
rain
teklu
tim
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: nhcarrigan/gwen-abalise#9
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "dependencies/update-prisma"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dependency Update
Updates prisma from
6.4.1to7.3.0.Type
devDependencies
Changelog
Changelog
7.3.0
Today, we are excited to share the
7.3.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
ORM
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
compilerBuildoption for the client generator block inschema.prismawith two options:fastandsmall. This allows you to swap the underlying Query Compiler engine based on your selection, one built for speed (with an increase in size), and one built for size (with the trade off for speed). By default, thefastmode is used, but this can be set by the user:We still have more in progress for performance, but this new
compilerBuildoption 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-mssqlto 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-sqlite3adapter. We’ve bumped the version that powers@prisma/better-sqlite3and have pinned the version to prevent any unexpected issues. If you are using@prisma/better-sqlite3, please upgrade to v7.3.0.#29002: Revert
@mapenums to v6.19.0 behaviorIn the initial release of v7.0, we made a change with Mapped Enums where the generated enum would get its value from the value passed to the
@mapfunction. This was a breaking change from v6 that caused issues for many users. We have reverted this change for the time being, as many different diverging approaches have emerged from the community discussion.prisma-engines#5745: Cast BigInt to text in JSON aggregation
When using
relationJoinswith BigInt fields in Prisma 7, JavaScript'sJSON.parseloses precision for integers larger thanNumber.MAX_SAFE_INTEGER(2^53 - 1). This happens because PostgreSQL'sJSONB_BUILD_OBJECTreturns BigInt values as JSON numbers, which JavaScript cannot represent precisely.This PR cast BigInt columns to
::textinsideJSONB_BUILD_OBJECTcalls, similar to howMONEYis already cast to::numeric.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.
7.2.0
Today, we are excited to share the
7.2.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
Highlights
ORM
sqlcommenter-query-insightsplugin-urlparam fordb pull,db push,migrate dev-urlflag to key migrate commands to make connection configuration more flexible.prisma generateprisma generate) to proceed even when URLs are undefined.prisma initbased on the JS runtime (Bun vs others)prisma inittailor generated setup depending on whether the runtime is Bun or another JavaScript runtime.DataMapperErroraUserFacingErrorDataMapperErroris surfaced as a user-facing error for clearer, more actionable error reporting.22P02).prisma version --jsonemit JSON only to stdoutVS Code Extension
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.1.0
Today, we are excited to share the
7.1.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!
This release brings quality of life improvements and fixes various bugs.
Prisma ORM
#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:
traceContextSQL 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/apias external in instrumentationEnsures
@opentelemetry/apiis treated as an external dependency rather than bundled.Since it is a peer dependency, this prevents applications from ending up with duplicate copies of the package.
#28694: allow
env()helper to accept interface-based genericsUpdates 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:
For folks still on Prisma v6, install version
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:
Basic usage
Pass an array of SQL commenter plugins to the new
commentsoption when creating aPrismaClientinstance:Query tags
The
@prisma/sqlcommenter-query-tagspackage lets you add arbitrary tags to queries within an async context:Resulting SQL:
Use
withMergedQueryTagsto merge tags with outer scopes:Trace context
The
@prisma/sqlcommenter-trace-contextpackage adds W3C Trace Context (traceparent) headers for distributed tracing correlation:When tracing is enabled and the span is sampled:
Custom plugins
Create your own plugins to add custom metadata:
Framework integration
SQL comments work seamlessly with popular frameworks, e.g., Hono:
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
Prisma Studio:
Prisma CLI
prisma migrate diff(via https://github.com/prisma/prisma-engines/pull/5699)prisma db seedis run, but nomigrations.seedcommand is specified in the Prisma config file (via https://github.com/prisma/prisma/pull/28711)enginescheck inpackage.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
cockroachdbsupport inprisma-client-jsgenerator, after it was accidentally not shipped in Prisma 7.0.0 (via https://github.com/prisma/prisma/pull/28690)@prisma/better-sqlite3
better-sqlite3to^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.0stable release 🎉🌟 Star this repo for notifications about new releases, bug fixes & features — and follow us on X!
Highlights
Over the past year we focused on making it simpler and faster to build applications with Prisma, no matter what tools you use or where you deploy, with exceptional developer experience at it’s core. This release makes many features introduced over the past year as the new defaults moving forward.
Prisma ORM
ESM Prisma Client as the default
The Rust-free/ESM Prisma Client has been in the works for some time now, all the way back to v6.16.0, with early iterations being available for developers to adopt. Now with version 7.0, we’re making this the default for all new projects. With this, developers are able to get:
Adopting the new client is as simple as swapping the
prisma-client-jsprovider forprisma-clientin your mainschema.prisma:Prisma Client changes
In v7, we've moved to requiring users pass either an adapter or
accelerteUrlwhen creating a new instance ofPrismaClient.For Driver Adapters
For other databases:
We’ve also removed support for additional options when configuring your Prisma Client
new PrismaClient({ datasources: .. })support has been removednew PrismaClient({datasourceUrl: ..})support has been removednew PrismaClient()support has been removednew PrismaClient({})support has been removedFor Prisma Accelerate users:
Generated Client and types move out of
node_modulesWhen running
prisma generate, the generated Client runtime and project types will now require aoutputpath to be set in your project’s mainschema.prisma. We recommend that they be generated inside of your project’ssrcdirectory to ensure that your existing tools are able to consume them like any other piece of code you might have.Update your code to import
PrismaClientfrom this generated output:For developers who still need to stay on the
prisma-client-jsbut are using the newoutputoption, theres’s a new required package,@prisma/client-runtime-utils, which needs to be installed:Removal of implicit Prisma commands
In previous releases, Prisma would run
generateandseedin various situations:prisma generateprisma migratewould runprisma generateandprisma seedThis behaviour has been removed in favor of explicitly requiring commands to be run by users.
Removal of
prisma generateflagsFor
prisma generate, we’ve removed a few flags that were no longer needed:prisma generate --data-proxyprisma generate --accelerateprisma generate --no-engineprisma generate --allow-no-modelsRemoval of
prisma dbflagsFor
prisma db, we’ve removed the following flag:prisma db pull --local-d1This 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:
Removal of
prisma migrateflagsFor
prisma migrate diff, we’ve removed the following flags:prisma --[from/to]-schema-datamodel--[from/to]-schema. The usage is otherwise the same.prisma --[from/to]-url,prisma --[from/to]-schema-datasource--[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--[from/to]-config-datasource. The user is expected to populate the datasource in the config file and use the new flag with a minor complication due to the fact that it needs to reference the local D1 database. OurlistLocalDatabaseshelper function can be used for that, analogously to thedb pull --local-d1example above (where the user sets the datasource URL tofile://${listLocalDatabases().pop()})MongoDB support in Prisma 7
Currently, MongoDB is not supported in Prisma 7. For folks using MongoDB, please stay on Prisma v6. We aim to add support for MongoDB in a future release.
Driver Adapter naming updates
We’ve standardized our naming conventions for the various driver adapters internally. The following driver adapters have been updated:
PrismaBetterSQLite3⇒PrismaBetterSqlite3PrismaD1HTTP⇒PrismaD1HttpPrismaLibSQL⇒PrismaLibSqlPrismaNeonHTTP⇒PrismaNeonHttpSchema and config file updates
As part of a larger change in how the Prisma CLI reads your project configuration, we’ve updated what get’s set the schema, and what gets set in the
prisma.config.ts. Also as part of this release,prisma.config.tsis now required for projects looking to perform introspection and migration.Schema changes
datasource.urlis now configured in the config filedatasource.shadowDatabaseUrlis now configured in the config filedatasource.directUrlhas been made unnecessary and has removedgenerator.runtime=”react-native”has been removedFor early adopters of the config file, a few things have been removed with this release
engine: 'js'| 'classic'has been removedadapterhas been removedA brief before/after:
Explicit loading of environment variables
As part of the move to Prisma config, we’re no longer automatically loading environment variables when invoking the Prisma CLI. Instead, developers can utilize libraries like
dotenvto manage their environment variables and load them as they need. This means you can have dedicated local environment variables or ones set only for production. This removes any accidental loading of environment variables while giving developers full control.Removed support for
prismakeyword inpackage.jsonIn previous releases, users could configure their schema entry point and seed script in a
prismablock in thepackage.jsonof their project. With the move toprisma.config.ts, this no longer makes sense and has been removed. To migrate, use the Prisma config file instead: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)DataProxyEngineandAccelerateEngine(Accelerate uses a newRemoteExecutornow)ReactNativeEngineDeprecated metrics feature has been removed
We deprecated the previewFeature
metricssome time ago, and have removed it fully for version 7. If you need metrics related data available, you can use the underlying driver adapter itself, like the Pool metric from the Postgres driver.Miscellaneous
WeakRefin Cloudflare Workers. This will now avoid any unexpected memory leaks.--urlflag fromprisma db pullprisma introspectcommand./wasmto/edgeprisma-client-js/edge→ meant “for Prisma Accelerate”/wasm→ meant “for Edge JS runtimes (e.g., Cloudflare, Vercel Edge)”/edge→ means “for Edge JS runtimes (e.g., Cloudflare, Vercel Edge)”PRISMA_CLI_QUERY_ENGINE_TYPEPRISMA_CLIENT_ENGINE_TYPEPRISMA_QUERY_ENGINE_BINARYPRISMA_QUERY_ENGINE_LIBRARYPRISMA_GENERATE_SKIP_AUTOINSTALLPRISMA_SKIP_POSTINSTALL_GENERATEPRISMA_GENERATE_IN_POSTINSTALLPRISMA_GENERATE_DATAPROXYPRISMA_GENERATE_NO_ENGINEPRISMA_CLIENT_NO_RETRYPRISMA_MIGRATE_SKIP_GENERATEPRISMA_MIGRATE_SKIP_SEEDMapped enums
If you followed along on twitter, you will have seen that we teased a highly-request user feature was coming to v7.0. That highly-requested feature is…. mapped emuns! We now support the
@mapattribute for enum members, which can be used to set their expected runtime valuesNew Prisma Studio comes to the CLI
We launched a new version of Prisma Studio to our Console and VS Code extension a while back, but the Prisma CLI still shipped with the older version.
Now, with v7.0, we’ve updated the Prisma CLI to include the new Prisma Studio. Not only are you able to inspect your database, but you get rich visualization to help you understand connected relationships in your database. It’s customizable, much smaller, and can inspect remote database by passing a
--urlflag. This new version of Prisma Studio is not tied to the Prisma ORM, and establishes a new foundation for what comes next.Currently, the new studio only supports Postgres, MySQL, and SQLite, with support for other databases coming in a future release.
For issues related to Prisma Studio, please direct them to the Studio repo on github.
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.
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.
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.9.0
Today, we are excited to share the
6.9.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Prisma ORM without Rust engines for PostgreSQL & SQLite (Preview)
If you've been excited about our work of removing the Rust engines from Prisma ORM but hesitated trying it out because it was in an Early Access (EA) phase, now is a great time for you to get your hands on the Rust-free Prisma ORM version.
This major architectural change has moved from EA into Preview in this release, meaning there are no more know major issues. If you want to try it out, add the
queryCompileranddriverAdapterspreview feature flags to yourgenerator, install the driver adapter for your database, and get going:Now run
prisma generateto re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install, e.g. the one for PostgreSQL:Once installed, you can instantiate
PrismaClientas follows:No more hassle with query engines, binary targets and an even smoother experience in serverless and edge environments!
📚 Learn more in the docs.
Major improvements for local Prisma Postgres (Preview)
In the last release, we enabled you to spin up a Prisma Postgres instance locally via the new
prisma devcommand. Local Prisma Postgres uses PGlite under the hood and gives you an identical experience as you get with a remote Prisma Postgres instance.This release brings major improvements to this feature:
prisma devinvocations.prisma initnow uses local Prisma Postgres by default.Try it out and let us know what you think!
📚 Learn more in the docs.
More news
Connect to Prisma Postgres with any ORM (Preview)
Since its GA release, you could only interact with Prisma Postgres using Prisma ORM via a custom connection string.
This has changed now: When setting up a new Prisma Postgres instance, you receive a regular PostgreSQL direct TCP connection string (starting with
postgres://...) that lets you connect to it using your favorite tool or database library, including Drizzle, Kysely, TypeORM, and others.If you want to access Prisma Postgres from a serverless environment, you can also use our new serverless driver (Early Access).
📚 Learn more in the docs.
Automated backup & restore
Prisma Postgres' backup and restore mechanism has seen a major upgrade recently: You can now easily restore any previous backup via the UI in the Prisma Console. Find the new Backups tab when viewing your database and select any backup from the list to restore its state to a previous point in time.
📚 Learn more in the docs.
Prisma's VS Code extension now has a UI to manage Prisma Postgres
If you're using Prisma ORM, chances are that you're using our VS Code extension too. In its latest release, we've added a major new capability to it: A UI for managing databases.
With this new UI, you can:
To use the new features, make sure to have the latest version of the Prisma VS Code extension installed and look out for the new Prisma logo in VS Code's Activity Bar.
📚 Learn more in the docs.
New region for Prisma Postgres: San Francisco (
us-west-1)We keep expanding Prisma Postgres availability across the globe! After having added Singapore just a few weeks ago, we're now adding San Francisco based on another poll we ran on X. Here are all the regions where you can spin up Prisma Postgres instances today:
us-west-1: San Francisco (new!)us-east-1: North Virginiaeu-west-3: Parisap-northeast-1: Tokyoap-southeast-1: SingaporeKeep 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 initandprisma devcommands for some Windows users who were still facing problems after the previous incomplete fix in version 6.8.1.Fixes:
6.8.1
Today, we are issuing the 6.8.1 patch release. It fixes an issue with the
prisma initandprisma devcommands on Windows.Fixes
6.8.0
Today, we are excited to share the
6.8.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Local development with Prisma Postgres via
prisma dev(Early Access)In this release, we're releasing a way to develop against Prisma Postgres locally — no Docker required!
To get started, run the new
prisma devcommand:This command spins up a local Prisma Postgres instance and prints the connection URL that you'll need to set as the
urlof yourdatasourceblock to point to a local Prisma Postgres instance. It looks similar to this:You can then run migrations and execute queries against this local Prisma Postgres instance as with any remote one. Note that you need to keep the
prisma devprocess running in order to interact with the local Prisma Postgres instance.📚 Learn more in the docs.
Native Deno support in
prisma-clientgenerator (Preview)In this release, we're removing the
denoPreview feature from theprisma-client-jsgenerator. If you want to use Prisma ORM with Deno, you can now do so with the newprisma-clientgenerator:📚 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:
All you need to do is make sure you're using the latest version of Prisma's VS Code extension and your agent is ready to go 🚀
📚 Learn more in the docs.
Other news
You voted, we acted: New Singapore region for Prisma Postgres
We recently ran a poll where we asked you which region you'd like to see next for Prisma Postgres. The majority vote went to Asia Pacific (Singapore), so as of today, you're able to spin up new Prisma Postgres instances in the
ap-southeast-1region.We're not stopping here — keep an eye out on X for another poll asking for your favorite regions that we should add!
6.7.0
Today, we are excited to share the
6.7.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Prisma ORM without Rust engines (Early Access)
If you're a regular visitor of our company blog, you may already know that we're currently working on moving the core of Prisma from Rust to TypeScript. We have written extensively about why we're moving away from Rust and already shared the first measurements of performance boosts we saw from the re-write.
This re-write is not just a move from one programming language to another. It fundamentally improves the architecture of Prisma ORM and replaces the Query Engine (which is written in Rust and deployed as a standalone binary) with a much leaner and more efficient approach that we call Query Compiler.
In this release, we're excited to give you Early Access to the new Query Compiler for PostgreSQL and SQLite database 🥳 Support for more database will follow very soon!
To use the new "Rust-free" version of Prisma ORM, add the
queryCompiler(new) anddriverAdaptersfeature flags to your client generator:Now run
prisma generateto re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install one. For example, the one for PostgreSQL:Once installed, you can instantiate
PrismaClientas follows:This version of
PrismaClientdoesn't have a Query Engine binary and you can use it in the exact same way as before.📚 Learn more in the docs.
Support for
better-sqlite3JavaScript driver (Preview)Driver adapters are Prisma ORM's way of letting you use JS-native drivers (like
pg) to interact with your database. In this release, we're introducing a new driver adapter for using thebetter-sqlite3package, so you can now interact with SQLite database in a JS-native way.To use it, first enable the
driverAdaptersPreview feature flag in on your clientgenerator, then install these libraries:Now you can instantiate Prisma Client as follows:
📚 Learn more in the docs.
Multi-file Prisma schemas are now production-ready
The
prismaSchemaFolderPreview feature is moving into General Availability 🎉 With that change, Prisma ORM now by default supports splitting your Prisma schema file and e.g. lets you organize your schema as follows:prisma/schema.prisma→ defines data source and generatorprisma/models/posts.prisma→ definesPostmodelprisma/models/users.prisma→ definesUsermodel⚠️ Note that there have been breaking changes to the
prismaSchemaFolderPreview feature in the last 6.6.0 release. If you've been using this feature to split your Prisma schema, make sure to read the release notes and update your project accordingly.📚 Learn more in the docs.
Splitting generated output with new
prisma-clientgenerator (Preview)With the
prisma-client-jsgenerator, the generated Prisma Client library is put into a singleindex.d.tsfile. This sometimes led to issues with large schemas where the size of the generated output could slow down code editors and breaking auto-complete.As of this release, our new
prisma-clientgenerator (that was released in 6.6.0) now splits the generated Prisma Client library into multiple files and thus avoids the problems of a single, large output file.Also: As a bonus, we now ensure that generated files do not raise any ESLint and TypeScript errors!
Before
After
📚 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.0stable release 🎉 This version comes packed with exciting features, we can't wait to see what you're going to build with it! Read our announcement blog post for more details: Prisma ORM 6.6.0: ESM Support, D1 Migrations & MCP Server🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release. 🌟
Highlights
ESM support with more flexible
prisma-clientgenerator (Early Access)We are excited to introduce a new
prisma-clientgenerator that's more flexible, comes with ESM support and removes any magic behaviours that may cause friction with the currentprisma-client-jsgenerator.Here are the main differences:
outputpath; no “magic” generation intonode_modulesany moremoduleFormatfieldHere's how you can use the new
prisma-clientgenerator in your Prisma schema:In your application, you can then import the
PrismaClientconstructor (and anything else) from the generated folder:⚠️ Important: We recommend that you add the
outputpath to.gitignoreso that the query engine that's part of the generated Prisma Client is kept out of version control:📚 Learn more in the docs.
Cloudflare D1 & Turso/LibSQL migrations (Early Access)
Cloudflare D1 and Turso are popular database providers that are both based on SQLite. While you can query them using the respective driver adapter for D1 or Turso, previous versions of Prisma ORM weren't able to make schema changes against these databases.
With today's release, we're sharing the first Early Access version of native D1 migration support for the following commands:
prisma db push: Updates the schema of the remote database based on your Prisma schemaprisma db pull: Introspects the schema of the remote database and updates your local Prisma schemaprisma migrate diff: Outputs the difference between the schema of the remote database and your local Prisma schemaTo use these commands, you need to connect the Prisma CLI to your D1 or Turso instance by using the driver adapter in your
prisma.config.tsfile. Here is an example for D1:With that setup, you can now execute schema changes against your D1 instance by running:
📚 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:
… and much more.
To get started, add this snippet to the MCP configuration of your favorite AI tool and get started:
📚 Learn more in the docs.
New
--promptoption onprisma initYou can now pass a
--promptoption to theprisma initcommand to have it scaffold a Prisma schema for you and deploy it to a fresh Prisma Postgres instance:For everyone, following social media trends, we also created an alias called
--vibefor you 😉Improved API for using driver adapters
In this release, we are introducing a nice DX improvement for driver adapters. Driver adapters let you access your database using JS-native drivers with Prisma ORM.
Before 6.6.0
Earlier versions of Prisma ORM required you to first instantiate the driver itself, and then use that instance to create the Prisma driver adapter. Here is an example using the
@libsql/clientdriver for LibSQL:6.6.0 and later
As of this release, you instantiate the driver adapter directly with the options of your preferred JS-native driver.:
Other changes
prismaSchemaFolderbreaking changesIf you are using the
prismaSchemaFolderPreview feature to split your Prisma schema into multiple files, you may encounter some breaking changes in this version.Explicit declaration of schema folder location
You now must always provide the path to the schema folder explicitly. You can do this in either of three ways:
--schemaoption to your Prisma CLI command (e.g.prisma migrate dev --schema ./prisma/schema)prisma.schemafield inpackage.json:schemaproperty inprisma.config.ts:migrationsfolder must live next to.prismafile withdatasourceblockYour
migrationsdirectory must live next to the.prismafile that defines yourdatasourceblog. If you relied on the implicit schema folder location of./prisma/schemamake sure to move your migrations folder from./prisma/migrationsto./prisma/schema/migrations.Assuming
schema.prismadefines thedatasourcein this example, here's how how need to place themigrationsfolder:See this PR for more details.
No more Bun issues if Node.js is not installed
Bun users reported an issue that
prisma generatewould hang if Node.js installed on their machine. This is now fixed and Bun users can generate Prisma Client without issues.Company news
Enterprise support
Prisma offers an enterprise support plan for Prisma ORM. Get direct help from our team and a joint slack channel! With Prisma ORM 7 on the horizon, this is a great time to upgrade your support today.
We are hiring: Developer Support Engineer
If you care about making developers successful, join us as a Developer Support Engineer.
6.5.0
Today, we are excited to share the
6.5.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
Databases can only be reset manually and explicitly
In previous versions, if Prisma ORM determined that a
migratecommand could not be applied cleanly to the underlying database, you would get a message like this one:While "no" was the default, we've determined that having this prompt in the first place was a mistake. In this version we're removing the prompt entirely and instead exiting with an appropriate error message.
To get the previous behavior, you will need to run
prisma migrate resetdirectly.Support for
prisma.config.tsin Prisma StudioWe've expanded support for our
prisma.config.tsfile to include Prisma Studio!To use the new config file, including the ability to connect to driver adapter enabled databases with Prisma Studio, add a
studioblock to yourprisma.config.tsfile:Notice how this looks a little different from last release! Instead of an
@prisma/configpackage there’s now two different options:defineConfighelper exported byprisma/config.PrismaConfigutility type exported byPrisma.All the relevant info for the
prisma.config.tsfile, including these new ways of defining your config, can be found in our docs.Allow for chaining
$onand$extends.In previous versions of Prisma ORM, the return type of the
$onclient method wasvoid. This did not allow for chaining$on()and$extends()calls, as$onis not available on extended clients.In this version we've resolved this issue and
$onwill now return the modified Prisma Client.Community fixes
We have a number of community-submitted fixes that improve Prisma ORM:
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! 🌸
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.