diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2020-05-08 15:02:28 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-05-25 20:05:23 +0000 |
commit | b6727b0395ec9da58a357f00ed4af8880b9cec40 (patch) | |
tree | 6104058b6b4df8929391bc9a91e68d01938855b8 /server/sonar-db-migration | |
parent | 28b75501815bd4707421cba55e26aacdc1e929c5 (diff) | |
download | sonarqube-b6727b0395ec9da58a357f00ed4af8880b9cec40.tar.gz sonarqube-b6727b0395ec9da58a357f00ed4af8880b9cec40.zip |
SONAR-13221 use kee when updating ISSUES table
Diffstat (limited to 'server/sonar-db-migration')
-rw-r--r-- | server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/issues/PopulateIssuesRuleUuidColumn.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/issues/PopulateIssuesRuleUuidColumn.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/issues/PopulateIssuesRuleUuidColumn.java index b0bd0c196a2..fe8ba94786e 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/issues/PopulateIssuesRuleUuidColumn.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/issues/PopulateIssuesRuleUuidColumn.java @@ -34,15 +34,15 @@ public class PopulateIssuesRuleUuidColumn extends DataChange { protected void execute(Context context) throws SQLException { MassUpdate massUpdate = context.prepareMassUpdate(); - massUpdate.select("select iss.rule_id, ru.uuid " + + massUpdate.select("select iss.kee, ru.uuid " + "from issues iss " + "join rules ru on iss.rule_id = ru.id " + "where iss.rule_uuid is null"); - massUpdate.update("update issues set rule_uuid = ? where rule_id = ?"); + massUpdate.update("update issues set rule_uuid = ? where kee = ?"); massUpdate.execute((row, update) -> { update.setString(1, row.getString(2)); - update.setLong(2, row.getLong(1)); + update.setString(2, row.getString(1)); return true; }); } |