aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/schema
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2021-09-07 11:39:58 -0500
committersonartech <sonartech@sonarsource.com>2021-09-08 20:03:35 +0000
commit0a87b29e830ae08e65abb90a947431f3fd3cceeb (patch)
tree3bd76adadd7b2978d61bf4582fa28d9f3b1653a1 /server/sonar-db-dao/src/schema
parenta5cdfb5877fb07448302bf655c4c2834df9d384b (diff)
downloadsonarqube-0a87b29e830ae08e65abb90a947431f3fd3cceeb.tar.gz
sonarqube-0a87b29e830ae08e65abb90a947431f3fd3cceeb.zip
SONAR-15259 Add DB indexes
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,