Merge branch 'main' into feature/custom-fields-on-the-booking-page
# Conflicts: # pages/api/availability/eventtype.ts # pages/availability/event/[type].tsx
This commit is contained in:
commit
543482ca52
24 files changed
+603
-121
No files matched your search
@@ -0,0 +1,11 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "SelectedCalendar" (
|
||||
"userId" INTEGER NOT NULL,
|
||||
"integration" TEXT NOT NULL,
|
||||
"externalId" TEXT NOT NULL,
|
||||
|
||||
PRIMARY KEY ("userId","integration","externalId")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "SelectedCalendar" ADD FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "EventType" ADD COLUMN "eventName" TEXT;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ADD COLUMN "bufferTime" INTEGER NOT NULL DEFAULT 0;
|
||||
@@ -0,0 +1,20 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ADD COLUMN "emailVerified" TIMESTAMP(3);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "VerificationRequest" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"identifier" TEXT NOT NULL,
|
||||
"token" TEXT NOT NULL,
|
||||
"expires" TIMESTAMP(3) NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "VerificationRequest.token_unique" ON "VerificationRequest"("token");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "VerificationRequest.identifier_token_unique" ON "VerificationRequest"("identifier", "token");
|
||||
+12
-1
@@ -21,6 +21,7 @@ model EventType {
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
userId Int?
|
||||
bookings Booking[]
|
||||
eventName String?
|
||||
}
|
||||
|
||||
model Credential {
|
||||
@@ -44,11 +45,13 @@ model User {
|
||||
weekStart String? @default("Sunday")
|
||||
startTime Int @default(0)
|
||||
endTime Int @default(1440)
|
||||
bufferTime Int @default(0)
|
||||
createdDate DateTime @default(now()) @map(name: "created")
|
||||
eventTypes EventType[]
|
||||
credentials Credential[]
|
||||
teams Membership[]
|
||||
bookings Booking[]
|
||||
selectedCalendars SelectedCalendar[]
|
||||
@@map(name: "users")
|
||||
}
|
||||
|
||||
@@ -119,4 +122,12 @@ model Booking {
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime?
|
||||
}
|
||||
}
|
||||
|
||||
model SelectedCalendar {
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId Int
|
||||
integration String
|
||||
externalId String
|
||||
@@id([userId,integration,externalId])
|
||||
}
|
||||
Reference in new issue
Block a user