aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-08 16:26:08 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-08 16:38:03 +0200
commit79ab08f123b13eb52c1f2c6ab828a2586ac8aaa3 (patch)
tree3e893b81b445d5cd4e4c89cee811e2dfee2e98ee /sonar-core/src
parent6887183ae36fa1f6af8ef1001b760d57a21e2359 (diff)
downloadsonarqube-79ab08f123b13eb52c1f2c6ab828a2586ac8aaa3.tar.gz
sonarqube-79ab08f123b13eb52c1f2c6ab828a2586ac8aaa3.zip
SONAR-5447 Drop unused DB tables ACTIVE_RULE_CHANGES and ACTIVE_RULE_PARAM_CHANGES
Diffstat (limited to 'sonar-core/src')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java10
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql1
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl24
3 files changed, 5 insertions, 30 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
index 2eeaa8c21dd..4c6d911578e 100644
--- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
@@ -33,7 +33,7 @@ import java.util.List;
*/
public class DatabaseVersion implements BatchComponent, ServerComponent {
- public static final int LAST_VERSION = 556;
+ public static final int LAST_VERSION = 580;
public static enum Status {
UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
@@ -48,9 +48,8 @@ public class DatabaseVersion implements BatchComponent, ServerComponent {
"action_plans",
"active_dashboards",
"active_rules",
- "active_rule_changes",
"active_rule_parameters",
- "active_rule_param_changes",
+ "activities",
"authors",
"characteristics",
"dashboards",
@@ -92,9 +91,8 @@ public class DatabaseVersion implements BatchComponent, ServerComponent {
"users",
"user_roles",
"widgets",
- "widget_properties",
- "activities"
- );
+ "widget_properties"
+ );
private MyBatis mybatis;
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
index cfc4e72849d..79458576885 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
@@ -249,6 +249,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('553');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('554');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('555');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('556');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('580');
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/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
index a740173f02b..c3a7095f900 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
@@ -78,14 +78,6 @@ CREATE TABLE "GROUPS" (
"UPDATED_AT" TIMESTAMP
);
-CREATE TABLE "ACTIVE_RULE_PARAM_CHANGES" (
- "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
- "ACTIVE_RULE_CHANGE_ID" INTEGER NOT NULL,
- "RULES_PARAMETER_ID" INTEGER NOT NULL,
- "OLD_VALUE" VARCHAR(4000),
- "NEW_VALUE" VARCHAR(4000)
-);
-
CREATE TABLE "SNAPSHOTS" (
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"CREATED_AT" TIMESTAMP,
@@ -226,18 +218,6 @@ CREATE TABLE "DUPLICATIONS_INDEX" (
"END_LINE" INTEGER NOT NULL
);
-CREATE TABLE "ACTIVE_RULE_CHANGES" (
- "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
- "USERNAME" VARCHAR(255),
- "PROFILE_ID" INTEGER NOT NULL,
- "PROFILE_VERSION" INTEGER NOT NULL,
- "RULE_ID" INTEGER NOT NULL,
- "CHANGE_DATE" TIMESTAMP NOT NULL,
- "ENABLED" BOOLEAN,
- "OLD_SEVERITY" INTEGER,
- "NEW_SEVERITY" INTEGER
-);
-
CREATE TABLE "PROJECT_MEASURES" (
"ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"VALUE" DOUBLE,
@@ -601,12 +581,8 @@ CREATE INDEX "DEPS_PRJ_SID" ON "DEPENDENCIES" ("PROJECT_SNAPSHOT_ID");
CREATE INDEX "MEASURES_SID_METRIC" ON "PROJECT_MEASURES" ("SNAPSHOT_ID", "METRIC_ID");
-CREATE INDEX "ACTIVE_RULE_CHANGES_PID" ON "ACTIVE_RULE_CHANGES" ("PROFILE_ID");
-
CREATE UNIQUE INDEX "METRICS_UNIQUE_NAME" ON "METRICS" ("NAME");
-CREATE INDEX "ACTIVE_RULE_PARAM_CHANGES_CID" ON "ACTIVE_RULE_PARAM_CHANGES" ("ACTIVE_RULE_CHANGE_ID");
-
CREATE INDEX "EVENTS_SNAPSHOT_ID" ON "EVENTS" ("SNAPSHOT_ID");
CREATE INDEX "EVENTS_RESOURCE_ID" ON "EVENTS" ("RESOURCE_ID");