From a3512075158c454720e0c072cfd69c0e60f53521 Mon Sep 17 00:00:00 2001 From: Roman Godmaire Date: Mon, 20 Nov 2023 10:12:10 -0500 Subject: [PATCH] fix: Casade delete comments on author delete --- prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 75d8e15..a4b9e9a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -69,7 +69,7 @@ model Comment { id Int @id @default(autoincrement()) content String - author User @relation(fields: [authorId], references: [id]) + author User @relation(fields: [authorId], references: [id], onDelete: Cascade) authorId String trackVersion TrackVersion @relation(fields: [trackVersionId], references: [id], onDelete: Cascade)