aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-12-19 14:24:45 +0100
committerFabrice Bellingard <bellingard@gmail.com>2011-12-19 14:25:24 +0100
commit610521d0c0b66af51935816efdcaa63b2da709ad (patch)
tree1404e855ec4cbaf492f53548fa45ff63118c6d7a /sonar-core
parent8a9e343839b56b29534cf303ffa91015a5a72870 (diff)
downloadsonarqube-610521d0c0b66af51935816efdcaa63b2da709ad.tar.gz
sonarqube-610521d0c0b66af51935816efdcaa63b2da709ad.zip
SONAR-2662 Add missing files linked to new table "action_plans"
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java2
-rw-r--r--sonar-core/src/main/resources/org/sonar/persistence/rows-derby.sql1
-rw-r--r--sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl27
3 files changed, 30 insertions, 0 deletions
diff --git a/sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java b/sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java
index 3ce9cbc37e9..eb3c6fbb0c8 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java
+++ b/sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java
@@ -37,6 +37,8 @@ public final class DatabaseUtils {
* for all the supported databases, particularly due to Oracle results.
*/
public static final String[] TABLE_NAMES = {
+ "action_plans",
+ "action_plans_reviews",
"active_dashboards",
"active_filters",
"active_rules",
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/rows-derby.sql b/sonar-core/src/main/resources/org/sonar/persistence/rows-derby.sql
index fa0381c613c..d7e195a9ace 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/rows-derby.sql
+++ b/sonar-core/src/main/resources/org/sonar/persistence/rows-derby.sql
@@ -166,6 +166,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('234');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('235');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('236');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('237');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('238');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl b/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl
index a08c965bdcf..25324f9e366 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl
+++ b/sonar-core/src/main/resources/org/sonar/persistence/schema-derby.ddl
@@ -467,6 +467,24 @@ CREATE TABLE "RESOURCE_INDEX" (
"PROJECT_ID" INTEGER NOT NULL
);
+CREATE TABLE "ACTION_PLANS" (
+ "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
+ "USER_ID" INTEGER,
+ "NAME" VARCHAR(200),
+ "DESCRIPTION" VARCHAR(1000),
+ "DEAD_LINE" TIMESTAMP,
+ "USER_LOGIN" VARCHAR(40),
+ "PROJECT_ID" INTEGER,
+ "STATUS" VARCHAR(10),
+ "CREATED_AT" TIMESTAMP,
+ "UPDATED_AT" TIMESTAMP
+);
+
+CREATE TABLE "ACTION_PLANS_REVIEWS" (
+ "ACTION_PLAN_ID" INTEGER,
+ "REVIEW_ID" INTEGER
+);
+
-- ----------------------------------------------
-- DDL Statements for indexes
@@ -552,6 +570,13 @@ CREATE INDEX "PROJECTS_KEE" ON "PROJECTS" ("KEE");
CREATE INDEX "RESOURCE_INDEX_KEE" ON "RESOURCE_INDEX" ("KEE");
+CREATE INDEX "INDEX_ACTION_PLANS_ON_PROJET_ID" ON "ACTION_PLANS" ("PROJECT_ID");
+
+CREATE INDEX "INDEX_ACTION_PLANS_REVIEWS_ON_ACTION_PLAN_ID" ON "ACTION_PLANS_REVIEWS" ("ACTION_PLAN_ID");
+
+CREATE INDEX "INDEX_ACTION_PLANS_REVIEWS_ON_REVIEW_ID" ON "ACTION_PLANS_REVIEWS" ("REVIEW_ID");
+
+
-- ----------------------------------------------
-- DDL Statements for keys
-- ----------------------------------------------
@@ -638,3 +663,5 @@ ALTER TABLE "RULES_PROFILES" ADD CONSTRAINT "SQL110927104437540" PRIMARY KEY ("I
ALTER TABLE "ACTIVE_RULE_PARAMETERS" ADD CONSTRAINT "SQL110927104437560" PRIMARY KEY ("ID");
ALTER TABLE "LOADED_TEMPLATES" ADD CONSTRAINT "SQL110927104437650" PRIMARY KEY ("ID");
+
+ALTER TABLE "ACTION_PLANS" ADD CONSTRAINT "SQL110927104447650" PRIMARY KEY ("ID");