Adds an index on watchers table to speed up watched issue filtering.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2466 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-02-14 19:06:44 +00:00
parent 1c2cdedf19
commit d3038eee92
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class AddWatchersUserIdTypeIndex < ActiveRecord::Migration
def self.up
add_index :watchers, [:user_id, :watchable_type], :name => :watchers_user_id_type
end
def self.down
remove_index :watchers, :name => :watchers_user_id_type
end
end