From 752f737497c8e5e55d4366a1250b2cb2e1464535 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 30 Apr 2010 00:21:57 +0100 Subject: [PATCH] Add a user index to diary comments --- db/migrate/050_add_user_index_to_diary_comments.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/050_add_user_index_to_diary_comments.rb 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 -- 2.43.2