Commit 56965b04892ea9da93faafa2c8a2992fd0b9e20b
Committed by
Rodrigo Souto
1 parent
2a8a7740
Exists in
master
and in
22 other branches
Speed up domains fetch
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
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 | ... | ... |