]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6044 Fix migration on MySQL
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 6 Feb 2015 08:42:16 +0000 (09:42 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 6 Feb 2015 08:44:37 +0000 (09:44 +0100)
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RemoveRuleMeasuresOnIssues.java

index a9f404ad0080d423d4d28322572ef1e144663e88..42395d138f56e5d07ab984d64c8b6fa608733d4f 100644 (file)
@@ -44,7 +44,7 @@ public class RemoveRuleMeasuresOnIssues extends BaseDataChange {
         "'new_blocker_violations', 'new_critical_violations', 'new_major_violations', 'new_minor_violations', 'new_info_violations')")
       .list(Select.LONG_READER);
     if (!metricIds.isEmpty()) {
-      String sql = "DELETE FROM project_measures pm WHERE pm.rule_id IS NOT NULL AND pm.metric_id IN (";
+      String sql = "DELETE FROM project_measures WHERE rule_id IS NOT NULL AND metric_id IN (";
       String[] parameters = new String[metricIds.size()];
       Arrays.fill(parameters, "?");
       sql += Joiner.on(",").join(parameters);