Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

v0.8.0

Choose a tag to compare

@RobertCraigie RobertCraigie released this 01 Jan 20:10
· 226 commits to main since this release
2b67a05

⚠️ Prisma Schema Breaking Changes

This release contains some changes to the format of the Prisma Schema.

Most of these changes are due to a conceptual shift from allowing implicit behaviour to forcing verboseness to reduce the amount of under the hood magic that Prisma does, thankfully this means that a lot of the changes that you will be required to make should be pretty straightforward and easily fixable by running prisma format which will show you all the places that need changed in your schema.

Changes:

For more details see the Prisma v4.0.0 upgrade path.

⚠️ Internal Raw Query Changes

This release includes an internal restructuring of how raw queries are deserialized. While all these changes should be completely backwards compatible, there may be edge cases that have changed. If you encounter one of these edge cases please open an issue and it will be fixed ASAP.

For some additional context, this restructuring means that most fields will internally be returned as strings until Prisma Client Python deserializes them (previously this was done at the query engine level).

CLI Improvements

This release completely refactors how the Prisma CLI is downloaded and ran. The previous implementation relied on downloading a single pkg binary, this worked but had several limitations which means we now:

  • Support ARM architectures & certain Linux distributions
  • Support running Prisma Studio from the CLI
  • Support generating the JS Client
  • No longer have to maintain a separate implementation from Prisma for detecting the current platform & logic for downloading engines
    • As a user this means that more platforms & architectures will be supported faster!

The new solution is involves directly downloading a Node.js binary (if you don't already have it installed) and directly installing the Prisma ClI through npm. Note that this does not pollute your userspace and does not make Node available to the rest of your system.

This will result in a small size increase (~150MB) in the case where Node is not already installed on your machine, if this matters to you you can install Prisma Client Python with the node extra, e.g. pip install prisma[node], which will install a Node binary to your site-packages that results in the same storage requirements as the previous pkg solution. You can also directly install nodejs-bin yourself. It's also worth noting that this release includes significant (~50%) reduction in the size of the Prisma Engine binaries which makes the default Node binary size increase less impactful.

Prisma Studio

With this release you can now run Prisma Studio from the CLI which makes it incredibly easy to view & edit the data in your database. Simply run the following command

$ prisma studio

Or

$ prisma studio --schema=backend/schema.prisma

Screenshow showcasing Prisma Studio usage

Note that there is also a dark mode available

Support for CockroachDB

This release adds official support for CockroachDB. You could've used CockroachDB previously by setting provider to postgresql but now you can explicitly specify CockroachDB in your Prisma Schema:

datasource db {
  provider = "cockroachdb"
  url      = env("COCKROACHDB_URL")
}

It should be noted that there are a couple of edge cases:

Prisma Updates

TL;DR for improvements made by Prisma that will now be in Prisma Client Python

Full list of changes:

Miscellaneous Changes

Public Roadmap

Going forward we will now use a GitHub Project to track state and relative priority of certain issues. If you'd like to increase the priority of issues that would benefit you please add 👍 reactions.

This is less of a roadmap per se but will hopefully give you some insight into the priority of given issues / features.

Attributions

Thank you to @kfields for helping with raw query deserialization!

Massive thank you to @prisma & @techied for their continued support and @exponential-sponsorship for becoming a sponsor!

sponsors