From 6cc929c8525ef17e289d2d54b75152ccc5348293 Mon Sep 17 00:00:00 2001 From: Michal Duda Date: Mon, 14 Jan 2019 10:13:13 +0100 Subject: Fix for migration 2502 --- .../db/migration/version/v76/MigrateModuleProperties.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'server/sonar-db-migration') diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v76/MigrateModuleProperties.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v76/MigrateModuleProperties.java index 107edf24e60..79fa960913c 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v76/MigrateModuleProperties.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v76/MigrateModuleProperties.java @@ -53,12 +53,12 @@ public class MigrateModuleProperties extends DataChange { AtomicReference currentProjectId = new AtomicReference<>(); AtomicReference currentModuleUuid = new AtomicReference<>(); - context.prepareSelect("select prop.prop_key, prop.text_value, prop.clob_value, mod.name, mod.uuid, root.id as project_id, root.name as project_name " + + context.prepareSelect("select prop.prop_key, prop.text_value, prop.clob_value, module1.name, module1.uuid, root.id as project_id, root.name as project_name " + "from properties prop " + - "left join projects mod on mod.id = prop.resource_id " + - "left join projects root on root.uuid = mod.project_uuid " + - "where mod.qualifier = 'BRC' and prop.user_id is null " + - "order by root.uuid, mod.uuid, prop.prop_key") + "left join projects module1 on module1.id = prop.resource_id " + + "left join projects root on root.uuid = module1.project_uuid " + + "where module1.qualifier = 'BRC' and prop.user_id is null " + + "order by root.uuid, module1.uuid, prop.prop_key") .scroll(row -> { String propertyKey = row.getString(1); String propertyTextValue = row.getString(2); @@ -114,8 +114,8 @@ public class MigrateModuleProperties extends DataChange { MassUpdate massUpdate = context.prepareMassUpdate().rowPluralName("module level properties"); massUpdate.select("select prop.id as property_id " + "from properties prop " + - "left join projects mod on mod.id = prop.resource_id " + - "where mod.qualifier = 'BRC'"); + "left join projects module1 on module1.id = prop.resource_id " + + "where module1.qualifier = 'BRC'"); massUpdate.update("delete from properties where id=?"); massUpdate.execute((row, update) -> { update.setInt(1, row.getInt(1)); -- cgit v1.2.3