diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-04-27 22:58:24 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-04-27 22:58:24 +0530 |
commit | b5f78bf3049c181b47d8692b728d7087c4fad51d (patch) | |
tree | 694e350283ac07d43b9589ca01db5c2427a107a4 /prisma | |
parent | 961708462525292c28aaf2462f7c50b05536df99 (diff) |
Bug Fix: preventing an undefined friendId causing unwanted deletion of all of the user's friendships (one sidedly, too\!)
Diffstat (limited to 'prisma')
-rw-r--r-- | prisma/schema.prisma | 4 |
1 files changed, 1 insertions, 3 deletions
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 { |