Skip to content

Commit

Permalink
refactor: Update Place and Invite models to cascade delete on related…
Browse files Browse the repository at this point in the history
… entities
  • Loading branch information
PleBea committed Jul 13, 2024
1 parent bb6a5e3 commit 8a6bd89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ model Place {
x String
y String
planId String @unique
Plan Plan @relation(fields: [planId], references: [id])
Plan Plan @relation(fields: [planId], references: [id], onDelete: Cascade)
}

model Invite {
id String @id @default(uuid())
planId String
Plan Plan @relation(fields: [planId], references: [id])
Plan Plan @relation(fields: [planId], references: [id], onDelete: Cascade)
userId String @unique
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
User User @relation(fields: [userId], references: [id])
createdAt DateTime @default(now())
}

0 comments on commit 8a6bd89

Please sign in to comment.