Merge pull request #450 from emrysal/bugfix/custom-inputs
This commit is contained in:
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";
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user