feat(perf): add index to messages created at (#7044)

* feat: add index to messages created at

* feat: run migration
This commit is contained in:
Shivam Mishra
2023-05-10 11:34:49 +05:30
committed by GitHub
parent 6137a45214
commit 662967b5d3
3 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
class AddIndexToMessagesCreatedAt < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
add_index :messages, [:created_at], name: 'index_messages_on_created_at', algorithm: :concurrently
end
end