Skip to content

Commit 31940b9

Browse files
authored
fix: delete team bug when instant meeting token exist (calcom#23553)
1 parent c3c990d commit 31940b9

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- DropForeignKey
2+
ALTER TABLE "InstantMeetingToken" DROP CONSTRAINT "InstantMeetingToken_teamId_fkey";
3+
4+
-- AddForeignKey
5+
ALTER TABLE "InstantMeetingToken" ADD CONSTRAINT "InstantMeetingToken_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;

packages/prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ model InstantMeetingToken {
702702
token String @unique
703703
expires DateTime
704704
teamId Int
705-
team Team @relation(fields: [teamId], references: [id])
705+
team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)
706706
bookingId Int? @unique
707707
booking Booking? @relation(fields: [bookingId], references: [id], onDelete: Cascade)
708708

0 commit comments

Comments
 (0)