Today, we are excited to share the 6.3.0
stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release. 🌟
Highlights
Add limit
to updateMany()
and deleteMany()
Previously, limit
has not existed as a valid option in top level updateMany()
and deleteMany()
queries. In 6.3.0 limit
is now available in these queries, bringing their features more in line with other query types.
You can use limit
like the following:
await prisma.user.deleteMany({
where: { column: 'value' },
limit: 100,
});
This will limit the number of deleted users to 100 at maximum.
Sort generator
fields deterministically
In previous version of Prisma ORM, the fields inside of a generator
block in your Prisma Schema were not deterministically sorted. This could lead to cases where prisma db pull
could lead to re-ordering of fields.
In 6.3.0, the sorting of fields in this block is now deterministic. You may see re-ordering on the first prisma db pull
after you upgrade, but it will remain consistent afterwards.
Replace NOT IN
with NOT EXISTS
for PostgreSQL relation filters
In previous versions of Prisma ORM, when using the none
or some
relation filters, the SQL queries generated used NOT IN
. In many cases this lead to performance issues as the size of the related table grew. In 6.3.0, we’ve replaced these usages of IN
with EXISTS
in order to improve query performance.
A special thank you
We'd like to extend our heartfelt thanks to @loren and his team for the collaboration and trust in our enterprise support plan. Working closely with them allowed us to address important issues like #19249 and #17303. Their insights and partnership have been invaluable in improving our product.
If your team could benefit from dedicated support and tailored solutions, learn more about our enterprise support plan.
Fixes and improvements
Prisma Client
Prisma
- Prisma interactive transaction ignores DB exception on commit (with triggers)
prisma db pull
non-deterministically sorts generator fieldsno entry found for key
error on views<->model relations- Adding
onUpdate
data to the DMMF in@prisma/generator-helper
Credits
Huge thanks to @WhyAsh5114 for their contributions to this release!