Add indexes on user+id to changeset and diary comments

This commit is contained in:
Tom Hughes 2025-01-21 19:21:17 +00:00
parent bd577d7c92
commit ebe7cf8d17
4 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,8 @@
class AddUserCommentIndexes < ActiveRecord::Migration[7.2]
disable_ddl_transaction!
def change
add_index :changeset_comments, [:author_id, :id], :algorithm => :concurrently
add_index :diary_comments, [:user_id, :id], :algorithm => :concurrently
end
end