aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/schema
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-db-dao/src/schema')
-rw-r--r--server/sonar-db-dao/src/schema/schema-sq.ddl3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl
index 2913cd77daf..a2b0728d00e 100644
--- a/server/sonar-db-dao/src/schema/schema-sq.ddl
+++ b/server/sonar-db-dao/src/schema/schema-sq.ddl
@@ -569,6 +569,7 @@ CREATE TABLE "PORTFOLIO_PROJECTS"(
"CREATED_AT" BIGINT NOT NULL
);
ALTER TABLE "PORTFOLIO_PROJECTS" ADD CONSTRAINT "PK_PORTFOLIO_PROJECTS" PRIMARY KEY("UUID");
+CREATE UNIQUE INDEX "UNIQ_PORTFOLIO_PROJECTS" ON "PORTFOLIO_PROJECTS"("PORTFOLIO_UUID", "PROJECT_UUID");
CREATE TABLE "PORTFOLIO_REFERENCES"(
"UUID" VARCHAR(40) NOT NULL,
@@ -577,6 +578,7 @@ CREATE TABLE "PORTFOLIO_REFERENCES"(
"CREATED_AT" BIGINT NOT NULL
);
ALTER TABLE "PORTFOLIO_REFERENCES" ADD CONSTRAINT "PK_PORTFOLIO_REFERENCES" PRIMARY KEY("UUID");
+CREATE UNIQUE INDEX "UNIQ_PORTFOLIO_REFERENCES" ON "PORTFOLIO_REFERENCES"("PORTFOLIO_UUID", "REFERENCE_UUID");
CREATE TABLE "PORTFOLIOS"(
"UUID" VARCHAR(40) NOT NULL,
@@ -592,6 +594,7 @@ CREATE TABLE "PORTFOLIOS"(
"UPDATED_AT" BIGINT NOT NULL
);
ALTER TABLE "PORTFOLIOS" ADD CONSTRAINT "PK_PORTFOLIOS" PRIMARY KEY("UUID");
+CREATE UNIQUE INDEX "UNIQ_PORTFOLIOS_KEE" ON "PORTFOLIOS"("KEE");
CREATE TABLE "PROJECT_ALM_SETTINGS"(
"UUID" VARCHAR(40) NOT NULL,