GitFOSS
/*
  Warnings:

  - A unique constraint covering the columns `[uid,targetRepositoryId]` on the table `PullRequest` will be added. If there are existing duplicate values, this will fail.
  - A unique constraint covering the columns `[sourceRepositoryId,sourceBranch,targetRepositoryId,targetBranch]` on the table `PullRequest` will be added. If there are existing duplicate values, this will fail.
  - A unique constraint covering the columns `[slug,organizationId]` on the table `Repository` will be added. If there are existing duplicate values, this will fail.

*/
-- DropIndex
DROP INDEX "Repository_slug_key";

-- CreateIndex
CREATE UNIQUE INDEX "PullRequest_uid_targetRepositoryId_key" ON "PullRequest"("uid", "targetRepositoryId");

-- CreateIndex
CREATE UNIQUE INDEX "PullRequest_sourceRepositoryId_sourceBranch_targetRepositor_key" ON "PullRequest"("sourceRepositoryId", "sourceBranch", "targetRepositoryId", "targetBranch");

-- CreateIndex
CREATE UNIQUE INDEX "Repository_slug_organizationId_key" ON "Repository"("slug", "organizationId");