0.6.2
A new release is here with more features, bug fixes, and faster compile times!
Migrations
Thanks to collaboration with @oscartbeaumont It is now possible to use Prisma's migration engine to apply schema changes and migrations! I don't recommend using this in all projects (if you can migrate with the CLI then do so), but for applications like those built with Tauri this is a great solution for applying migrations on users' machines. Please note that using this feature will likely cause your generated client to be non-transferrable across devices and operating systems, so it will have to be generated separately anywhere you want to use it and be removed from source control if you have it checked in.
Enable the migrations
feature for the library and CLI and read the docs for more info. Thanks to @oscartbeaumont for helping get this done.
Feature Gated Database Connectors
The default behaviour of Prisma Client Rust is to compile and include all database connectors. This adds anywhere from 10-30% more compile time depending on which specific connectors you actually need.
0.6.2 makes it possible to disable support for all connectors using default-features = false
, and then selectively re-enable them with connector-specific features. postgresql
, mysql
, sqlite
, mssql
and mongodb
are all valid options.
Make the mentioned changes for the library and CLI and you should notice compilation improvements immediately!
Introduce create_unchecked
0.6.1 acknowledged that create_many
can only accept scalar fields, but wrongly changed create
to do the same, making it incompatible with upsert
. Now create_unchecked
is the helper to be used with create_many
, and create
can be used with upsert
.
rspc
0.1.2 Support
Recent changes to rspc
have made 0.6.1 incompatible with newer releases, so the minimum version of rspc
has been bumped to 0.1.2.
On the subject of rspc
, enums are usable in resolver return types!
What's Next
These changes have been a long time coming but I wanted to test them as much as possible, especially the migrations feature. How best to take advantage of it is still up in the air, but create-rspc-app
from @oscartbeaumont and @VarunPotti should help with that in the near future. It will be a CLI for initializing a new project with any combination of Prisma, rspc
, axum
, Tauri and a website that takes incorporates a lot of the patterns we adopted building Spacedrive.
The next things I would like to see happen with Prisma Client Rust is a simplification of the codebase, especially the generators, such that external contributions and custom generators get easier; Use of more traits such that query builders can be modified generically and be constructed from JSON; More tests, preferably a setup that has general tests that run on all supported DBs and specific tests for certain DBs; Better docs are also a must, and if anyone would like to help write some I would be very grateful!