chore: Fix connection pool (#6005)

We want to allocate as much database connection to the pool to match the sidekiq concurrency configuration.
ref: https://maxencemalbois.medium.com/the-ruby-on-rails-database-connections-pool-4ce1099a9e9f

fixes: #6004
This commit is contained in:
Sojan Jose
2023-01-16 17:50:23 +05:30
committed by GitHub
parent 70cb0a8ed9
commit 72f206025a
9 changed files with 17 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ class RemoveNameFromChannels < ActiveRecord::Migration[6.0]
remove_column :channel_facebook_pages, :name, :string
remove_column :channel_twitter_profiles, :name, :string
migrate_web_widget_name_to_inbox
remove_column :channel_web_widgets, :website_name, :string # rubocop:disable Rails/BulkChangeTable
remove_column :channel_web_widgets, :website_name, :string
add_column :channel_web_widgets, :welcome_title, :string
add_column :channel_web_widgets, :welcome_tagline, :string

View File

@@ -4,7 +4,7 @@ class AddSenderToMessages < ActiveRecord::Migration[6.0]
add_sender_from_message
remove_index :messages, name: 'index_messages_on_contact_id', column: 'contact_id'
remove_index :messages, name: 'index_messages_on_user_id', column: 'user_id'
remove_column :messages, :user_id, :integer # rubocop:disable Rails/BulkChangeTable
remove_column :messages, :user_id, :integer
remove_column :messages, :contact_id, :integer
end

View File

@@ -1,6 +1,6 @@
class AgentAwayMessageToAutoReply < ActiveRecord::Migration[6.0]
def change
add_column :inboxes, :greeting_enabled, :boolean, default: false # rubocop:disable Rails/BulkChangeTable
add_column :inboxes, :greeting_enabled, :boolean, default: false
add_column :inboxes, :greeting_message, :string
migrate_agent_away_to_greeting