mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
PERF: index for deleted posts in a topic to speed up has_deleted detection
This commit is contained in:
parent
7d4aed66c7
commit
a5d0e0f277
1 changed files with 5 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
|||
class AddDeletedPostIndexToPosts < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :posts, [:topic_id, :post_number], where: 'deleted_at IS NOT NULL', name: 'idx_posts_deleted_posts'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue