Raises length of issue description and journals for MySQL (#20127).

git-svn-id: http://svn.redmine.org/redmine/trunk@15905 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-10-10 08:22:49 +00:00
parent b3ddd37346
commit daf1342c04
3 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
class ChangeIssuesDescriptionLimit < ActiveRecord::Migration
def up
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
max_size = 16.megabytes
change_column :issues, :description, :text, :limit => max_size
end
end
def down
# no-op
end
end

View File

@@ -0,0 +1,13 @@
class ChangeJournalDetailsValueLimit < ActiveRecord::Migration
def up
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
max_size = 16.megabytes
change_column :journal_details, :value, :text, :limit => max_size
change_column :journal_details, :old_value, :text, :limit => max_size
end
end
def down
# no-op
end
end

View File

@@ -0,0 +1,12 @@
class ChangeJournalsNotesLimit < ActiveRecord::Migration
def up
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
max_size = 16.megabytes
change_column :journals, :notes, :text, :limit => max_size
end
end
def down
# no-op
end
end