In the previous prisma version you could add an onDelete on a @relation. How can you do that in prisma2? It is impossible now to delete a model that is attached to something.
j
Jonathan
05/06/2020, 6:52 PM
Either you add the ondelete in the database itself, or manually perform the delete cascade in your resolvers
Hey Oscar 👋
Currently it isn't supported via the Prisma schema syntax so as a workaround, you would have to add it via SQL statements.
You can also track the spec here for more info.