Attach credential id to destinationCalendar records (#3197)
This commit is contained in:
1 parent
2cbf46a323
commit
201d17264c
8 files changed
+31
-1
No files matched your search
+5
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "DestinationCalendar" ADD COLUMN "credentialId" INTEGER;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "DestinationCalendar" ADD CONSTRAINT "DestinationCalendar_credentialId_fkey" FOREIGN KEY ("credentialId") REFERENCES "Credential"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -89,6 +89,7 @@ model Credential {
|
||||
app App? @relation(fields: [appId], references: [slug], onDelete: Cascade)
|
||||
// How to make it a required column?
|
||||
appId String?
|
||||
destinationCalendars DestinationCalendar[]
|
||||
}
|
||||
|
||||
enum UserPlan {
|
||||
@@ -113,6 +114,8 @@ model DestinationCalendar {
|
||||
bookingId Int? @unique
|
||||
eventType EventType? @relation(fields: [eventTypeId], references: [id])
|
||||
eventTypeId Int? @unique
|
||||
credentialId Int?
|
||||
credential Credential? @relation(fields: [credentialId], references: [id])
|
||||
}
|
||||
|
||||
enum UserPermissionRole {
|
||||
|
||||
Reference in new issue
Block a user