fix: delete team bug when instant meeting token exist (#23553)

This commit is contained in:
Udit Takkar
2025-09-04 00:15:29 +01:00
committed by GitHub
parent c3c990db43
commit 31940b919e
2 changed files with 6 additions and 1 deletions
@@ -0,0 +1,5 @@
-- DropForeignKey
ALTER TABLE "InstantMeetingToken" DROP CONSTRAINT "InstantMeetingToken_teamId_fkey";
-- AddForeignKey
ALTER TABLE "InstantMeetingToken" ADD CONSTRAINT "InstantMeetingToken_teamId_fkey" FOREIGN KEY ("teamId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+1 -1
View File
@@ -702,7 +702,7 @@ model InstantMeetingToken {
token String @unique
expires DateTime
teamId Int
team Team @relation(fields: [teamId], references: [id])
team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)
bookingId Int? @unique
booking Booking? @relation(fields: [bookingId], references: [id], onDelete: Cascade)