1234567891011121314151617181920 |
- class ObjectManagerAttributeDateRemoveFuturePast < ActiveRecord::Migration[5.1]
- def change
-
- return if !Setting.exists?(name: 'system_init_done')
- ObjectManager::Attribute.where(data_type: 'date').each do |attribute|
- attribute.data_option = attribute.data_option.except(:future, :past)
-
-
-
- attribute.data_option[:diff] ||= 24
- attribute.save!
- end
- end
- end
|