Commit 1ba4997646911071423aed80e142a56cb717de0e
1 parent
9f22ba3e
Exists in
master
and in
28 other branches
Index filtered fields on Task
(ActionItem3127)
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
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 | ... | ... |