aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-10-19 11:02:08 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-10-20 17:17:53 +0200
commit3201be2777a5cc1db23b0bb9b4b7130da6327fe4 (patch)
tree4a91bcf157460b3472d3a23f62791737b1451cb6 /sonar-db
parenta729e675c7fbe66212502068f4f38ea2b74f899d (diff)
downloadsonarqube-3201be2777a5cc1db23b0bb9b4b7130da6327fe4.tar.gz
sonarqube-3201be2777a5cc1db23b0bb9b4b7130da6327fe4.zip
SONAR-8134 add organization uuid to unique index of table GROUP_ROLES
Diffstat (limited to 'sonar-db')
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java2
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql1
-rw-r--r--sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl2
3 files changed, 3 insertions, 2 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java b/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java
index 87b056bba2a..22be5a76f91 100644
--- a/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java
@@ -30,7 +30,7 @@ import org.sonar.db.MyBatis;
public class DatabaseVersion {
- public static final int LAST_VERSION = 1_417;
+ public static final int LAST_VERSION = 1_418;
/**
* The minimum supported version which can be upgraded. Lower
diff --git a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql b/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql
index b75f9d9e716..b34c27e5662 100644
--- a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql
+++ b/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql
@@ -506,6 +506,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1414');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1415');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1416');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1417');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1418');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, EXTERNAL_IDENTITY, EXTERNAL_IDENTITY_PROVIDER, USER_LOCAL, CRYPTED_PASSWORD, SALT, IS_ROOT, CREATED_AT, UPDATED_AT) VALUES (1, 'admin', 'Administrator', '', 'admin', 'sonarqube', true, 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', true, '1418215735482', '1418215735482');
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
diff --git a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl
index 463dbb764ce..683d55b6a74 100644
--- a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl
+++ b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl
@@ -127,7 +127,7 @@ CREATE TABLE "GROUP_ROLES" (
"ROLE" VARCHAR(64) NOT NULL
);
CREATE INDEX "GROUP_ROLES_RESOURCE" ON "GROUP_ROLES" ("RESOURCE_ID");
-CREATE UNIQUE INDEX "UNIQ_GROUP_ROLES" ON "GROUP_ROLES" ("GROUP_ID", "RESOURCE_ID", "ROLE");
+CREATE UNIQUE INDEX "UNIQ_GROUP_ROLES" ON "GROUP_ROLES" ("ORGANIZATION_UUID", "GROUP_ID", "RESOURCE_ID", "ROLE");
CREATE TABLE "RULE_REPOSITORIES" (