diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-20 12:05:54 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-20 12:05:54 +0200 |
commit | dc0ef8c3e87322b7beeddf11fd084788b6755747 (patch) | |
tree | dd3ec4de736439cf6d3ec2d798b44064e62dea7b /server/sonar-web | |
parent | 4b389949b73baf05e15c007be6ba7ea611a86091 (diff) | |
download | sonarqube-dc0ef8c3e87322b7beeddf11fd084788b6755747.tar.gz sonarqube-dc0ef8c3e87322b7beeddf11fd084788b6755747.zip |
SONAR-5625 Include the "enabled" column to the current "projects_kee" index
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/db/migrate/603_add_enabled_to_projects_kee_index.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/603_add_enabled_to_projects_kee_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/603_add_enabled_to_projects_kee_index.rb new file mode 100644 index 00000000000..6615bc274d2 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/603_add_enabled_to_projects_kee_index.rb @@ -0,0 +1,39 @@ +# +# 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 4.5 +# SONAR-5625 +# +class AddEnabledToProjectsKeeIndex < ActiveRecord::Migration + + def self.up + remove_index :projects, :name => 'projects_kee' + + if dialect=='mysql' + # Index of varchar column is limited to 767 bytes on mysql (<= 255 UTF-8 characters) + # See http://jira.codehaus.org/browse/SONAR-4137 and + # http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html + add_index :projects, [:kee, :enabled], :name => 'projects_kee', :length => {:kee => 255} + else + add_index :projects, [:kee, :enabled], :name => 'projects_kee' + end + end +end |