refactor: use BookingReference instead of DailyEventReference (#3667)
* refactor: use BookingReference instead of DailyEventReference * refactor: migrate DailyEventReference records to BookingReference * refactor: drop DailyEventReference table * fix linting * Daily Video API adapter fixes Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
14f0c30584
commit
6d79f80928
17 files changed
+426
-370
No files matched your search
+4
@@ -0,0 +1,4 @@
|
||||
UPDATE "BookingReference"
|
||||
SET "meetingUrl" = "dailyurl", "meetingPassword" = "dailytoken"
|
||||
FROM "DailyEventReference"
|
||||
WHERE "DailyEventReference"."bookingId" = "BookingReference"."bookingId" AND "BookingReference"."type" = 'daily_video'
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `DailyEventReference` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "DailyEventReference" DROP CONSTRAINT "DailyEventReference_bookingId_fkey";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "DailyEventReference";
|
||||
@@ -260,14 +260,6 @@ enum BookingStatus {
|
||||
PENDING @map("pending")
|
||||
}
|
||||
|
||||
model DailyEventReference {
|
||||
id Int @id @default(autoincrement())
|
||||
dailyurl String @default("dailycallurl")
|
||||
dailytoken String @default("dailytoken")
|
||||
booking Booking? @relation(fields: [bookingId], references: [id])
|
||||
bookingId Int? @unique
|
||||
}
|
||||
|
||||
model Booking {
|
||||
id Int @id @default(autoincrement())
|
||||
uid String @unique
|
||||
@@ -283,7 +275,6 @@ model Booking {
|
||||
endTime DateTime
|
||||
attendees Attendee[]
|
||||
location String?
|
||||
dailyRef DailyEventReference?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime?
|
||||
status BookingStatus @default(ACCEPTED)
|
||||
|
||||
Reference in new issue
Block a user