cal.pub0.org/prisma/migrations/20211004231654_add_webhook_.../migration.sql

18 lines
511 B
MySQL
Raw Normal View History

-- CreateEnum
CREATE TYPE "WebhookTriggerEvents" AS ENUM ('BOOKING_CREATED', 'BOOKING_RESCHEDULED', 'BOOKING_CANCELLED');
-- CreateTable
CREATE TABLE "Webhook" (
"id" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
"subscriberUrl" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"active" BOOLEAN NOT NULL DEFAULT true,
"eventTriggers" "WebhookTriggerEvents"[],
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Webhook.id_unique" ON "Webhook"("id");