summaryrefslogtreecommitdiffstats
path: root/db/migrate/20161010081528_change_journal_details_value_limit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20161010081528_change_journal_details_value_limit.rb')
-rw-r--r--db/migrate/20161010081528_change_journal_details_value_limit.rb13
1 files changed, 13 insertions, 0 deletions
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