4.1.0
版本发布时间: 2022-07-19 20:29:08
prisma/prisma最新发布版本:5.19.1(2024-09-02 22:57:37)
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Upgrading to Prisma 4
In case you missed it, we held a livestream last week and walked through issues you may run into while upgrading to Prisma 4 and how to fix them!
Major improvements
Ordering by nulls first and last support (Preview)
In this release, we're adding support for choosing how to sort null values in a query.
To get started, enable the orderByNulls
Preview feature flag in your Prisma schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["orderByNulls"]
}
Next, run prisma generate
to re-generate Prisma Client. You will now have new fields you can now use to order null values:
await prisma.post.findMany({
orderBy: {
updatedAt: {
sort: 'asc',
nulls: 'last'
},
},
})
Learn more in our documentation and don't hesitate to share your feedback in this issue.
Fixed memory leaks and CPU usage in Prisma Client
In this release, we've fixed the following issues experienced when setting up and tearing down Prisma Client while running tests:
- Prisma Client now correctly releases memory on Prisma Client instances that are no longer being used. Learn more in this GitHub issue
- Reduced CPU usage spikes when disconnecting Prisma Client instances while using Prisma Client. You can learn more in this GitHub issue
These fixes will allow you to run your tests a little faster!
Prisma Studio improvements
We're refining the experience when working with Prisma studio with the following changes:
- An always visible filter panel and functionality to clear all filters at once
- Improved relationship model view with more visible buttons
Let us know what you think, and in the event, you run into any issues, please create a GitHub issue
Fixes and improvements
Prisma
- Formatter doesn't allow comments on consecutive indices
- Internal: reformatter is not idempotent
-
prisma format
strips comments on block level attributes - Reformatter crash in relation code
- Formatter crashes on arbitrary blocks
-
prisma --version
crashes ifopenssl
isn't properly installed -
Rename 'getVersion' to 'getEngineVersion' in
@prisma/internals
- BigInt with a default value cause duplicates in all migrations
- Formatter: thread 'main' panicked at 'not yet implemented'
-
Mongodb introspection fails with "called
Option::unwrap()
on aNone
value" -
PSL should support inline
//
comments in the generator and datasource blocks - Unable to use native database types with Prisma and CockroachDB
Prisma Client
- High permanent CPU usage after calling $disconnect on a client that executed an interactive transaction before (v3.9.0+)
- Slow Tests
-
prisma generate
: Non-functional debounce mechanism for watch mode - Unknown error in SQLite Connector migrating from Prisma 3.x to 4.0.0 on ARM/M1 machines
- macOS 12 sometimes kills Node.js process when loading the QE library
Prisma Migrate
- migrate-cli: do not override RUST_LOG from the environment
- Incorrect migration creates on sql server when index deleted
- Float cause duplicate alter table in all migrations
- db error: ERROR: cannot drop view geography_columns because extension postgis requires it
Language tools (e.g. VS Code)
-
Check when
@id
is suggested and fix - Implement a code action adding a unique constraint to a relation
-
Potential pipeline 🔥 of language-tools with versioning change of
@prisma/engines
- Cannot add comments to my @@unique constraints
@prisma/engines npm package
Credits
Huge thanks to @shian15810, @zifeo, @lodi-g, @Gnucki, @apriil15 for helping!
💼 We're hiring!
If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you.
We're looking for a Technical Support Engineer and Back-end Engineer: Prisma Data Platform.
Feel free to read the job descriptions and apply using the links provided.
📺 Join us for another "What's new in Prisma" livestream
Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" livestream.
The stream takes place on YouTube on Thursday, July 19 at 5 pm Berlin | 8 am San Francisco.