aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-05-24 00:15:48 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-05-24 02:05:25 +0400
commitd1db9357b84d57dfa61d3c40a48915d24c50ee12 (patch)
treed752722582946328a780126764a367d8ed818411 /sonar-server/src
parent676770e8e1bf0a9ae13ec57373a6cca887f4e45c (diff)
downloadsonarqube-d1db9357b84d57dfa61d3c40a48915d24c50ee12.tar.gz
sonarqube-d1db9357b84d57dfa61d3c40a48915d24c50ee12.zip
SONAR-2425 Add index on CHARACTERISTIC_PROPERTIES.CHARACTERISTIC_ID
Diffstat (limited to 'sonar-server/src')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/200_add_index_to_characteristic_property.rb30
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt1
2 files changed, 31 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/200_add_index_to_characteristic_property.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/200_add_index_to_characteristic_property.rb
new file mode 100644
index 00000000000..87e31a1ae76
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/200_add_index_to_characteristic_property.rb
@@ -0,0 +1,30 @@
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2011 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar 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.
+#
+# Sonar 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 Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+
+#
+# Sonar 2.9
+#
+class AddIndexToCharacteristicProperty < ActiveRecord::Migration
+
+ def self.up
+ add_index :characteristic_properties, :characteristic_id, :name => 'characteristic_properties_characteristic_id'
+ end
+
+end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt b/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt
new file mode 100644
index 00000000000..15688e3dade
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt
@@ -0,0 +1 @@
+After adding migration script - don't forget to update sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java