aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-03-08 14:53:33 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-03-21 13:05:50 +0100
commita136d807a7f077a4b30640895a7c963a0a437ed4 (patch)
tree97141a27f734bc9811cc5bdba648a25c616b066a /server/sonar-db-core
parent7ef4049bb90957c632cd951e7ba673be01ea4010 (diff)
downloadsonarqube-a136d807a7f077a4b30640895a7c963a0a437ed4.tar.gz
sonarqube-a136d807a7f077a4b30640895a7c963a0a437ed4.zip
SONAR-8902 Create Table ORGANIZATION_MEMBERS
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/rows-h2.sql1
-rw-r--r--server/sonar-db-core/src/main/resources/org/sonar/db/version/schema-h2.ddl5
3 files changed, 7 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 968be26f244..6c34930e32f 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
@@ -67,6 +67,7 @@ public final class SqTables {
"metrics",
"notifications",
"organizations",
+ "organization_members",
"permission_templates",
"perm_templates_users",
"perm_templates_groups",
diff --git a/server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql b/server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql
index 1ecd670a4c8..bdc5d70fd88 100644
--- a/server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql
+++ b/server/sonar-db-core/src/main/resources/org/sonar/db/version/rows-h2.sql
@@ -539,6 +539,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1603');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1604');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1605');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1606');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1607');
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', false, '1418215735482', '1418215735482');
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
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 3b50a832c0b..f08ac56173f 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
@@ -15,6 +15,11 @@ CREATE TABLE "ORGANIZATIONS" (
CREATE UNIQUE INDEX "PK_ORGANIZATIONS" ON "ORGANIZATIONS" ("UUID");
CREATE UNIQUE INDEX "ORGANIZATION_KEY" ON "ORGANIZATIONS" ("KEE");
+CREATE TABLE "ORGANIZATION_MEMBERS" (
+ "ORGANIZATION_UUID" VARCHAR(40) NOT NULL,
+ "USER_ID" INTEGER NOT NULL
+);
+CREATE PRIMARY KEY ON "ORGANIZATION_MEMBERS" ("ORGANIZATION_UUID", "USER_ID");
CREATE TABLE "GROUPS_USERS" (
"USER_ID" INTEGER,