aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/schema
diff options
context:
space:
mode:
authorEric Giffon <eric.giffon@sonarsource.com>2024-08-27 11:15:55 +0200
committersonartech <sonartech@sonarsource.com>2024-10-09 20:02:45 +0000
commita4da413ce8b4eab78aadc9e492d437f45d9b7e6f (patch)
tree0de148fd6be461677198ce16f846efb7d9e7b4e4 /server/sonar-db-dao/src/schema
parent20bb622af8982eba8fa419d9ae22e4aa66569ed5 (diff)
downloadsonarqube-a4da413ce8b4eab78aadc9e492d437f45d9b7e6f.tar.gz
sonarqube-a4da413ce8b4eab78aadc9e492d437f45d9b7e6f.zip
SONAR-22871 Create measures table
Diffstat (limited to 'server/sonar-db-dao/src/schema')
-rw-r--r--server/sonar-db-dao/src/schema/schema-sq.ddl11
1 files changed, 11 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 ea869a1910b..f19c8ed7a70 100644
--- a/server/sonar-db-dao/src/schema/schema-sq.ddl
+++ b/server/sonar-db-dao/src/schema/schema-sq.ddl
@@ -532,6 +532,17 @@ ALTER TABLE "LIVE_MEASURES" ADD CONSTRAINT "PK_LIVE_MEASURES" PRIMARY KEY("UUID"
CREATE INDEX "LIVE_MEASURES_PROJECT" ON "LIVE_MEASURES"("PROJECT_UUID" NULLS FIRST);
CREATE UNIQUE NULLS NOT DISTINCT INDEX "LIVE_MEASURES_COMPONENT" ON "LIVE_MEASURES"("COMPONENT_UUID" NULLS FIRST, "METRIC_UUID" NULLS FIRST);
+CREATE TABLE "MEASURES"(
+ "COMPONENT_UUID" CHARACTER VARYING(40) NOT NULL,
+ "BRANCH_UUID" CHARACTER VARYING(40) NOT NULL,
+ "JSON_VALUE" CHARACTER LARGE OBJECT NOT NULL,
+ "JSON_VALUE_HASH" BIGINT NOT NULL,
+ "CREATED_AT" BIGINT NOT NULL,
+ "UPDATED_AT" BIGINT NOT NULL
+);
+ALTER TABLE "MEASURES" ADD CONSTRAINT "PK_MEASURES" PRIMARY KEY("COMPONENT_UUID");
+CREATE INDEX "MEASURES_BRANCH_UUID" ON "MEASURES"("BRANCH_UUID" NULLS FIRST);
+
CREATE TABLE "METRICS"(
"UUID" CHARACTER VARYING(40) NOT NULL,
"NAME" CHARACTER VARYING(64) NOT NULL,