summaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-04 22:07:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-04 22:07:44 +0000
commit17a3f9e44c1509dbaebf478ec82ef2559d4e40cf (patch)
tree7764b51f962e98b38fab97489317124081940bab /db/migrate
parentf16ab838d89dc440825fb6a9c1668b191c889b2a (diff)
downloadredmine-17a3f9e44c1509dbaebf478ec82ef2559d4e40cf.tar.gz
redmine-17a3f9e44c1509dbaebf478ec82ef2559d4e40cf.zip
Added an index on custom_values table (customized_type + customized_id columns) to speed up issue queries that use custom field filters.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@702 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/066_add_custom_value_customized_index.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/066_add_custom_value_customized_index.rb b/db/migrate/066_add_custom_value_customized_index.rb
new file mode 100644
index 000000000..1f4c40da2
--- /dev/null
+++ b/db/migrate/066_add_custom_value_customized_index.rb
@@ -0,0 +1,9 @@
+class AddCustomValueCustomizedIndex < ActiveRecord::Migration
+ def self.up
+ add_index :custom_values, [:customized_type, :customized_id], :name => :custom_values_customized
+ end
+
+ def self.down
+ remove_index :custom_values, :name => :custom_values_customized
+ end
+end