aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-migration
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-12-20 11:58:08 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-12-20 11:58:08 +0100
commitecf2412b6b9994f836a21a713240cba278e993c3 (patch)
treecd8b46467b970e98d491a178fe5d1b991f49e7bd /server/sonar-db-migration
parent21df896e6a95216e8a468e852ba7d738943a3182 (diff)
parente6fea33be6dd9333abdd82444317a708804d2f85 (diff)
downloadsonarqube-ecf2412b6b9994f836a21a713240cba278e993c3.tar.gz
sonarqube-ecf2412b6b9994f836a21a713240cba278e993c3.zip
Merge remote-tracking branch 'origin/branch-6.7'
Diffstat (limited to 'server/sonar-db-migration')
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasures.java5
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java3
2 files changed, 1 insertions, 7 deletions
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasures.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasures.java
index c7eca704768..d68fd020771 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasures.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasures.java
@@ -44,11 +44,6 @@ public class PopulateAnalysisUuidOnMeasures extends DataChange {
massUpdate.select("select distinct m.snapshot_id as sId, s.root_snapshot_id as rootSid " +
"from project_measures m " +
"inner join snapshots s on m.snapshot_id = s.id " +
- "where m.analysis_uuid is null " +
- "union " +
- "select distinct m.snapshot_id as sId, s.root_snapshot_id as rootSid " +
- "from project_measures m " +
- "inner join snapshots s on m.snapshot_id=s.id " +
"where m.analysis_uuid is null"
);
massUpdate.update("update project_measures set analysis_uuid=? where snapshot_id = ? and analysis_uuid is null");
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java
index 023793635c6..eb274166294 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v60/PopulateAnalysisUuidOnMeasuresTest.java
@@ -81,7 +81,7 @@ public class PopulateAnalysisUuidOnMeasuresTest {
assertThat(rows.get("analysisUuid")).isEqualTo(expectedAnalysisUuid);
}
- private String insertSnapshot(long id, String uuid, String qualifier, @Nullable Long rootSnapshotId) {
+ private void insertSnapshot(long id, String uuid, String qualifier, @Nullable Long rootSnapshotId) {
int depth;
switch (qualifier) {
case "TRK":
@@ -108,7 +108,6 @@ public class PopulateAnalysisUuidOnMeasuresTest {
"ROOT_SNAPSHOT_ID", rootSnapshotId != null ? valueOf(rootSnapshotId) : null,
"QUALIFIER", qualifier,
"DEPTH", valueOf(depth));
- return uuid;
}
private void insertMeasure(long id, long snapshotId) {