search: fix order:note, order:comment_bumped to use indexes.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class FixLastNotedAtIndexOnPosts < ActiveRecord::Migration
|
||||
def up
|
||||
Post.without_timeout do
|
||||
remove_index :posts, column: :last_comment_bumped_at
|
||||
add_index :posts, :last_comment_bumped_at, order: "DESC NULLS LAST"
|
||||
|
||||
remove_index :posts, column: :last_noted_at
|
||||
add_index :posts, :last_noted_at, order: "DESC NULLS LAST"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user