nikolasburk
select
When using count
queries, you can provide a number of options, e.g. for filtering. This release introduces the select
option for count
queries which lets you filter for non-null values of multiple fields in a single query.
Check out the release notes for more info and examples.
✅ Modifying relations by directly setting foreign keys is now stable
In 2.11.0, we introduced the uncheckedScalarInputs
preview flag which allowed you to modify relations by directly setting foreign keys in your queries (as opposed to using a nested write with the connect
option). Fire up that delete key because you can now remove this flag from your Prisma schema!
Read more about in the documentation on relation queries.
🌒 Dark mode for Prisma Studio & more powerful filtering
As of this release, Prisma Studio can be used in dark mode! You can use the Settings icon in the top right corner to switch between light and dark mode.
We also included more powerful ways for you to filter the records of a table:
• Filter by Json
fields
• Filter by the ID of a related model
😯 More improvements for Prisma Migrate
• Prisma Migrate now detects when the migrations don’t match the configured provider
on your datasource
block, for example when the migrations have been created with sqlite
but the provider
is now set to postgresql
. Prisma Migrate will now print a helpful error message in these cases.
• prisma migrate reset
can now be used in non-interactive environments (e.g. CI/CD) by passing the --force
flag.
• The new seeding functionality (see above) will be automatically triggered whenever prisma migrate reset
is called to reset and repopulate the database in development. It's also triggered when the database is reset interactively after calling prisma migrate dev
.
🦦 Transaction API for Prisma Client Go
Prisma Client Go now supports database transactions with a sparkly new Transaction
API:
go
createA := client.User.CreateOne(
db.User.ID.Set("c"),
db.User.Email.Set("a"),
)
createB := client.User.CreateOne(
db.User.ID.Set("d"),
db.User.Email.Set("b"),
)
err := client.Prisma.Transaction(createUserA, createUserB).Exec(ctx)
if err != nil {
return err
}
Learn more about Transaction
in the reference. If you'd like to try out Prisma Client Go, check out the Quickstart for a gentle introduction and share your feedback in the #prisma-client-go channel.
📚 Learn more in the release notes
For more info and links to documentation, you can read the release notes.
🌟 Help us spread the word about Prisma 🌟
To help spread the word about Prisma, we'd very much appreciate if you would star the repo 🌟 And if you're excited about the features in this week's release, then help us and share your excitement on Twitter.
📰 Join us on Thursday for the "What's new in Prisma" livestream
As usual, my colleague @ryan and I will discuss the latest release and other news from the Prisma ecosystem in a livestream on on Thursday at 5pm Berlin | 8am San Francisco.