diff --git a/db/migrate/20090214190337_add_watchers_user_id_type_index.rb b/db/migrate/20090214190337_add_watchers_user_id_type_index.rb new file mode 100644 index 000000000..7ff4e542c --- /dev/null +++ b/db/migrate/20090214190337_add_watchers_user_id_type_index.rb @@ -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