Browse Source

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
tags/0.9.0
Jean-Philippe Lang 15 years ago
parent
commit
d3038eee92
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      db/migrate/20090214190337_add_watchers_user_id_type_index.rb

+ 9
- 0
db/migrate/20090214190337_add_watchers_user_id_type_index.rb 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

Loading…
Cancel
Save