-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs with cascading deletes from Prisma #546
Comments
We are getting close to 1.0, so let's leave it as is until it's stable. But we can go ahead and add a note mentioning the preview feature! |
I understand. But what about the usage of alpha version of React and its experimental Suspense feature? Are they going to make it into the 1.0? I am just trying to understand the rationale for including some experimental features, but not others. |
@arslancharyev31 sorry for the delay here! Since we are nearing 1.0, we are trying to minimize experimental things. React alpha is the only pre-stable thing we have now. React alpha is being used at facebook and the suspense feature we are using is extremely stable (within alpha). Does this make sense? |
Blitz now defaults to Prisma 3 (blitz-js/blitz#2731) and Referential actions has been out of preview. Mandatory relations (the There are also several places not updated to say Prisma 3 blitzjs.com/app/pages/docs/database-overview.mdx Lines 14 to 16 in 49fac46
blitzjs.com/app/pages/index.js Line 323 in 49fac46
|
Maybe we can change the Tutorial — instead of adding a new DELETE, we can make the users update the Prisma schema.
Fixed by a9dc52e |
Good day.
I've been following the Blitz tutorial and so far it has been a great experience. However I noticed some outdated info in the docs that I believe is worth mentioning. The section about
deleteQuestion
mutation states that:However since version 2.26.0 Prisma does support cascading deletes via Referential actions. The caveat is that it is a Preview feature. But then again, so is React Suspense, which is used throughout the starter project.
It is worth noting that even without enabling the Referential actions feature, running
blitz generate all/resource/etc.
creates the DB migrations that already haveON DELETE CASCADE
clause present on the foreign keys. When I looked up the initial DB migration, the Session table hadON DELETE SET NULL
for theuserId
foreign key, while the Token table hadON DELETE CASCADE
for the same key. I am not sure if theseON DELETE
discrepancies are intended and what implications they had when the Referential actions feature is disabled. I still had to addonDelete: Cascade
clause in all foreign keys defined inschema.prisma
, even after enabling the feature.The text was updated successfully, but these errors were encountered: