From: Tom Hughes Date: Thu, 29 Apr 2010 23:21:57 +0000 (+0100) Subject: Add a user index to diary comments X-Git-Tag: live~6359^2~20 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/752f737497c8e5e55d4366a1250b2cb2e1464535?hp=937b576bf55eae69ae8584bff049ae122ded57e5 Add a user index to diary comments --- diff --git a/db/migrate/050_add_user_index_to_diary_comments.rb b/db/migrate/050_add_user_index_to_diary_comments.rb new file mode 100644 index 000000000..e1fe0def2 --- /dev/null +++ b/db/migrate/050_add_user_index_to_diary_comments.rb @@ -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