diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-10-08 16:17:37 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2018-10-10 09:23:05 +0200 |
commit | 03ff0887f32008b83c609610e5973ad37d8db1bd (patch) | |
tree | c21b9dcaf340e8cf3a53409ac623f9307b3be8e4 /server | |
parent | 7e7a650213b8e99f0079a16407e6f1a698216d9c (diff) | |
download | sonarqube-03ff0887f32008b83c609610e5973ad37d8db1bd.tar.gz sonarqube-03ff0887f32008b83c609610e5973ad37d8db1bd.zip |
SONAR-11310 fix Oracle support in DB migrations 2314 & 2315
Diffstat (limited to 'server')
2 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeActivity.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeActivity.java index d32d72d73bf..0cab78e2d37 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeActivity.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeActivity.java @@ -44,7 +44,7 @@ public class PopulateTmpColumnsToCeActivity extends DataChange { " inner join projects mp on mp.uuid = cea.component_uuid" + " inner join ce_task_characteristics ctc1 on ctc1.task_uuid = cea.uuid and ctc1.kee = 'branchType'" + " inner join ce_task_characteristics ctc2 on ctc2.task_uuid = cea.uuid and ctc2.kee = 'branch'" + - " inner join projects p on p.kee = concat(mp.kee, ':BRANCH:', ctc2.text_value)" + + " inner join projects p on p.kee = concat(mp.kee, concat(':BRANCH:', ctc2.text_value))" + " where" + " cea.component_uuid is not null" + " and (cea.tmp_component_uuid is null or cea.tmp_main_component_uuid is null)"); @@ -56,7 +56,7 @@ public class PopulateTmpColumnsToCeActivity extends DataChange { " from ce_activity cea" + " inner join projects mp on mp.uuid = cea.component_uuid " + " inner join ce_task_characteristics ctc1 on ctc1.task_uuid = cea.uuid and ctc1.kee = 'pullRequest'" + - " inner join projects p on p.kee = concat(mp.kee, ':PULL_REQUEST:', ctc1.text_value)" + + " inner join projects p on p.kee = concat(mp.kee, concat(':PULL_REQUEST:', ctc1.text_value))" + " where" + " cea.component_uuid is not null" + " and (cea.tmp_component_uuid is null or cea.tmp_main_component_uuid is null)"); diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeQueue.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeQueue.java index e19e274bfd0..50986caae31 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeQueue.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v74/PopulateTmpColumnsToCeQueue.java @@ -43,7 +43,7 @@ public class PopulateTmpColumnsToCeQueue extends DataChange { " inner join projects mp on mp.uuid = cq.component_uuid" + " inner join ce_task_characteristics ctc1 on ctc1.task_uuid = cq.uuid and ctc1.kee = 'branchType'" + " inner join ce_task_characteristics ctc2 on ctc2.task_uuid = cq.uuid and ctc2.kee = 'branch'" + - " inner join projects p on p.kee = concat(mp.kee, ':BRANCH:', ctc2.text_value)" + + " inner join projects p on p.kee = concat(mp.kee, concat(':BRANCH:', ctc2.text_value))" + " where" + " cq.component_uuid is not null" + " and (cq.tmp_component_uuid is null or cq.tmp_main_component_uuid is null)"); @@ -55,7 +55,7 @@ public class PopulateTmpColumnsToCeQueue extends DataChange { " from ce_queue cq" + " inner join projects mp on mp.uuid = cq.component_uuid " + " inner join ce_task_characteristics ctc1 on ctc1.task_uuid = cq.uuid and ctc1.kee = 'pullRequest'" + - " inner join projects p on p.kee = concat(mp.kee, ':PULL_REQUEST:', ctc1.text_value)" + + " inner join projects p on p.kee = concat(mp.kee, concat(':PULL_REQUEST:', ctc1.text_value))" + " where" + " cq.component_uuid is not null" + " and (cq.tmp_component_uuid is null or cq.tmp_main_component_uuid is null)"); @@ -71,7 +71,7 @@ public class PopulateTmpColumnsToCeQueue extends DataChange { " where" + " cq.component_uuid is not null" + " and (cq.tmp_component_uuid is null or cq.tmp_main_component_uuid is null)" + - " and not exists (select 1 from projects p where p.kee = concat(mp.kee, ':BRANCH:', ctc2.text_value))"); + " and not exists (select 1 from projects p where p.kee = concat(mp.kee, concat(':BRANCH:', ctc2.text_value)))"); // queued of pull request which have never been analyzed must be deleted deleteFromCeQueue(context, "queued tasks of never analyzed PRs", @@ -83,7 +83,7 @@ public class PopulateTmpColumnsToCeQueue extends DataChange { " where" + " cq.component_uuid is not null" + " and (cq.tmp_component_uuid is null or cq.tmp_main_component_uuid is null)" + - " and not exists (select 1 from projects p where p.kee = concat(mp.kee, ':PULL_REQUEST:', ctc1.text_value))"); + " and not exists (select 1 from projects p where p.kee = concat(mp.kee, concat(':PULL_REQUEST:', ctc1.text_value)))"); // all queue which tmp columns are not populated yet (will include main and deprecated branches) // both tmp columns will be set to CE_QUEUE.COMPONENT_UUID |