aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-11-22 19:15:55 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-11-26 13:54:16 +0100
commit5c920f1d8e47f3c61f951fecf3e1fa6e31a1892a (patch)
treee56ebecb4ba742d19c2185ef465edd684bde100f /sonar-core
parentb6fe0fa6e5af97a38224c53449c316dd1978d848 (diff)
downloadsonarqube-5c920f1d8e47f3c61f951fecf3e1fa6e31a1892a.tar.gz
sonarqube-5c920f1d8e47f3c61f951fecf3e1fa6e31a1892a.zip
SONAR-3825 create the table MEASURE_FILTERS
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java1
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java2
-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.ddl13
4 files changed, 16 insertions, 1 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 a5f48c1176c..c8d1d3f41da 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
@@ -66,6 +66,7 @@ public final class DatabaseUtils {
"loaded_templates",
"manual_measures",
"measure_data",
+ "measure_filters",
"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 ead0244d6d9..92f576c9a8f 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 = 355;
+ public static final int LAST_VERSION = 356;
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 fc61fc82ba1..fbdfac52f67 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
@@ -183,6 +183,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('352');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('353');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('354');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('355');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('356');
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 58dfdbb09da..e67a2a9ef63 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
@@ -514,6 +514,17 @@ CREATE TABLE "SEMAPHORES" (
"LOCKED_AT" TIMESTAMP
);
+CREATE TABLE "MEASURE_FILTERS" (
+ "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
+ "NAME" VARCHAR(100) NOT NULL,
+ "SHARED" BOOLEAN NOT NULL,
+ "USER_ID" INTEGER,
+ "DESCRIPTION" VARCHAR(4000),
+ "DATA" CLOB(2147483647),
+ "CREATED_AT" TIMESTAMP,
+ "UPDATED_AT" TIMESTAMP
+);
+
-- ----------------------------------------------
-- DDL Statements for indexes
-- ----------------------------------------------
@@ -619,3 +630,5 @@ CREATE UNIQUE INDEX "UNIQ_SEMAPHORE_CHECKSUMS" ON "SEMAPHORES" ("CHECKSUM");
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