From 13641737034aa84507d349c92183815c0b226764 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 19 Jan 2012 15:52:52 +0100 Subject: [PATCH] SONAR-2757 add the column SNAPSHOTS.PURGE_STATUS (INTEGER) --- .../CloseReviewsDecoratorTest/fixture.xml | 4 +++ .../shouldCloseResolvedManualViolations.xml | 1 + .../shared.xml | 6 ++-- ...veConfigurationInSnapshotsTable-result.xml | 6 ++-- .../shared.xml | 2 +- ...rmanentIdFromReferenceViolation-result.xml | 2 +- .../shouldSaveViolations-result.xml | 2 +- .../PurgeUtilsTest/purgeSnapshots-result.xml | 8 ++--- .../api/PurgeUtilsTest/purgeSnapshots.xml | 8 ++--- .../dbContent-result.xml | 36 +++++++++---------- .../DefaultPeriodCleanerTest/dbContent.xml | 36 +++++++++---------- .../purgeDeletedResources-result.xml | 8 ++--- .../purgeDeletedResources.xml | 8 ++--- .../purgeDependencies-result.xml | 20 +++++------ .../purgeDependencies.xml | 20 +++++------ ...uldNotPurgeUnprocessedSnapshots-result.xml | 12 +++---- .../shouldNotPurgeUnprocessedSnapshots.xml | 12 +++---- .../purgeDeprecatedLast-result.xml | 8 ++--- .../purgeDeprecatedLast.xml | 8 ++--- .../nothingToPurge-result.xml | 10 +++--- .../nothingToPurge.xml | 10 +++--- .../purgeDisabledModule-result.xml | 8 ++--- .../purgeDisabledModule.xml | 8 ++--- .../purgeDisabledProject-result.xml | 12 +++---- .../purgeDisabledProject.xml | 12 +++---- .../purgeEntities-result.xml | 16 ++++----- .../PurgeEntitiesTest/purgeEntities.xml | 16 ++++----- .../purgeEventOrphans-result.xml | 2 +- .../purgeRuleMeasures-result.xml | 12 +++---- .../purgeRuleMeasures.xml | 12 +++---- .../purgeUnprocessed-result.xml | 16 ++++----- .../PurgeUnprocessedTest/purgeUnprocessed.xml | 16 ++++----- .../runner/PurgeRunnerTest/shared.xml | 10 +++--- .../loadMeasuresFromDate.xml | 8 ++--- .../isLatestAnalysis.xml | 4 +-- .../isLatestAnalysisIfNeverAnalysed.xml | 2 +- .../isNotLatestAnalysis.xml | 4 +-- .../PastMeasuresLoaderTest/shared.xml | 6 ++-- .../PastSnapshotFinderByDateTest/shared.xml | 10 +++--- .../PastSnapshotFinderByDaysTest/shared.xml | 24 ++++++------- .../shouldNotFindSelf.xml | 6 ++-- .../shouldFindPreviousAnalysis.xml | 6 ++-- .../shouldNotFindPreviousAnalysis.xml | 4 +-- .../shared.xml | 10 +++--- .../DefaultResourcePersisterTest/shared.xml | 2 +- .../shouldSaveNewDirectory-result.xml | 6 ++-- .../shouldSaveNewLibrary-result.xml | 8 ++--- ...houldSaveNewMultiModulesProject-result.xml | 10 +++--- .../shouldSaveNewProject-result.xml | 4 +-- .../shouldUpdateExistingResource-result.xml | 4 +-- .../shouldUpdateExistingResource.xml | 2 +- .../index/MeasurePersisterTest/shared.xml | 6 ++-- .../shouldDelaySaving-result.xml | 6 ++-- .../shouldInsertMeasure-result.xml | 6 ++-- ...aySavingWithDatabaseOnlyMeasure-result.xml | 6 ++-- .../shouldUpdateMeasure-result.xml | 6 ++-- .../index/SourcePersisterTest/shared.xml | 2 +- .../shouldSaveSource-result.xml | 2 +- .../doNotFailIfNoPenultimateLast-result.xml | 8 ++--- .../doNotFailIfNoPenultimateLast.xml | 8 ++--- ...dNotEnableSnapshotWhenNotLatest-result.xml | 20 +++++------ .../shouldNotEnableSnapshotWhenNotLatest.xml | 20 +++++------ ...ldUnflagPenultimateLastSnapshot-result.xml | 20 +++++------ .../shouldUnflagPenultimateLastSnapshot.xml | 20 +++++------ .../org/sonar/jpa/entity/SchemaMigration.java | 2 +- .../org/sonar/core/persistence/rows-derby.sql | 1 + .../sonar/core/persistence/schema-derby.ddl | 1 + .../DuplicationDaoTest/shouldGetByHash.xml | 20 +++++------ .../shouldInsert-result.xml | 4 +-- .../DuplicationDaoTest/shouldInsert.xml | 4 +-- .../shouldIndexMultiModulesProject-result.xml | 8 ++--- .../shouldIndexMultiModulesProject.xml | 8 ++--- .../shouldIndexProjects-result.xml | 6 ++-- .../shouldIndexProjects.xml | 6 ++-- ...ouldReindexProjectAfterRenaming-result.xml | 2 +- .../shouldReindexProjectAfterRenaming.xml | 2 +- .../sonar/api/database/model/Snapshot.java | 18 ++++++++++ .../migrate/251_add_snapshots_purge_status.rb | 30 ++++++++++++++++ .../filters/FilterExecutorTest/measures.xml | 4 +-- .../filters/FilterExecutorTest/shared.xml | 8 ++--- .../filters/FilterExecutorTest/views.xml | 8 ++--- 81 files changed, 402 insertions(+), 347 deletions(-) create mode 100644 sonar-server/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml index 80e649a8312..fd62fa43820 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/fixture.xml @@ -2,19 +2,23 @@ diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml index 177a41706b0..d4c9e11d6ab 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/sensors/CloseReviewsDecoratorTest/shouldCloseResolvedManualViolations.xml @@ -1,6 +1,7 @@ diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shared.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shared.xml index 81bbdfc45a4..bf1990b4615 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shared.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shared.xml @@ -1,15 +1,15 @@ - - - diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml index ee27998fa61..784bfad7eee 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml @@ -1,15 +1,15 @@ - - - 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 b872d6262be..26db515cf22 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 @@ -15,7 +15,7 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[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 b01cfb81668..9b0006441a3 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 @@ -30,14 +30,14 @@ enabled="true" language="java" copy_resource_id="[null]"/> - - - - - @@ -28,17 +28,17 @@ RULE_ID="1" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" alert_status="[null]" description="[null]"/> - + - + - + @@ -49,32 +49,32 @@ - - + - + - - - - @@ -101,26 +101,26 @@ - - + - - --> - - - - @@ -34,17 +34,17 @@ to ensure that unit tests pass on any locale. RULE_ID="1" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]" alert_status="[null]" description="[null]"/> - - - @@ -53,27 +53,27 @@ to ensure that unit tests pass on any locale. - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/purgeDependencies.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/purgeDependencies.xml index a6d5d00d0ee..b35f6a2f7db 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/purgeDependencies.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/purgeDependencies.xml @@ -28,53 +28,53 @@ - - - - - - - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/shouldNotPurgeUnprocessedSnapshots-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/shouldNotPurgeUnprocessedSnapshots-result.xml index 67e321e0252..56604e81674 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/shouldNotPurgeUnprocessedSnapshots-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDependenciesTest/shouldNotPurgeUnprocessedSnapshots-result.xml @@ -12,13 +12,13 @@ - - - - - - - - - - - - - - - + - - - - - - - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/nothingToPurge.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/nothingToPurge.xml index 689da9e7623..297e2f324d4 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/nothingToPurge.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/nothingToPurge.xml @@ -24,27 +24,27 @@ description="[null]" enabled="true" language="java" copy_resource_id="1"/> - - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule-result.xml index 5e3e2dd2ef5..37c6c47af83 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule-result.xml @@ -22,22 +22,22 @@ - - + - + - + diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule.xml index 90bcae0da42..81bba26ba8f 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledModule.xml @@ -25,22 +25,22 @@ enabled="false" language="java" copy_resource_id="1"/> - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject-result.xml index daabfcf0368..2db906d07bd 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject-result.xml @@ -28,34 +28,34 @@ enabled="true" language="java" copy_resource_id="[null]"/> - + - + - + - + - + - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject.xml index 98e915e97d0..ae4a6249766 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeDisabledResourcesTest/purgeDisabledProject.xml @@ -33,34 +33,34 @@ - - - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml index ae48f100dbf..f24a4ead903 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeEntitiesTest/purgeEntities-result.xml @@ -2,26 +2,26 @@ - - - + - + @@ -29,28 +29,28 @@ - - - - - - - - - - - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures-result.xml index 2ab6a562565..893e12abf57 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures-result.xml @@ -2,17 +2,17 @@ - - - @@ -20,17 +20,17 @@ - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures.xml index e49a4e54871..b3b11b1a19a 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeRuleMeasuresTest/purgeRuleMeasures.xml @@ -2,17 +2,17 @@ - - - @@ -20,17 +20,17 @@ - - - diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml index 942d8915003..5d08553da2b 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed-result.xml @@ -2,28 +2,28 @@ - - - - - + - + - + - + diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml index 30fb74494ff..24bef9c9235 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/purges/PurgeUnprocessedTest/purgeUnprocessed.xml @@ -2,28 +2,28 @@ - - - - - - - - - - - - @@ -45,7 +45,7 @@ description="[null]" enabled="true" language="java" copy_resource_id="[null]"/> - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml index dd325e7f6ed..1ffa6e4da22 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml @@ -13,20 +13,20 @@ - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml index 71ef5169237..6b0e7bb6e6e 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml @@ -5,11 +5,11 @@ description="[null]" enabled="true" language="java" copy_resource_id="[null]"/> - - \ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml index ac9463e41e7..f568c80762d 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml @@ -6,7 +6,7 @@ description="[null]" enabled="true" language="java" copy_resource_id="[null]"/> - \ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml index a5232244f95..ac74363f142 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml @@ -5,11 +5,11 @@ description="[null]" enabled="true" language="java" copy_resource_id="[null]"/> - - \ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml index 8ebc2264cd2..6288eba680b 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml @@ -37,15 +37,15 @@ - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml index 16a2a7d01aa..3914489d920 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml @@ -7,34 +7,34 @@ - - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml index 8bbd1700926..eb07ea0f0c5 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml @@ -20,57 +20,57 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml index fe75a557337..30b4fd235ab 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml @@ -20,15 +20,15 @@ - - - \ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml index 3d747ba0e5e..f5edd855a07 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml @@ -5,20 +5,20 @@ description="[null]" enabled="true" language="java" copy_resource_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml index a13075af0b8..2dcdd10d5fa 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml @@ -7,13 +7,13 @@ - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml index 0223b66eb8f..c414b95daa4 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml @@ -7,34 +7,34 @@ - - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml index ef59f34361d..61455e2ca4c 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml @@ -5,7 +5,7 @@ name="Other project" long_name="Other" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml index 37e37cca1ca..ab4d7f32c3f 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml @@ -5,7 +5,7 @@ name="Other project" long_name="Other" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - @@ -19,11 +19,11 @@ name="org.foo" long_name="org.foo" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml index 7709bfb726f..bf73689908c 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml @@ -5,7 +5,7 @@ name="Other project" long_name="Other" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - @@ -19,15 +19,15 @@ name="junit:junit" long_name="junit:junit" description="[null]" enabled="true" language="[null]" copy_resource_id="[null]" profile_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml index b78b4342de4..775852ae2d2 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml @@ -5,7 +5,7 @@ name="Other project" long_name="Other" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - @@ -28,19 +28,19 @@ enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml index 7fee78a4834..90dea6bdd7f 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml @@ -5,7 +5,7 @@ name="Other project" long_name="Other" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - @@ -15,7 +15,7 @@ name="Foo" long_name="Foo" description="some description" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml index c791f9150bd..6dcfff897e9 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml @@ -5,12 +5,12 @@ enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml index f12ef5c35d8..df0192b6958 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml @@ -4,7 +4,7 @@ name="old name" long_name="old name" description="old description" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml index e8af6663c14..7b71eafa78b 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml @@ -17,15 +17,15 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml index 490d6271a00..839631af64c 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml @@ -18,15 +18,15 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml index 4c3f035d415..72b30a69eed 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml @@ -18,15 +18,15 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml index 3429521a08f..7b71a86ed05 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml @@ -18,15 +18,15 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml index f01532614f2..d4311e4484a 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml @@ -18,15 +18,15 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml index d50e3065719..462bb7c4e50 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml @@ -4,7 +4,7 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml index 1b0269ee80d..e67531bb41f 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml @@ -4,7 +4,7 @@ name="Bar" long_name="org.foo.Bar" description="[null]" enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast-result.xml index 1bc4e43cdda..e72a9cfc414 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast-result.xml @@ -1,21 +1,21 @@ - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast.xml index d6fafc0ec24..afcc4813217 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/doNotFailIfNoPenultimateLast.xml @@ -1,22 +1,22 @@ - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml index 1054f4e7e4d..257a7193bfe 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldNotEnableSnapshotWhenNotLatest-result.xml @@ -1,35 +1,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldUnflagPenultimateLastSnapshot.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldUnflagPenultimateLastSnapshot.xml index 34c75c87610..fb985b93592 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldUnflagPenultimateLastSnapshot.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/shouldUnflagPenultimateLastSnapshot.xml @@ -1,56 +1,56 @@ - - - - - - - - - - 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 c16464726b7..f0f7a12456a 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 = 250; + public static final int LAST_VERSION = 251; 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 68f8597258e..8144ad8cb05 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 @@ -169,6 +169,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('239'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('240'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('241'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('250'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('251'); 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 1ca492e8d03..81491225d86 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 @@ -129,6 +129,7 @@ CREATE TABLE "SNAPSHOTS" ( "PROJECT_ID" INTEGER NOT NULL, "PARENT_SNAPSHOT_ID" INTEGER, "STATUS" VARCHAR(4) NOT NULL DEFAULT 'U', + "PURGE_STATUS" INTEGER, "ISLAST" BOOLEAN NOT NULL DEFAULT FALSE, "SCOPE" VARCHAR(3), "QUALIFIER" VARCHAR(10), diff --git a/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml index 4f821a44e31..b9fde7599f3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml +++ b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml @@ -1,23 +1,23 @@ - - + + - - + + - - + + - - + + - - + + diff --git a/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml index 7149a08ee8c..f7a15f4f739 100644 --- a/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml @@ -1,7 +1,7 @@ - - + + diff --git a/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml index e0efcf156c4..b6abdbd64a9 100644 --- a/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml +++ b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml @@ -1,7 +1,7 @@ - - + + diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml index 953290805fe..2e1e9bb9678 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml @@ -23,10 +23,10 @@ description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> - - - - + + + + diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml index 18ef94a4616..33fcdb11728 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml @@ -23,8 +23,8 @@ description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> - - - - + + + + diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml index dcdcec48803..2aca7a20445 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml @@ -19,9 +19,9 @@ description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> - - - + + + diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml index 4d463454340..87e14d537a7 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml @@ -18,7 +18,7 @@ description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> - - - + + + diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml index cda14af38a3..30cf6f02ba7 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml @@ -5,7 +5,7 @@ description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> - + diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml index 0af2532f6b7..dfce65c8413 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml @@ -5,7 +5,7 @@ description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> - + diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java index cbd755b6e18..3b91fda8397 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/Snapshot.java @@ -66,6 +66,9 @@ public class Snapshot extends BaseIdentifiable { @Column(name = "status") private String status = STATUS_UNPROCESSED; + @Column(name = "purge_status", updatable = true, nullable = true) + private Integer purgeStatus; + @Column(name = "scope", updatable = true, nullable = true, length = 3) private String scope; @@ -268,6 +271,21 @@ public class Snapshot extends BaseIdentifiable { return this; } + /** + * @since 2.14 + */ + public Integer getPurgeStatus() { + return purgeStatus; + } + + /** + * @since 2.14 + */ + public Snapshot setPurgeStatus(Integer i) { + this.purgeStatus = i; + return this; + } + public String getScope() { return scope; } diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb new file mode 100644 index 00000000000..13af27bb9bf --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb @@ -0,0 +1,30 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2012 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 2.14 +# +class AddSnapshotsPurgeStatus < ActiveRecord::Migration + + def self.up + add_column 'snapshots', 'purge_status', :integer, :null => true + end + +end diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml index 9a6ae214cbd..ec617317db1 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml @@ -22,12 +22,12 @@ description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> - - diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml index b1036937d5c..e794ed5298e 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml @@ -13,24 +13,24 @@ - - - - diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml index 46b675746b2..ae1441dd900 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml @@ -20,22 +20,22 @@ - - - - -- 2.39.5