]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5082 - Added Index to active_rules table
authorStephane Gamard <stephane.gamard@searchbox.com>
Fri, 6 Jun 2014 13:35:34 +0000 (15:35 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Fri, 6 Jun 2014 14:16:06 +0000 (16:16 +0200)
sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
sonar-server/src/main/webapp/WEB-INF/db/migrate/541_create_active_rule_index.rb [new file with mode: 0644]

index 0f053af5e71306d64bbec55f5062866d82a3aa00..0f09ae4b81939707618870cb2e5849b051a7bd51 100644 (file)
@@ -33,7 +33,7 @@ import java.util.List;
  */
 public class DatabaseVersion implements BatchComponent, ServerComponent {
 
-  public static final int LAST_VERSION = 540;
+  public static final int LAST_VERSION = 541;
 
   public static enum Status {
     UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/541_create_active_rule_index.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/541_create_active_rule_index.rb
new file mode 100644 (file)
index 0000000..31cb1d0
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# SonarQube, open source software quality management tool.
+# Copyright (C) 2008-2014 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# SonarQube is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# SonarQube is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+class CreateLogTable < ActiveRecord::Migration
+
+
+  def self.up
+    begin
+      add_index :active_rule, :profile_id, :rule_id => 'act_rul_id'
+    rescue
+      # already exists
+    end
+  end
+
+end