From fc5e41ee191f7091b1491db920460ca6e4b634b6 Mon Sep 17 00:00:00 2001 From: okkez Date: Wed, 10 Feb 2016 01:00:01 +0900 Subject: [PATCH 1/3] Raises journals notes limit to 4GB (#19869). This is for MySQL only. --- db/migrate/20160209143624_change_journals_notes_limit.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20160209143624_change_journals_notes_limit.rb diff --git a/db/migrate/20160209143624_change_journals_notes_limit.rb b/db/migrate/20160209143624_change_journals_notes_limit.rb new file mode 100644 index 0000000..8a2ba9b --- /dev/null +++ b/db/migrate/20160209143624_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 -- 2.7.0