diff --git a/app/models/role.rb b/app/models/role.rb index 38014102e..0a0f1dd6d 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -77,7 +77,7 @@ class Role < ActiveRecord::Base validates_presence_of :name validates_uniqueness_of :name - validates_length_of :name, :maximum => 30 + validates_length_of :name, :maximum => 255 validates_inclusion_of :issues_visibility, :in => ISSUES_VISIBILITY_OPTIONS.collect(&:first), :if => lambda {|role| role.respond_to?(:issues_visibility) && role.issues_visibility_changed?} diff --git a/db/migrate/20190620135549_change_roles_name_limit.rb b/db/migrate/20190620135549_change_roles_name_limit.rb new file mode 100644 index 000000000..29f5b03c5 --- /dev/null +++ b/db/migrate/20190620135549_change_roles_name_limit.rb @@ -0,0 +1,9 @@ +class ChangeRolesNameLimit < ActiveRecord::Migration[5.2] + def self.up + change_column :roles, :name, :string, :limit => 255, :default => '' + end + + def self.down + change_column :roles, :name, :string, :limit => 30, :default => '' + end +end