2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2018-09-19 14:49:27 +00:00
|
|
|
class SettingUpdatePrettyDateFormat < ActiveRecord::Migration[5.1]
|
|
|
|
def up
|
|
|
|
|
|
|
|
# return if it's a new setup
|
2020-08-03 08:35:43 +00:00
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
2018-09-19 14:49:27 +00:00
|
|
|
|
|
|
|
setting = Setting.find_by(name: 'pretty_date_format')
|
|
|
|
return if !setting
|
2018-10-09 06:17:41 +00:00
|
|
|
|
2018-09-19 14:49:27 +00:00
|
|
|
setting.options[:form][0][:options][:timestamp] = 'timestamp - e. g. "2018-08-30 14:30"'
|
|
|
|
setting.save!
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|