Merge pull request #450 from emrysal/bugfix/custom-inputs

This commit is contained in:
Bailey Pumfleet authored and GitHub committed 2021-08-16 10:35:28 +01:00
commit 06dce130b2
6 files changed
+44 -1172

No files matched your search

@@ -0,0 +1,14 @@
-- CreateEnum
CREATE TYPE "EventTypeCustomInputType" AS ENUM ('text', 'textLong', 'number', 'bool');
--- AlterTable
ALTER TABLE "EventTypeCustomInput" RENAME COLUMN "type" TO "type_old";
ALTER TABLE "EventTypeCustomInput" ADD COLUMN "type" "EventTypeCustomInputType";
-- UpdateTable
UPDATE "EventTypeCustomInput" SET "type" = CAST( "type_old" AS "EventTypeCustomInputType" );
-- AlterTable
ALTER TABLE "EventTypeCustomInput" ALTER COLUMN "type" SET NOT NULL;
ALTER TABLE "EventTypeCustomInput" DROP COLUMN "type_old";
+8 -1
View File
@@ -163,12 +163,19 @@ model SelectedCalendar {
@@id([userId,integration,externalId])
}
enum EventTypeCustomInputType {
TEXT @map("text")
TEXTLONG @map("textLong")
NUMBER @map("number")
BOOL @map("bool")
}
model EventTypeCustomInput {
id Int @id @default(autoincrement())
eventTypeId Int
eventType EventType @relation(fields: [eventTypeId], references: [id])
label String
type String
type EventTypeCustomInputType
required Boolean
}