123456789101112131415161718 |
- # Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
- class Issue3647CustomObjectAttributeInteger < ActiveRecord::Migration[5.2]
- def up
- return if !Setting.exists?(name: 'system_init_done')
- %i[min max].each do |attr|
- ObjectManager::Attribute
- .where(data_type: 'integer', editable: true)
- .each do |attribute|
- next if attribute.data_option[attr] <= 2_147_483_647
- attribute.data_option[attr] = 2_147_483_647
- attribute.save!(validate: false)
- end
- end
- end
- end
|