diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-03-15 09:45:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-03-15 09:45:19 +0000 |
commit | 648a6408e7a52127b574d3a4fc5df3368a380bd2 (patch) | |
tree | 0b471671f34ff051a94e0b6a48c5fa547b1dbfa2 | |
parent | 7a11864812f790df7ffbf6ef61c9818caedae027 (diff) | |
download | redmine-648a6408e7a52127b574d3a4fc5df3368a380bd2.tar.gz redmine-648a6408e7a52127b574d3a4fc5df3368a380bd2.zip |
Long text custom fields don't accept values longer than 64KB if backend database is MySQL (#29209).
git-svn-id: http://svn.redmine.org/redmine/trunk@17965 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | db/migrate/20190315094151_change_custom_values_value_limit.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20190315094151_change_custom_values_value_limit.rb b/db/migrate/20190315094151_change_custom_values_value_limit.rb new file mode 100644 index 000000000..58e43f728 --- /dev/null +++ b/db/migrate/20190315094151_change_custom_values_value_limit.rb @@ -0,0 +1,12 @@ +class ChangeCustomValuesValueLimit < ActiveRecord::Migration[5.2] + def up + if ActiveRecord::Base.connection.adapter_name =~ /mysql/i + max_size = 16.megabytes + change_column :custom_values, :value, :text, :limit => max_size + end + end + + def down + # no-op + end +end |