20210810091200_issue_3669_fix_domain.rb 389 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue3669FixDomain < ActiveRecord::Migration[6.0]
  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