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;