20180108000001_change_exchange_external_sync_identifier.rb 365 B

12345678910
  1. class ChangeExchangeExternalSyncIdentifier < ActiveRecord::Migration[5.1]
  2. def up
  3. # return if it's a new setup to avoid running the migration
  4. return if !Setting.find_by(name: 'system_init_done')
  5. # rubocop:disable Rails/SkipsModelValidations
  6. ExternalSync.where(source: 'EWS::FolderContact').update_all(source: 'Exchange::FolderContact')
  7. end
  8. end