Files
Redmine/db/migrate/20091227112908_change_wiki_contents_text_limit.rb
Go MAEDA d16e36028f Use Redmine::Database.mysql? instead of a regular expression (#31555).
Patch by Pavel Rosický.


git-svn-id: http://svn.redmine.org/redmine/trunk@18256 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-06-13 07:50:48 +00:00

17 lines
490 B
Ruby

class ChangeWikiContentsTextLimit < ActiveRecord::Migration[4.2]
def self.up
# Migrates MySQL databases only
# Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818)
# Not fixed in Rails 2.3.5
if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :wiki_contents, :text, :text, :limit => max_size
change_column :wiki_content_versions, :data, :binary, :limit => max_size
end
end
def self.down
# no-op
end
end