Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

397 B
Raw Blame
class AddMonitorIndexToAutomationRules < ActiveRecord::Migration[7.1]
  disable_ddl_transaction!

  def up
    remove_foreign_key :automation_rules, column: :monitor_id, if_exists: true
    add_index :automation_rules, :monitor_id, algorithm: :concurrently, if_not_exists: true
  end

  def down
    remove_index :automation_rules, :monitor_id, algorithm: :concurrently, if_exists: true
  end
end