diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-03-11 22:20:15 +0400 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-03-11 22:23:02 +0400 |
commit | 71b1030bf7cb85e5fc9efb40951e9613dbbc5ada (patch) | |
tree | 2e721ca9fa879610b5bed92bfed5d8d410c63c15 /lib/tasks/migrate | |
parent | a599d8120ddf4d9a6f66ff0bfbd024e414f38772 (diff) |
Added rake task to add limits back in mysql
Diffstat (limited to 'lib/tasks/migrate')
-rw-r--r-- | lib/tasks/migrate/add_limits_mysql.rake | 13 |
1 files changed, 13 insertions, 0 deletions
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 |