Commit 47094719e58e385a3cd7143f7099a9946cacde73

Authored by Rodrigo Souto
2 parents 2ded427e 1ba49976

Merge branch 'ai3127' into 'stable'

Speed up tasks fetch

http://noosfero.org/Development/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
... ...