Add a user index to diary comments
This commit is contained in:
parent
937b576bf5
commit
752f737497
1 changed files with 9 additions and 0 deletions
9
db/migrate/050_add_user_index_to_diary_comments.rb
Normal file
9
db/migrate/050_add_user_index_to_diary_comments.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class AddUserIndexToDiaryComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :diary_comments, [:user_id, :created_at], :name => "diary_comment_user_id_created_at_index"
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :diary_comments, :name => "diary_comment_user_id_created_at_index"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue