Chris@0: class AddMissingIndexesToWatchers < ActiveRecord::Migration Chris@0: def self.up Chris@0: add_index :watchers, :user_id Chris@0: add_index :watchers, [:watchable_id, :watchable_type] Chris@0: end Chris@0: Chris@0: def self.down Chris@0: remove_index :watchers, :user_id Chris@0: remove_index :watchers, :column => [:watchable_id, :watchable_type] Chris@0: end Chris@0: end