aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-10 23:14:26 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-07-16 22:23:26 +0200
commit52c32f019099a079c7e30af1a79320ae918d7970 (patch)
tree789e59a3adbe7ec29d2d3c754f2e15ab878ed924
parentfe82e3f3f58299fd92d9df16377457a5f723aec0 (diff)
downloadsonarqube-52c32f019099a079c7e30af1a79320ae918d7970.tar.gz
sonarqube-52c32f019099a079c7e30af1a79320ae918d7970.zip
SONAR-6716 Compress migrations of table manual_measures
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb1
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/214_add_index_on_manual_measures.rb34
2 files changed, 1 insertions, 34 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb
index 2036ec1dde9..601d87b51b2 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb
@@ -34,6 +34,7 @@ class CreateManualMeasures < ActiveRecord::Migration
t.timestamps
end
alter_to_big_primary_key('manual_measures')
+ add_index 'manual_measures', 'resource_id', :name => 'manual_measures_resource_id'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/214_add_index_on_manual_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/214_add_index_on_manual_measures.rb
deleted file mode 100644
index a18831a9ee3..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/214_add_index_on_manual_measures.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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.
-#
-
-#
-# Sonar 2.10
-#
-class AddIndexOnManualMeasures < ActiveRecord::Migration
-
- def self.up
- begin
- add_index 'manual_measures', 'resource_id', :name => 'manual_measures_resource_id'
- rescue
- # already exists
- end
- end
-
-end