From 44549e091d19741df725a4eb61f17f9f654bb94a Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Mar 2016 16:54:12 +0800 Subject: [PATCH] =?UTF-8?q?message=5Fall=E8=A1=A8=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0type=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20160321071740_add_index_to_message_alls.rb | 2 +- db/migrate/20160321085313_add_index_mtye_to_message_alls.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20160321085313_add_index_mtye_to_message_alls.rb diff --git a/db/migrate/20160321071740_add_index_to_message_alls.rb b/db/migrate/20160321071740_add_index_to_message_alls.rb index cb204d809..d3e095da5 100644 --- a/db/migrate/20160321071740_add_index_to_message_alls.rb +++ b/db/migrate/20160321071740_add_index_to_message_alls.rb @@ -1,5 +1,5 @@ class AddIndexToMessageAlls < ActiveRecord::Migration def change - add_index :message_alls, [:user_id, :message_id, :message_type, :created_at] + add_index :message_alls, [:user_id, :message_id, :created_at] end end diff --git a/db/migrate/20160321085313_add_index_mtye_to_message_alls.rb b/db/migrate/20160321085313_add_index_mtye_to_message_alls.rb new file mode 100644 index 000000000..8f5c734c4 --- /dev/null +++ b/db/migrate/20160321085313_add_index_mtye_to_message_alls.rb @@ -0,0 +1,5 @@ +class AddIndexMtyeToMessageAlls < ActiveRecord::Migration + def change + add_index :message_alls, [:message_type] + end +end