aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-05-28 15:34:04 +0200
committerEric Hartmann <hartmann.eric@gmail.com>2017-06-14 15:43:12 +0200
commitbab99c01f67f310636502eccbf9952e4e0ea42c1 (patch)
tree3003966410f84a316e843b5f5ddfc0d97b289ab8 /server/sonar-db-core
parentd5bdf821a39621dbf4bd60dbb3412ea5c36b6ddc (diff)
downloadsonarqube-bab99c01f67f310636502eccbf9952e4e0ea42c1.tar.gz
sonarqube-bab99c01f67f310636502eccbf9952e4e0ea42c1.zip
SONAR-9304 share built-in profiles among organizations
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java1
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl11
2 files changed, 12 insertions, 0 deletions
diff --git a/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java b/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java
index b3be68dc6c6..0a6eadea9f5 100644
--- a/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java
+++ b/server/sonar-db-core/src/main/java/org/sonar/db/version/SqTables.java
@@ -52,6 +52,7 @@ public final class SqTables {
"ce_queue",
"ce_task_input",
"ce_scanner_context",
+ "default_qprofiles",
"duplications_index",
"events",
"file_sources",
diff --git a/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
index c2337412081..1a2ddb355f7 100644
--- a/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
+++ b/server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
@@ -61,6 +61,17 @@ CREATE TABLE "RULES_PROFILES" (
CREATE UNIQUE INDEX "UNIQ_QPROF_KEY" ON "RULES_PROFILES" ("KEE");
+CREATE TABLE "DEFAULT_QPROFILES" (
+ "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
+ "LANGUAGE" VARCHAR(20) NOT NULL,
+ "QPROFILE_UUID" VARCHAR(40) NOT NULL,
+ "CREATED_AT" BIGINT NOT NULL,
+ "UPDATED_AT" BIGINT NOT NULL
+);
+CREATE PRIMARY KEY ON "DEFAULT_QPROFILES" ("ORGANIZATION_UUID", "LANGUAGE");
+CREATE UNIQUE INDEX "UNIQ_DEFAULT_QPROFILES_UUID" ON "DEFAULT_QPROFILES" ("QPROFILE_UUID");
+
+
CREATE TABLE "PROJECT_QPROFILES" (
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"PROJECT_UUID" VARCHAR(50) NOT NULL,