5.11.0
Today, we are excited to share the 5.11.0 stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.
Highlights
Edge function support for Cloudflare and Vercel (Preview)
We’re thrilled to announce that support for edge function deployments with Prisma ORM is now in Preview 🥳 As of this release, you can deploy your apps that are using Prisma ORM to:
- Vercel Edge Functions and Vercel Edge Middleware
- Cloudflare Workers and Cloudflare Pages
In order to deploy to an edge function, you’ll need to use a compatible database driver (along with its Prisma driver adapter):
- Neon Serverless Driver (for PostgreSQL databases hosted via Neon)
- PlanetScale Serverless Driver (for MySQL databases hosted via PlanetScale)
pgdriver (for traditional PostgreSQL databases)@libsql/clientdriver (for SQLite databases hosted via Turso)
Check out our documentation to learn how you can deploy an edge function using any combination of supported edge function provider and database.
You can also read more about it in the announcement blog post!
Performance improvements in nested create operations
With Prisma ORM, you can create multiple new records in nested queries, for example:
const user = await prisma.user.update({
where: { id: 9 },
data: {
name: 'Elliott',
posts: {
create: {
data: [{ title: 'My first post' }, { title: 'My second post' }],
},
},
},
})In previous versions, Prisma ORM would translate this into multiple SQL INSERT queries, each requiring its own roundtrip to the database. As of this release, these nested create queries are optimized and the INSERT queries are sent to the database in bulk in a single roundtrip. These optimizations apply to one-to-many as well as many-to-many relations.
With this change, using the nested create option to create multiple records effectively becomes equivalent to using a nested createMany operation (except that createMany only works with one-to-many relations, whereas create works both with one-to-many and many-to-many).
Note: Only the deepest nested operation is optimized. If a user specified
create (1) -> create (2) -> create (3)in their query, onlycreate (3)will be optimized.
Fixes and improvements
Prisma Client
- Prisma errors when not using the major.minor.patch versioning system
- mongodb where condition resulted in combined $ne but should not be $eq
- Node hangs when
console.log(new PrismaClient()) - Add wolfy linux to supported OS
- Support Linux Gentoo
- Know engines to download for Void Linux
- Engine does not support Linux distro "openeuler"
- Prisma Doesn't Recognize Crystal Linux distro
- Regression: Mapped
enumthrows error (collationcp1250_czech_csor similar) NOTcondition leaks out of its desired bounds- The column does not exist in the current database.
- Logging
PrismaClientobject is slow - Running
prisma generateon Litespeed Web Server cPanel with ssh - Prisma doesn't know which engines to download for the Linux distro "guttaos"
- Error in driver-adapter-utils with
tsc:Cannot find namespace 'debug'. - VS Code debugger freeze from time to time, when Prisma Client is involved
pushmethod still unimplemented for scalar lists in CockroachDBInvalid charactererror persists on 5.10.1 in Prisma Studio- Add "Peppermint OS" to list of supported distros
runtimeDescriptionis not defined error
Prisma Migrate
- Prisma with UOS or Deepin
- Warning: Linux distro "slackware"
- Error when run
npx prisma db pullwith DeepinOS 20.9GNU/LInux - Add solus to list of known supported distros
- NixOS not recognised as a Linux distribution
- Prisma Warning on Ubuntu 20.04
- Let Prisma detect Artix Linux distro
- couldn't identify clear-linux-os
- Prisma doesn't know which engines to download with
Linux Mint Error: Invalid characterwhenschema.prismaincludes Chinese/Non-ASCII characters in a comment
Prisma Engines
- [DA] Planetscale engine tests: aggregations
- [DA] Planetscale engine tests: json filtering
- [DA] Planetscale engine tests: order and pagination
- [DA] Planetscale engine tests: oids
- [DA] Planetscale engine tests: nested_createmany_fail_dups
- [DA] Planetscale engine tests: create_many_error_dups
- [DA] Planetscale engine tests: upsert_fails_if_filter_dont_match