diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-14 16:36:24 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-14 16:37:00 +0100 |
commit | 536562976dad7425fcb546736eaa6e463c8032a9 (patch) | |
tree | 28f2f72eeb12e6f2875b3ff16f08e396ca9481b5 /plugins | |
parent | 7cbe24d9765f4d212fd651bdbf864ac52d218938 (diff) | |
download | sonarqube-536562976dad7425fcb546736eaa6e463c8032a9.tar.gz sonarqube-536562976dad7425fcb546736eaa6e463c8032a9.zip |
SONAR-3208 complete database tables
* add PROJECTS.PERSON_ID
* create the table AUTHORS
Diffstat (limited to 'plugins')
8 files changed, 17 insertions, 17 deletions
diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml index a9c48393d40..861917acf7c 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml @@ -2,6 +2,6 @@ <projects id="10" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="[null]" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" long_name="[null]" /> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml index 26db515cf22..039debd839a 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml @@ -13,7 +13,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml index 108ad6f6f97..5ea2a38f4a1 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml @@ -13,7 +13,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml index 23caa6d175c..cb141d795df 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml @@ -12,7 +12,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java index 9e9a5c6e909..c5e963aefcc 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java @@ -83,7 +83,7 @@ public class DefaultPurgeTask implements PurgeTask { private void doPurge(long resourceId) { try { LOG.debug("Purge data [id=" + resourceId + "]"); - purgeDao.purgeProject(resourceId, getScopesWithoutHistoricalData()); + purgeDao.purge(resourceId, getScopesWithoutHistoricalData()); } catch (Exception e) { // purge errors must no fail the batch LOG.error("Fail to purge data [id=" + resourceId + "]", e); diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java index 8947b8e21fd..f059d70d180 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java @@ -39,7 +39,7 @@ public class DefaultPurgeTaskTest { task.purge(1L); - verify(purgeDao).purgeProject(1L, new String[]{Scopes.FILE}); + verify(purgeDao).purge(1L, new String[]{Scopes.FILE}); } @Test @@ -50,17 +50,17 @@ public class DefaultPurgeTaskTest { task.purge(1L); - verify(purgeDao).purgeProject(1L, new String[]{Scopes.DIRECTORY, Scopes.FILE}); + verify(purgeDao).purge(1L, new String[]{Scopes.DIRECTORY, Scopes.FILE}); } @Test public void shouldNotFailOnErrors() { PurgeDao purgeDao = mock(PurgeDao.class); - when(purgeDao.purgeProject(anyLong(), (String[]) any())).thenThrow(new RuntimeException()); + when(purgeDao.purge(anyLong(), (String[]) any())).thenThrow(new RuntimeException()); DefaultPurgeTask task = new DefaultPurgeTask(purgeDao, new Settings(), mock(DefaultPeriodCleaner.class)); task.purge(1L); - verify(purgeDao).purgeProject(anyLong(), (String[]) any()); + verify(purgeDao).purge(anyLong(), (String[]) any()); } } diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml index 2b4bb07c497..daa989bd2ad 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml @@ -10,24 +10,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- files --> <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml index a71f43da47e..9d20d5a0f09 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml @@ -10,24 +10,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- files --> <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" |