nikolasburk
.dmg
from the Studio release page.
Support for more platforms (Windows and Linux) will follow soon!
🦿 Prisma codemods help upgrading your codebase
With today's release, we took the opportunity to cleanup some rough edges in the Prisma Client API which partially results in breaking changes. To help you with upgrading your codebase to 2.12.0, we're introducing `@prisma/codemods`.
The @prisma/codemods
package provides a powerful CLI that scans your codebase and automatically updates the code to the new API calls from the provided version.
The upgrade workflow looks like this:
cd my-app
npm install @prisma/cli --save-dev
npm install @prisma/client
npx @prisma/codemods update-2.12 ./
🤓 Microsoft SQL Server now supports native database types (Preview)
Hot off the presses: You can now use native database types with Microsoft SQL Server by specifying both the microsoftSqlServer
and nativeTypes
feature flags in your Prisma schema:
generator js {
provider = "prisma-client-js"
previewFeatures = ["microsoftSqlServer", "nativeTypes"]
}
datasource ms {
provider = "sqlserver"
url = env("DATABASE_URL")
}
model User {
id BigInt @id @default(autoincrement()) @ms.BigInt
name String? @ms.VarChar(255)
}
⚠️ Breaking changes and deprecations
The cleanup in this release comes with a number of breaking changes:
• Removal of deprecated non-$
methods: Some top-level Prisma Client methods have been prefixed with a $
a few releases ago. While the non-$
versions of these methods still continued to work, we're finally removing them in this release, meaning you now need to make sure you're adfding the $
(e.g. for calls like prisma.$transaction()
, prisma.$connect()
or prisma.$disconnect()
).
• 1-1-relations must now have an optional side: The Prisma schema used to allow 1-1-relations that were required on both sides. This is not allowed any more as of this release. The fastest way to update your existing 1-1-relations to this new requirement is by running npx prisma introspect
.
• Fix how data for Json[]
fields is stored: The way how fields of type Json[]
have been stored in previous releases had a number of issues. This release fixes these issues: Previously, JSON arrays were stored as a string inside a your database's JSON
column. Now, they are properly encoded JSON arrays in the database.
The following changes are not yet breaking, but indicate a future breaking change via deprecation:
• findOne
is renamed to findUnique
to give more clarity about the behaviour of the method
• Exported types from @prisma/client
are now under a Prisma
namespace
Learn all about the breaking changes in the release notes.
🤩 Upcoming Prisma Migrate Preview Release
We’ve got a Preview release of Prisma Migrate nearing up with a large set of changes. You can test it in Early Access, see the upcoming changes, and provide feedback! Get started with the Early Access version here.
Share your feedback and questions in the #product-feedback channel!
🌟 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 our What's new in Prisma livestream on Thursday
Catch @ryan and me on Youtube as we are are discussing the latest news from the Prisma ecosystem and community in the next ! 🎉