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
Support for configuring referential actions (on delete, on cascade) in Prisma Schema Language #2810
Comments
Do you know when this feature will be release (milestone) ? Thank you ! :-) |
No, we do no have a release date yet. |
Hello Prisma team. |
i also think that is one of the biggest problem right now in prisma (besides missing migrations) |
This is the community solution |
Hello, any update on that feature? |
Hi, this is planned, but will likely be tackled once |
When will |
when this feature will be available |
Note that there currently is an open proposal for this feature: #6996 |
Feedback on the linked issue is very much wanted |
In case someone needs a workaround, here is a light package that doesn't require changes your schema: |
Can't wait for this feature to be released. A lot of complex projects rely heavily on proper cascading deletes including mine. It would be awesome to have this built in instead of having to deal with community workarounds. Keep up the great work Prisma team! |
Quick update in that direction: We are actively working on implementation of the proposal spelled out in #6996 - so this is happening. If you can take another look at that proposal and leave your feedback, that would be appreciated. |
@janpio any idea on when will the feature be release? (a rough estime works) btw, thanks!! |
No ETA, but definitely more weeks than quarters away. |
Instructions on how to use this, and a place to give feedback, will be here when it is shipped in a version: #7816 |
@janpio FWIW, the documentation still points to this issue instead of the feedback issue. Not sure if that’s expected or not so I’m raising it here. |
Yep @FlorianWendelborn I came to this issue form docs. I see its in preview now on #7816 but there's no instructions on how to use it. |
It is available in the dev channel, but is not tested yet by others than us the devs. There's also the documentation effort going on: this will be a breaking change and users need to understand the change properly before we can talk about it more. It is under the previewFeature flag So, just wait until next Tuesday's release 2.26.0 for docs and info, or if accepting a risk of data loss, you can try the dev channel... |
This has now been released as a preview feature behind a preview feature flag. You can read about it in the release notes for 2.26.0: https://github.com/prisma/prisma/releases/tag/2.26.0 If you have any feedback, please use this issue: #7816 |
Problem
Currently Prisma Schema does not support a way to define cascading deletes. But people want to use that functionality.
Suggested solution
Define, implement and document a syntax for cascading deletes.
Alternatives
Set the cascading deletes on the database manually, but that has problems like #2057
Additional Information
The text was updated successfully, but these errors were encountered: