diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-11-25 19:40:40 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-11-26 13:55:54 +0100 |
commit | ecf1abd2abfc95257cc9bb22f1e4db3c505d6d5d (patch) | |
tree | 2aa07e6998f9565adb071fa40e6f7364b49a236d /sonar-core/src | |
parent | a38602149510e58a7f2421faa02327feb8236396 (diff) | |
download | sonarqube-ecf1abd2abfc95257cc9bb22f1e4db3c505d6d5d.tar.gz sonarqube-ecf1abd2abfc95257cc9bb22f1e4db3c505d6d5d.zip |
SONAR-3825 favourite measure filters
Diffstat (limited to 'sonar-core/src')
4 files changed, 13 insertions, 2 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java index c8d1d3f41da..dff45f0fe94 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java @@ -67,6 +67,7 @@ public final class DatabaseUtils { "manual_measures", "measure_data", "measure_filters", + "measure_filter_favourites", "metrics", "notifications", "projects", 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 dbf65739635..02c2f840137 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 @@ -32,7 +32,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 357; + public static final int LAST_VERSION = 358; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL 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 a932334fdce..a46a8fdb1b9 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 @@ -185,6 +185,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('354'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('355'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('356'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('357'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('358'); 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 98e7e586b04..576451a88a2 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 @@ -525,6 +525,13 @@ CREATE TABLE "MEASURE_FILTERS" ( "UPDATED_AT" TIMESTAMP ); +CREATE TABLE "MEASURE_FILTER_FAVOURITES" ( + "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), + "USER_ID" INTEGER NOT NULL, + "MEASURE_FILTER_ID" INTEGER NOT NULL, + "CREATED_AT" TIMESTAMP +); + -- ---------------------------------------------- -- DDL Statements for indexes -- ---------------------------------------------- @@ -631,4 +638,6 @@ CREATE INDEX "SEMAPHORE_NAMES" ON "SEMAPHORES" ("NAME"); CREATE UNIQUE INDEX "UNIQ_AUTHOR_LOGINS" ON "AUTHORS" ("LOGIN"); -CREATE INDEX "MEASURE_FILTERS_NAME" ON "MEASURE_FILTERS" ("NAME");
\ No newline at end of file +CREATE INDEX "MEASURE_FILTERS_NAME" ON "MEASURE_FILTERS" ("NAME"); + +CREATE INDEX "MEASURE_FILTER_FAVS_USERID" ON "MEASURE_FILTER_FAVOURITES" ("USER_ID");
\ No newline at end of file |