Commit 56965b04892ea9da93faafa2c8a2992fd0b9e20b

Authored by Braulio Bhavamitra
Committed by Rodrigo Souto
1 parent 2a8a7740

Speed up domains fetch

db/migrate/20140708115518_index_domains_filtered_fields.rb 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +class IndexDomainsFilteredFields < ActiveRecord::Migration
  2 +
  3 + def self.up
  4 + add_index :domains, [:name]
  5 + add_index :domains, [:is_default]
  6 + add_index :domains, [:owner_id, :owner_type]
  7 + add_index :domains, [:owner_id, :owner_type, :is_default]
  8 + end
  9 +
  10 +end
... ...