From 71b1030bf7cb85e5fc9efb40951e9613dbbc5ada Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Tue, 11 Mar 2014 19:20:15 +0100 Subject: [PATCH] Added rake task to add limits back in mysql --- lib/tasks/migrate/add_limits_mysql.rake | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/tasks/migrate/add_limits_mysql.rake diff --git a/lib/tasks/migrate/add_limits_mysql.rake b/lib/tasks/migrate/add_limits_mysql.rake new file mode 100644 index 00000000000..7dadfe6164d --- /dev/null +++ b/lib/tasks/migrate/add_limits_mysql.rake @@ -0,0 +1,13 @@ +desc "GITLAB | Add limits to strings in mysql database" +task add_limits_mysql: :environment do + puts "Adding limits to schema.rb for mysql" + LimitsToMysql.new.up +end + +class LimitsToMysql < ActiveRecord::Migration + def up + change_column :merge_request_diffs, :st_commits, :text, limit: 65535 + change_column :merge_request_diffs, :st_diffs, :text, limit: 65535 + change_column :snippets, :content, :text, limit: 65535 + end +end