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
|
|
|
|
return if !Setting.find_by(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
|