You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20091017213228_add_missing_indexes_to_watchers.rb 313B

1234567891011
  1. class AddMissingIndexesToWatchers < ActiveRecord::Migration[4.2]
  2. def self.up
  3. add_index :watchers, :user_id
  4. add_index :watchers, [:watchable_id, :watchable_type]
  5. end
  6. def self.down
  7. remove_index :watchers, :user_id
  8. remove_index :watchers, :column => [:watchable_id, :watchable_type]
  9. end
  10. end