Skip to content

Commit 4916ff7

Browse files
afloresescarcegasonartech
authored andcommitted
SONAR-26732 Fix issue_stats_by_rule_key migration failing
1 parent f3eb189 commit 4916ff7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v202506/PopulateIssueStatsByRuleKey.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ public class PopulateIssueStatsByRuleKey extends DataChange {
6262
private static final String UPDATE_QUERY = """
6363
insert into issue_stats_by_rule_key
6464
(aggregation_type, aggregation_id, rule_key, issue_count, rating, mqr_rating, hotspot_count, hotspots_reviewed)
65-
values (?, ?, ?, ?, ?, ?, ?, ?);
65+
values (?, ?, ?, ?, ?, ?, ?, ?)
6666
""";
6767

6868
private static final String DELETE_QUERY = """
69-
delete from issue_stats_by_rule_key;
69+
delete from issue_stats_by_rule_key
7070
""";
7171

7272
public PopulateIssueStatsByRuleKey(Database db) {

server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v202506/PopulateIssueStatsByRuleKeyForPortfoliosAndApps.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class PopulateIssueStatsByRuleKeyForPortfoliosAndApps extends DataChange
2828
private static final String UPDATE_QUERY = """
2929
insert into issue_stats_by_rule_key
3030
(aggregation_type, aggregation_id, rule_key, issue_count, rating, mqr_rating, hotspot_count, hotspots_reviewed)
31-
values (?, ?, ?, ?, ?, ?, ?, ?);
31+
values (?, ?, ?, ?, ?, ?, ?, ?)
3232
""";
3333

3434
private static final String SELECT_QUERY = """
@@ -50,7 +50,7 @@ public class PopulateIssueStatsByRuleKeyForPortfoliosAndApps extends DataChange
5050
WHERE copy_components.copy_component_uuid IS NOT NULL
5151
AND apps.qualifier IN ('VW', 'SVW', 'APP')
5252
AND i.aggregation_type = 'PROJECT'
53-
GROUP BY i.rule_key, apps.uuid, apps.qualifier;
53+
GROUP BY i.rule_key, apps.uuid, apps.qualifier
5454
""";
5555

5656
public PopulateIssueStatsByRuleKeyForPortfoliosAndApps(Database db) {

0 commit comments

Comments
 (0)