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')
|
2017-10-01 12:25:52 +00:00
|
|
|
EmailAddress.all.each do |email_address|
|
2017-08-22 12:55:36 +00:00
|
|
|
begin
|
|
|
|
email_address.save!
|
|
|
|
rescue => e
|
|
|
|
Rails.logger.error "Unable to update EmailAddress.find(#{email_address.id}) '#{email_address.inspect}': #{e.message}"
|
|
|
|
end
|
2017-10-01 12:25:52 +00:00
|
|
|
end
|
2017-08-22 12:55:36 +00:00
|
|
|
end
|
|
|
|
end
|