2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2017-09-08 08:28:34 +00:00
|
|
|
class AgendBasedSenderIssue1351 < ActiveRecord::Migration[4.2]
|
2017-08-22 12:55:36 +00:00
|
|
|
def up
|
|
|
|
|
|
|
|
# return if it's a new setup
|
2020-08-03 08:35:43 +00:00
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
2018-10-09 06:17:41 +00:00
|
|
|
|
2017-10-01 12:25:52 +00:00
|
|
|
EmailAddress.all.each do |email_address|
|
2019-06-27 18:26:28 +00:00
|
|
|
|
|
|
|
email_address.save!
|
|
|
|
rescue => e
|
|
|
|
Rails.logger.error "Unable to update EmailAddress.find(#{email_address.id}) '#{email_address.inspect}': #{e.message}"
|
|
|
|
|
2017-10-01 12:25:52 +00:00
|
|
|
end
|
2017-08-22 12:55:36 +00:00
|
|
|
end
|
|
|
|
end
|