From e666a53ee2e93e36159dc53332a4e86940d22960 Mon Sep 17 00:00:00 2001 From: Gaurav Karakoti Date: Wed, 8 Jul 2026 11:16:25 +0530 Subject: [PATCH] Migrations --- prisma/migrations/20260708054555/migration.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 prisma/migrations/20260708054555/migration.sql diff --git a/prisma/migrations/20260708054555/migration.sql b/prisma/migrations/20260708054555/migration.sql new file mode 100644 index 0000000..47743da --- /dev/null +++ b/prisma/migrations/20260708054555/migration.sql @@ -0,0 +1,15 @@ +-- AlterTable +ALTER TABLE "WebhookEvent" ADD COLUMN "pullRequestId" TEXT, +ADD COLUMN "repositoryId" TEXT; + +-- CreateIndex +CREATE INDEX "WebhookEvent_repositoryId_idx" ON "WebhookEvent"("repositoryId"); + +-- CreateIndex +CREATE INDEX "WebhookEvent_pullRequestId_idx" ON "WebhookEvent"("pullRequestId"); + +-- AddForeignKey +ALTER TABLE "WebhookEvent" ADD CONSTRAINT "WebhookEvent_repositoryId_fkey" FOREIGN KEY ("repositoryId") REFERENCES "Repository"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "WebhookEvent" ADD CONSTRAINT "WebhookEvent_pullRequestId_fkey" FOREIGN KEY ("pullRequestId") REFERENCES "PullRequest"("id") ON DELETE CASCADE ON UPDATE CASCADE;