]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6845 Add index on PROJECTS.QUALIFIER
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 16 Sep 2015 14:22:04 +0000 (16:22 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 17 Sep 2015 08:04:55 +0000 (10:04 +0200)
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/930_add_projects_qualifier_index.rb [new file with mode: 0644]
sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java
sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql
sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl

diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/930_add_projects_qualifier_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/930_add_projects_qualifier_index.rb
new file mode 100644 (file)
index 0000000..b0a95b0
--- /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.
+#
+
+#
+# SonarQube 5.2
+# SONAR-6845
+#
+class AddProjectsQualifierIndex < ActiveRecord::Migration
+
+  def self.up
+    add_index 'projects', 'qualifier', :name => 'projects_qualifier'
+  end
+
+end
index b29b1aec8610126671cdec4ac83ff462b42a20c3..f362a4c9693834e7bfbe2163bb66a35c7f5f3fba 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.db.MyBatis;
 
 public class DatabaseVersion {
 
-  public static final int LAST_VERSION = 929;
+  public static final int LAST_VERSION = 930;
 
   /**
    * The minimum supported version which can be upgraded. Lower
index 85d08cd29f75bc80472d520adcaedefe1f192737..9a4170eaf70105d6f2093be3beda568cbd272304 100644 (file)
@@ -348,6 +348,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('926');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('927');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('928');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('929');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('930');
 
 INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482', null, null);
 ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
index 2ea8ececdef283784aa777306c28ae65a9404c2d..a1a27b835e6d920bf9aed74d416b76912c36ff7b 100644 (file)
@@ -604,6 +604,8 @@ CREATE INDEX "PROJECTS_PROJECT_UUID" ON "PROJECTS" ("PROJECT_UUID");
 
 CREATE INDEX "PROJECTS_MODULE_UUID" ON "PROJECTS" ("MODULE_UUID");
 
+CREATE INDEX "PROJECTS_QUALIFIER" ON "PROJECTS" ("QUALIFIER");
+
 CREATE INDEX "RESOURCE_INDEX_KEE" ON "RESOURCE_INDEX" ("KEE");
 
 CREATE INDEX "RESOURCE_INDEX_RID" ON "RESOURCE_INDEX" ("RESOURCE_ID");