mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:19:21 +08:00
REFACTOR: Reduce dependency on the post stream in TopicView
.
This will allow us to drop the post stream from the payload for mega-topics. On smaller topics, the extra query is fast because of an existing index.
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
class AddIndexTopicIdSortOrderOnPosts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_index :posts, [:topic_id, :sort_order], order: { sort_order: :asc }
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user