From b5f78bf3049c181b47d8692b728d7087c4fad51d Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 27 Apr 2025 22:58:24 +0530 Subject: Bug Fix: preventing an undefined friendId causing unwanted deletion of all of the user's friendships (one sidedly, too\!) --- prisma/schema.prisma | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'prisma') diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 7c99fed..4e2dbbc 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -65,13 +65,11 @@ model MonthlyBudget { } model Friend { - id Int @id @default(autoincrement()) user User @relation(fields: [userId], references: [id]) userId Int friend User @relation(name: "friend", fields: [friendId], references: [id]) friendId Int - - @@unique([userId, friendId]) + @@id([userId, friendId]) } enum TransactionType { -- cgit v1.2.3