ref: master
db/migrate/20140501171906_index_filtered_fields_on_task.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
class IndexFilteredFieldsOnTask < ActiveRecord::Migration def self.up add_index :tasks, :requestor_id add_index :tasks, :target_id add_index :tasks, :target_type add_index :tasks, [:target_id, :target_type] add_index :tasks, :status end def self.down remove_index :tasks, :requestor_id remove_index :tasks, :target_id remove_index :tasks, :target_type remove_index :tasks, [:target_id, :target_type] remove_index :tasks, :status end end |