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:
parent
1c2cdedf19
commit
d3038eee92
|
@ -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
|
Loading…
Reference in New Issue