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