summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-10 08:22:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-10 08:22:49 +0000
commitdaf1342c047d43779b609bdfb94b14cb7725dcae (patch)
treee21aa9ae7ad800299a3c734c4e37c6e3a7ca749a
parentb3ddd37346e6748caec9ef8f45d5e550bf9b3015 (diff)
downloadredmine-daf1342c047d43779b609bdfb94b14cb7725dcae.tar.gz
redmine-daf1342c047d43779b609bdfb94b14cb7725dcae.zip
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
-rw-r--r--db/migrate/20161010081301_change_issues_description_limit.rb12
-rw-r--r--db/migrate/20161010081528_change_journal_details_value_limit.rb13
-rw-r--r--db/migrate/20161010081600_change_journals_notes_limit.rb12
3 files changed, 37 insertions, 0 deletions
diff --git a/db/migrate/20161010081301_change_issues_description_limit.rb b/db/migrate/20161010081301_change_issues_description_limit.rb
new file mode 100644
index 000000000..0f20466a1
--- /dev/null
+++ b/db/migrate/20161010081301_change_issues_description_limit.rb
@@ -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
diff --git a/db/migrate/20161010081528_change_journal_details_value_limit.rb b/db/migrate/20161010081528_change_journal_details_value_limit.rb
new file mode 100644
index 000000000..2314dd535
--- /dev/null
+++ b/db/migrate/20161010081528_change_journal_details_value_limit.rb
@@ -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
diff --git a/db/migrate/20161010081600_change_journals_notes_limit.rb b/db/migrate/20161010081600_change_journals_notes_limit.rb
new file mode 100644
index 000000000..8a2ba9be6
--- /dev/null
+++ b/db/migrate/20161010081600_change_journals_notes_limit.rb
@@ -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