add indexes on things that are searched by
This commit is contained in:
parent
342d6ff911
commit
b128c818c9
1 changed files with 11 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue