From c900285349eb2b4d05d480c8ad93587f14b64906 Mon Sep 17 00:00:00 2001 From: Jonathan Bangert Date: Fri, 5 Apr 2024 16:30:03 +0200 Subject: [PATCH] Update schema.prisma --- prisma/schema.prisma | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 366b454..55e1281 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -56,6 +56,8 @@ model file_permission { document_id String document document @relation(fields: [document_id], references: [id], onDelete: Cascade) user user @relation(fields: [user_id], references: [id], onDelete: Cascade) + + @@unique([document_id, user_id], name: "document_user_id") } model school {