aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-01-31 23:16:27 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-02-01 01:29:28 +0400
commit9113a3ddd0f293ad533c324f966305f52d0167db (patch)
tree81a46bd813cdf97763da8fc35caa37d3eb42e280 /sonar-core/src
parent25cce78adae4a6aefce26416c4b763a23c3fc3c7 (diff)
downloadsonarqube-9113a3ddd0f293ad533c324f966305f52d0167db.tar.gz
sonarqube-9113a3ddd0f293ad533c324f966305f52d0167db.zip
Add column PROJECT_MEASURES.COMMITTER
Diffstat (limited to 'sonar-core/src')
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql1
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl1
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot-result.xml3
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot-result.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot-result.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot.xml4
9 files changed, 24 insertions, 7 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
index 43055ee6f15..2cddd8ca3b8 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
@@ -34,7 +34,7 @@ public class SchemaMigration {
public final static int VERSION_UNKNOWN = -1;
- public static final int LAST_VERSION = 255;
+ public static final int LAST_VERSION = 256;
public static final int VERSION_2_13 = 241;
public final static String TABLE_NAME = "schema_migrations";
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
index e5772797a15..0595de8d11d 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
@@ -174,6 +174,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('252');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('253');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('254');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('255');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('256');
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-derby.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
index 4c718b808b5..33f37c08298 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
@@ -269,6 +269,7 @@ CREATE TABLE "PROJECT_MEASURES" (
"DESCRIPTION" VARCHAR(4000),
"RULE_PRIORITY" INTEGER,
"CHARACTERISTIC_ID" INTEGER,
+ "COMMITTER" VARCHAR(100),
"VARIATION_VALUE_1" DECIMAL(30,20),
"VARIATION_VALUE_2" DECIMAL(30,20),
"VARIATION_VALUE_3" DECIMAL(30,20),
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot-result.xml
index 0e4a881787d..4d1a6497fbd 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot-result.xml
@@ -24,6 +24,7 @@
rule_priority="[null]"
alert_text="[null]" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="1" rules_category_id="[null]"
RULE_ID="1"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]"/>
<measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
@@ -34,4 +35,4 @@
event_date="2008-12-02 13:58:00.00" created_at="[null]"/>
<duplications_index project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0" end_line="0"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot.xml
index f2e86016ae0..44e7dc5dcda 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot.xml
@@ -22,6 +22,7 @@
rule_priority="[null]"
alert_text="[null]" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="1" rules_category_id="[null]"
RULE_ID="1"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]"/>
<measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
@@ -58,6 +59,7 @@
rule_priority="[null]"
alert_text="[null]" VALUE="10.0" METRIC_ID="1" SNAPSHOT_ID="5" rules_category_id="[null]"
RULE_ID="1"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]"/>
<measure_data id="2" measure_id="2" snapshot_id="5" data="[null]"/>
@@ -70,4 +72,4 @@
<events id="2" name="Version 1.0" resource_id="5" snapshot_id="5" category="VERSION" description="[null]"
event_date="2008-12-02 13:58:00.00" created_at="[null]"/>
<duplications_index project_snapshot_id="5" snapshot_id="5" hash="bb" index_in_file="0" start_line="0" end_line="0"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot-result.xml
index c1077590dc6..b85e127f0c2 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot-result.xml
@@ -22,23 +22,27 @@
<project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="1"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<!-- delete measure on rule -->
<!--<project_measures ID="2" project_id="1" SNAPSHOT_ID="1" RULE_ID="33" characteristic_id="[null]" METRIC_ID="1" -->
<!--url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"-->
<!--variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"-->
+ <!--committer="[null]"-->
<!--text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>-->
<!-- delete measure on quality model characteristic -->
<!--<project_measures ID="3" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="22" METRIC_ID="1" -->
<!--url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"-->
<!--variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"-->
+ <!--committer="[null]"-->
<!--text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>-->
<!-- delete measure on metrics that are flagged with delete_historical_data=true -->
<!--<project_measures ID="4" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="2"-->
<!--url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"-->
<!--variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"-->
+ <!--committer="[null]"-->
<!--text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>-->
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml
index cb64a8e5472..da5222a4a64 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml
@@ -22,23 +22,27 @@
<project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="1"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<!-- delete measure on rule -->
<project_measures ID="2" project_id="1" SNAPSHOT_ID="1" RULE_ID="33" characteristic_id="[null]" METRIC_ID="1"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<!-- delete measure on quality model characteristic -->
<project_measures ID="3" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="22" METRIC_ID="1"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<!-- delete measure on metrics that are flagged with delete_historical_data=true -->
<project_measures ID="4" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]" METRIC_ID="2"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot-result.xml
index 62c15e5c0d9..c3a2cd2aeff 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot-result.xml
@@ -29,6 +29,7 @@ Note that measures, events and reviews are not deleted.
<project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
@@ -74,6 +75,7 @@ Note that measures, events and reviews are not deleted.
<project_measures ID="2" project_id="2" SNAPSHOT_ID="2" RULE_ID="[null]" characteristic_id="[null]"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<measure_data id="2" measure_id="2" snapshot_id="2" data="[null]"/>
@@ -96,4 +98,4 @@ Note that measures, events and reviews are not deleted.
rule_failure_permanent_id="1" resolution="[null]" created_at="[null]" updated_at="[null]" resource_line="200" severity="BLOCKER"
user_id="300" assignee_id="300" rule_id="500" manual_violation="[true]" manual_severity="[false]" title="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot.xml
index 9968babaf52..e0132f542ed 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot.xml
@@ -21,6 +21,7 @@
<project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<measure_data id="1" measure_id="1" snapshot_id="1" data="[null]"/>
@@ -67,6 +68,7 @@
<project_measures ID="2" project_id="2" SNAPSHOT_ID="2" RULE_ID="[null]" characteristic_id="[null]"
url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
+ committer="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"/>
<measure_data id="2" measure_id="2" snapshot_id="2" data="[null]"/>
@@ -89,4 +91,4 @@
rule_failure_permanent_id="1" resolution="[null]" created_at="[null]" updated_at="[null]" resource_line="200" severity="BLOCKER"
user_id="300" assignee_id="300" rule_id="500" manual_violation="[true]" manual_severity="[false]" title="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>