aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-02-15 13:50:01 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-02-15 13:50:01 +0100
commit6b67f3c2ac1a2078a2eceba647f328fd47f3f568 (patch)
treede5721e9181f8e7e8d69a8880cb6ffb2447aadf0 /sonar-core/src
parent364850c6ee27e86a6a788a6d7bf5c889ca7bf55a (diff)
downloadsonarqube-6b67f3c2ac1a2078a2eceba647f328fd47f3f568.tar.gz
sonarqube-6b67f3c2ac1a2078a2eceba647f328fd47f3f568.zip
SONAR-3208 use PERSON_ID instead of COMMITTER in PROJECT_MEASURES and RULE_FAILURES
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.sql3
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot-result.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteSnapshot.xml10
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot-result.xml10
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteWastedMeasuresWhenPurgingSnapshot.xml10
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot-result.xml8
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeSnapshot.xml8
9 files changed, 29 insertions, 30 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 610d9586c5a..9c79cdab541 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 = 262;
+ public static final int LAST_VERSION = 263;
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 1038bf1ddc2..814ce5a3896 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
@@ -126,7 +126,6 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('139');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('140');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('141');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('142');
-INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('150');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('151');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('160');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('162');
@@ -138,7 +137,6 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('168');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('169');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('170');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('180');
-INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('181');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('190');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('191');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('200');
@@ -180,6 +178,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('259');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('260');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('261');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('262');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('263');
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 e301e098883..76401c8acc2 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,7 +269,7 @@ CREATE TABLE "PROJECT_MEASURES" (
"DESCRIPTION" VARCHAR(4000),
"RULE_PRIORITY" INTEGER,
"CHARACTERISTIC_ID" INTEGER,
- "COMMITTER" VARCHAR(100),
+ "PERSON_ID" INTEGER,
"VARIATION_VALUE_1" DECIMAL(30,20),
"VARIATION_VALUE_2" DECIMAL(30,20),
"VARIATION_VALUE_3" DECIMAL(30,20),
@@ -435,7 +435,7 @@ CREATE TABLE "RULE_FAILURES" (
"CHECKSUM" VARCHAR(1000),
"PERMANENT_ID" INTEGER,
"SWITCHED_OFF" BOOLEAN,
- "COMMITTER" VARCHAR(100)
+ "PERSON_ID" INTEGER
);
CREATE TABLE "METRICS" (
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 4d1a6497fbd..6734c0522a8 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
@@ -17,14 +17,14 @@
<rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg1" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<project_measures ID="1" 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" SNAPSHOT_ID="1" rules_category_id="[null]"
RULE_ID="1"
- committer="[null]"
+ person_id="[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]"/>
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 44e7dc5dcda..61ebfe5caab 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
@@ -15,14 +15,14 @@
<rule_failures switched_off="[null]" permanent_id="[null]" ID="1" SNAPSHOT_ID="1" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg1" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<project_measures ID="1" 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" SNAPSHOT_ID="1" rules_category_id="[null]"
RULE_ID="1"
- committer="[null]"
+ person_id="[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]"/>
@@ -48,18 +48,18 @@
<rule_failures switched_off="[null]" permanent_id="[null]" ID="3" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg3" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<rule_failures switched_off="[null]" permanent_id="[null]" ID="4" SNAPSHOT_ID="5" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg4" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<project_measures ID="2" 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" SNAPSHOT_ID="5" rules_category_id="[null]"
RULE_ID="1"
- committer="[null]"
+ person_id="[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]"/>
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 dcfd0d0df95..d264293021c 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
@@ -32,7 +32,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
@@ -42,7 +42,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>-->
@@ -52,7 +52,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
@@ -62,7 +62,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>-->
@@ -72,7 +72,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>-->
</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 ca84cdee1af..b9fddbbc0c9 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
@@ -32,7 +32,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
@@ -42,7 +42,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
@@ -52,7 +52,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
@@ -62,7 +62,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
@@ -72,7 +72,7 @@
variation_value_4="[null]"
variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" value="10.0"
rules_category_id="[null]"
- committer="[null]"
+ person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]"/>
</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 c3a2cd2aeff..b8af6c0b035 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
@@ -24,12 +24,12 @@ Note that measures, events and reviews are not deleted.
<!--switched_off="[null]" permanent_id="[null]" RULE_ID="1" FAILURE_LEVEL="2"-->
<!--MESSAGE="msg1" LINE="[null]" COST="[null]"-->
<!--created_at="2008-12-02 13:58:00.00"-->
- <!--checksum="[null]" committer="[null]"/>-->
+ <!--checksum="[null]" person_id="[null]"/>-->
<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]"
+ person_id="[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]"/>
@@ -70,12 +70,12 @@ Note that measures, events and reviews are not deleted.
switched_off="[null]" permanent_id="[null]" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg1" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<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]"
+ person_id="[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]"/>
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 e0132f542ed..ef7489378b9 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
@@ -16,12 +16,12 @@
switched_off="[null]" permanent_id="[null]" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg1" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<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]"
+ person_id="[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]"/>
@@ -63,12 +63,12 @@
switched_off="[null]" permanent_id="[null]" RULE_ID="1" FAILURE_LEVEL="2"
MESSAGE="msg1" LINE="[null]" COST="[null]"
created_at="2008-12-02 13:58:00.00"
- checksum="[null]" committer="[null]"/>
+ checksum="[null]" person_id="[null]"/>
<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]"
+ person_id="[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]"/>