20180108000001_change_exchange_external_sync_identifier.rb 385 B

12345678910111213
  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. ExternalSync.where(
  6. source: 'EWS::FolderContact'
  7. ).update_all( # rubocop:disable Rails/SkipsModelValidations
  8. source: 'Exchange::FolderContact'
  9. )
  10. end
  11. end