From c32ea73456d56fbcb419bbd096b32f33bbf59bc2 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 7 Jul 2015 14:05:38 -0400 Subject: [PATCH] add index on user_visits for reports --- .../20150707163251_add_reports_index_to_user_visits.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20150707163251_add_reports_index_to_user_visits.rb diff --git a/db/migrate/20150707163251_add_reports_index_to_user_visits.rb b/db/migrate/20150707163251_add_reports_index_to_user_visits.rb new file mode 100644 index 000000000..299bcb250 --- /dev/null +++ b/db/migrate/20150707163251_add_reports_index_to_user_visits.rb @@ -0,0 +1,9 @@ +class AddReportsIndexToUserVisits < ActiveRecord::Migration + def up + add_index :user_visits, [:visited_at, :mobile] + end + + def down + remove_index :user_visits, [:visited_at, :mobile] + end +end