add indexes on things that are searched by
This commit is contained in:
parent
342d6ff911
commit
b128c818c9
11
db/migrate/20120706221602_more_indexes.rb
Normal file
11
db/migrate/20120706221602_more_indexes.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class MoreIndexes < ActiveRecord::Migration
|
||||
def up
|
||||
add_index :stories, [ "is_expired", "is_moderated" ],
|
||||
:name => "is_idxes"
|
||||
add_index :tag_filters, [ "user_id", "tag_id" ],
|
||||
:name => "user_tag_idx"
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue