Today, we are excited to share the 2.24.0
stable release 🎉
🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements & new features
MongoDB gets Json
and Enum
Support
We just added Json
and enum
support to the MongoDB provider
for Prisma Client. Here's an example with both:
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
previewFeatures = ["mongodb"]
}
model Log {
id String @id @default(dbgenerated()) @map("_id") @db.ObjectId
message String
level Level @default(Info)
meta Json
}
enum Level {
Info
Warn
Error
}
You can then use the generated client like this:
await prisma.log.create({
data: {
level: "info",
message: "User signed in",
meta: { user_id: 1 },
},
})
As a reminder, the mongodb
provider is still in Early Access. If you'd like to use MongoDB with Prisma, please fill out this 2-minute Typeform and we'll get you an invite to our Getting Started Guide and private Slack channel right away!
New features for the Prisma Data Platform
The Prisma Data Platform (PDP) helps developers collaborate better in projects that are using the open-source tools. One of its main features today is an online data browser.
View schema
You can now view your project's schema in order to better understand your application or collaborate with your colleagues. The only roles that can view it are: Admin and Developer
Delete & edit your project
You can now delete your project from your settings.
You can also edit your Project's URL, so you can now correct any mistakes you might have made while creating your project.
Static IPs are now supported
If your database is behind a proxy and you need a static IP to allowlist in order to give access to it, you can now get in touch with us by creating an issue or sending an email at martzoukos@prisma.io
and we'll enable it for you.
Please note that while this feature is freely available now, it will be offered as part of a paid plan in the future (towards the end of '21 or beginning of '22).
Fixes and improvements
Prisma Client
- Prisma CLI installation hangs indefinitely inside of docker (Kernel 5.10)
- SQL Server crashes when using autoincrement with createMany
- PANIC in query-engine\core\src\interpreter\query_interpreters\nested_read.rs:79:561
- [MongoDB] Smooth out the workflow for updating your schema
- Schema generation freezed after bitbucket OS upgrade (FlatCarOS upgrade 2605.12.0 to 2765.2.2 (kernel move from 5.4.92 directly to 5.10.25))
- PANIC in query-engine\core\src\query_graph_builder\read\utils.rs:52:85called
Result::unwrap()
on anErr
value: FieldNotFound { name: "_count", model: "Post" } - N-API feature creates memory leak
- MongoDB: Many to many relation issue
- Disallow passing a string as a path in Postgres
Prisma Migrate
- "Getting is_identity from Resultrow...." crash on Postgres
- Disable "db" and "migrate" commands for "mongodb" provider until we support it.
- Support PlanetScale in Migrate
Prisma Studio
- Not working in VSCode (docker) devcontainer
- Running prisma studio behind a nginx https reverse proxy doesn't work
Prisma Engines
- Add Parameter to the NAPI Constructor to enable LOG_QUERIES
- Parse type names in datamodel parser at the pest level instead of regular expressions
- [N-API] Export Functional Engine Commands along side QueryEngine Constructor
- Make migration ordering stable
Credits
Huge thanks to @Sytten for helping!
📺 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, June 3rd at 5pm Berlin | 8am San Francisco.
🌎 Prisma Day is coming
Save the date for Prisma Day 2021 and join us for two days of talks and workshops by the most exciting members of the Prisma community.
- June 29th: Workshops
- June 30th: Talks
We look forward to seeing you there!