Commit 43e77099 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Adjust MySQL limits for existing installations

parent 7fab63b4
......@@ -18,6 +18,7 @@ v 6.8.0
- Expose event and mergerequest timestamps in API
- Fix emails on push service when only one commit is pushed
- Store Rails cache data in the Redis `cache:gitlab` namespace
- Adjust MySQL limits for existing installations
v 6.7.3
- Fix the merge notification email not being sent (Pierre de La Morinerie)
......
require_relative 'limits_to_mysql'
class LimitsToMysql < ActiveRecord::Migration
def up
return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] == 'mysql2'
change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647
change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647
change_column :snippets, :content, :text, limit: 2147483647
change_column :notes, :st_diff, :text, limit: 2147483647
end
end
require Rails.root.join('db/migrate/limits_to_mysql')
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: 2147483647
change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647
change_column :snippets, :content, :text, limit: 2147483647
change_column :notes, :st_diff, :text, limit: 2147483647
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment