20220322233000_issue_3763_default_date_datetime_diff_clear.rb 390 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue3763DefaultDateDatetimeDiffClear < ActiveRecord::Migration[5.2]
  3. def up
  4. return if !Setting.exists?(name: 'system_init_done')
  5. ObjectManager::Attribute
  6. .where(data_type: %w[date datetime])
  7. .each do |attr|
  8. attr.data_option[:diff] = nil
  9. attr.save!
  10. end
  11. end
  12. end