diff --git a/db/migrate/20170303070706_add_index_to_topic_view_items.rb b/db/migrate/20170303070706_add_index_to_topic_view_items.rb new file mode 100644 index 00000000000..d3410816c2c --- /dev/null +++ b/db/migrate/20170303070706_add_index_to_topic_view_items.rb @@ -0,0 +1,5 @@ +class AddIndexToTopicViewItems < ActiveRecord::Migration + def change + add_index :topic_views, [:user_id, :viewed_at] + end +end