Add index for `SearchLog#created_at`.

Add index for SearchLog#created_at.

Admin search logs filters by created_at so this will help.

diff --git a/db/migrate/20190326123708_add_index_created_at_on_search_logs.rb b/db/migrate/20190326123708_add_index_created_at_on_search_logs.rb
new file mode 100644
index 0000000..a70d76a
--- /dev/null
+++ b/db/migrate/20190326123708_add_index_created_at_on_search_logs.rb
@@ -0,0 +1,5 @@
+class AddIndexCreatedAtOnSearchLogs < ActiveRecord::Migration[5.2]
+  def change
+    add_index :search_logs, :created_at
+  end
+end

GitHub sha: cf9d8c1a

1 Like