chore: Improve search, list performance of contact/conversation APIs (#2696)
This commit is contained in:
6
db/migrate/20210723094412_add_index_to_conversations.rb
Normal file
6
db/migrate/20210723094412_add_index_to_conversations.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddIndexToConversations < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_index :conversations, [:status, :account_id]
|
||||
add_index :conversations, [:assignee_id, :account_id]
|
||||
end
|
||||
end
|
||||
5
db/migrate/20210723095657_add_index_to_contacts.rb
Normal file
5
db/migrate/20210723095657_add_index_to_contacts.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddIndexToContacts < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_index :contacts, [:phone_number, :account_id]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user