From 9bc4e1a5dfb51bfecb52bd5b97aab6e4cb951850 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Mon, 22 May 2017 11:38:37 -0700 Subject: [PATCH] Update 20170519204506_fix_last_noted_at_index_on_posts.rb --- db/migrate/20170519204506_fix_last_noted_at_index_on_posts.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20170519204506_fix_last_noted_at_index_on_posts.rb b/db/migrate/20170519204506_fix_last_noted_at_index_on_posts.rb index fb10551e5..3b6bbf841 100644 --- a/db/migrate/20170519204506_fix_last_noted_at_index_on_posts.rb +++ b/db/migrate/20170519204506_fix_last_noted_at_index_on_posts.rb @@ -6,6 +6,8 @@ class FixLastNotedAtIndexOnPosts < ActiveRecord::Migration remove_index :posts, column: :last_noted_at add_index :posts, :last_noted_at, order: "DESC NULLS LAST" + + execute "analyze posts" end end end