aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-core')
-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.ddl2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml2
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml8
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml8
7 files changed, 16 insertions, 13 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 78d238fd14a..59a46e128ea 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 = 908;
+ public static final int LAST_VERSION = 909;
/**
* List of all the tables.n
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 32fdb045630..17bda5bde4b 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
@@ -332,6 +332,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('905');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('906');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('907');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('908');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('909');
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', '1418215735482', '1418215735482', 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 5ebe86e0e1b..78b7586205d 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
@@ -7,8 +7,10 @@ CREATE TABLE "DEPENDENCIES" (
"ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"FROM_SNAPSHOT_ID" INTEGER,
"FROM_RESOURCE_ID" INTEGER,
+ "FROM_COMPONENT_UUID" VARCHAR(50),
"TO_SNAPSHOT_ID" INTEGER,
"TO_RESOURCE_ID" INTEGER,
+ "TO_COMPONENT_UUID" VARCHAR(50),
"DEP_USAGE" VARCHAR(30),
"DEP_WEIGHT" INTEGER,
"PROJECT_SNAPSHOT_ID" INTEGER,
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
index e6e06a96fa9..9a0a675bc24 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
@@ -22,7 +22,7 @@
person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]" measure_data="[null]"/>
- <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="30" to_snapshot_id="30"
+ <dependencies id="1" from_resource_id="1" from_component_uuid="A" from_snapshot_id="1" to_resource_id="30" to_component_uuid="CC" to_snapshot_id="30"
parent_dependency_id="[null]" project_snapshot_id="1"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
<events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]"
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
index a4cabcfff0d..4c5a6d70b1c 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
@@ -21,7 +21,7 @@
person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]" measure_data="[null]"/>
- <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="30" to_snapshot_id="30"
+ <dependencies id="1" from_resource_id="1" from_component_uuid="A" from_snapshot_id="1" to_resource_id="30" to_component_uuid="CC" to_snapshot_id="30"
parent_dependency_id="[null]" project_snapshot_id="1"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
<events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]"
@@ -51,10 +51,10 @@
person_id="[null]"
text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
alert_status="[null]" description="[null]" measure_data="[null]"/>
- <dependencies id="2" from_resource_id="10" from_snapshot_id="10" to_resource_id="5" to_snapshot_id="5"
+ <dependencies id="2" from_resource_id="10" from_component_uuid="AA" from_snapshot_id="10" to_resource_id="5" to_component_uuid="E" to_snapshot_id="5"
parent_dependency_id="[null]" project_snapshot_id="5"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
- <dependencies id="3" from_resource_id="5" from_snapshot_id="5" to_resource_id="300" to_snapshot_id="300"
+ <dependencies id="3" from_resource_id="5" from_component_uuid="C" from_snapshot_id="5" to_resource_id="300" to_component_uuid="CCC" to_snapshot_id="300"
parent_dependency_id="[null]" project_snapshot_id="5"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
<events id="2" name="Version 1.0" component_uuid="5" snapshot_id="5" category="VERSION" description="[null]"
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml
index 8ca10cdab74..92b18f08cf7 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml
@@ -33,11 +33,11 @@ Note that measures, events and reviews are not deleted.
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]" measure_data="[null]"/>
- <!--<dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="2" to_snapshot_id="2"-->
+ <!--<dependencies id="1" from_resource_id="1" from_component_uuid="A" from_snapshot_id="1" to_resource_id="2" to_component_uuid="B" to_snapshot_id="2"-->
<!--parent_dependency_id="[null]" project_snapshot_id="[null]"-->
<!--dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>-->
- <!--<dependencies id="2" from_resource_id="3" from_snapshot_id="3" to_resource_id="1" to_snapshot_id="1"-->
+ <!--<dependencies id="2" from_resource_id="3" from_component_uuid="C" from_snapshot_id="3" to_resource_id="1" to_component_uuid="A" to_snapshot_id="1"-->
<!--parent_dependency_id="[null]" project_snapshot_id="2"-->
<!--dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>-->
@@ -72,11 +72,11 @@ Note that measures, events and reviews are not deleted.
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]" measure_data="[null]"/>
- <dependencies id="3" from_resource_id="33" from_snapshot_id="33" to_resource_id="44" to_snapshot_id="44"
+ <dependencies id="3" from_resource_id="33" from_component_uuid="CC" from_snapshot_id="33" to_resource_id="44" to_component_uuid="DD" to_snapshot_id="44"
parent_dependency_id="[null]" project_snapshot_id="[null]"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
- <dependencies id="4" from_resource_id="55" from_snapshot_id="55" to_resource_id="66" to_snapshot_id="66"
+ <dependencies id="4" from_resource_id="55" from_component_uuid="EE" from_snapshot_id="55" to_resource_id="66" to_component_uuid="FF" to_snapshot_id="66"
parent_dependency_id="[null]" project_snapshot_id="2"
dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml
index 00253585b49..7881def58d3 100644
--- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml
@@ -18,11 +18,11 @@
tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"
measure_data="[null]"/>
- <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="2" to_snapshot_id="2"
+ <dependencies id="1" from_resource_id="1" from_component_uuid="A" from_snapshot_id="1" to_resource_id="2" to_component_uuid="B" to_snapshot_id="2"
parent_dependency_id="[null]" project_snapshot_id="[null]"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
- <dependencies id="2" from_resource_id="3" from_snapshot_id="3" to_resource_id="1" to_snapshot_id="1"
+ <dependencies id="2" from_resource_id="3" from_component_uuid="C" from_snapshot_id="3" to_resource_id="1" to_component_uuid="A" to_snapshot_id="1"
parent_dependency_id="[null]" project_snapshot_id="2"
dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
@@ -56,11 +56,11 @@
text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
description="[null]" measure_data="[null]"/>
- <dependencies id="3" from_resource_id="33" from_snapshot_id="33" to_resource_id="44" to_snapshot_id="44"
+ <dependencies id="3" from_resource_id="33" from_component_uuid="CC" from_snapshot_id="33" to_resource_id="44" to_component_uuid="DD" to_snapshot_id="44"
parent_dependency_id="[null]" project_snapshot_id="[null]"
dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
- <dependencies id="4" from_resource_id="55" from_snapshot_id="55" to_resource_id="66" to_snapshot_id="66"
+ <dependencies id="4" from_resource_id="55" from_component_uuid="EE" from_snapshot_id="55" to_resource_id="66" to_component_uuid="FF" to_snapshot_id="66"
parent_dependency_id="[null]" project_snapshot_id="2"
dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>