Index changeset comments by changeset and date

This commit is contained in:
Tom Hughes 2020-10-06 23:10:52 +01:00
parent 1946c84f71
commit 06a98ad983
2 changed files with 17 additions and 21 deletions

View file

@ -0,0 +1,8 @@
class AddChangesetIndexToChangesetComments < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def change
remove_index :changeset_comments, [:author_id, :created_at]
add_index :changeset_comments, [:changeset_id, :created_at], :algorithm => :concurrently
end
end