Commit 1ba4997646911071423aed80e142a56cb717de0e

Authored by Braulio Bhavamitra
1 parent 9f22ba3e

Index filtered fields on Task

(ActionItem3127)
db/migrate/20140501171906_index_filtered_fields_on_task.rb 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +class IndexFilteredFieldsOnTask < ActiveRecord::Migration
  2 + def self.up
  3 + add_index :tasks, :requestor_id
  4 + add_index :tasks, :target_id
  5 + add_index :tasks, :target_type
  6 + add_index :tasks, [:target_id, :target_type]
  7 + add_index :tasks, :status
  8 + end
  9 +
  10 + def self.down
  11 + remove_index :tasks, :requestor_id
  12 + remove_index :tasks, :target_id
  13 + remove_index :tasks, :target_type
  14 + remove_index :tasks, [:target_id, :target_type]
  15 + remove_index :tasks, :status
  16 + end
  17 +end
... ...