message_all表中添加type索引

This commit is contained in:
huang 2016-03-21 16:54:12 +08:00
parent 70d594659e
commit 44549e091d
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,5 @@
class AddIndexMtyeToMessageAlls < ActiveRecord::Migration
def change
add_index :message_alls, [:message_type]
end
end