trabajo-afectivo/db/migrate/20190814000001_object_manager_attribute_ticket_article_body_maxlength_change.rb

16 lines
369 B
Ruby
Raw Normal View History

class ObjectManagerAttributeTicketArticleBodyMaxlengthChange < ActiveRecord::Migration[5.1]
def up
return if !Setting.find_by(name: 'system_init_done')
attribute = ObjectManager::Attribute.get(
object: 'TicketArticle',
name: 'body',
)
return if !attribute
attribute.data_option[:maxlength] = 150_000
attribute.save!
end
end