20210810091200_issue_3669_fix_domain.rb 388 B

123456789101112
  1. # Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
  2. class Issue3669FixDomain < ActiveRecord::Migration[5.2]
  3. def change
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Channel.where(area: ['Google::Account', 'Microsoft365::Account']).each do |channel|
  6. channel.options[:outbound][:options].delete(:domain)
  7. channel.save!
  8. end
  9. end
  10. end