20180919000000_setting_update_pretty_date_format.rb 449 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingUpdatePrettyDateFormat < ActiveRecord::Migration[5.1]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. setting = Setting.find_by(name: 'pretty_date_format')
  7. return if !setting
  8. setting.options[:form][0][:options][:timestamp] = 'timestamp - e. g. "2018-08-30 14:30"'
  9. setting.save!
  10. end
  11. end