ava/prisma/migrations/20241120195003_add_webhooks/migration.sql

11 lines
359 B
MySQL
Raw Permalink Normal View History

2024-11-20 13:03:46 -08:00
-- CreateTable
CREATE TABLE "Webhook" (
"userId" TEXT NOT NULL,
"url" TEXT NOT NULL,
"enabled" BOOLEAN NOT NULL DEFAULT true,
CONSTRAINT "Webhook_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("userId") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "Webhook_url_userId_key" ON "Webhook"("url", "userId");