Commit 2a99f18478797c67e0b795d71688bd06153abe5a
Exists in
spb-stable
and in
2 other branches
Merge branch 'mysql_field_limits' into 'master'
Adjust MySQL limits for existing installations
Showing
5 changed files
with
18 additions
and
18 deletions
Show diff stats
CHANGELOG
1 | +v 6.9.0 | |
2 | + - Store Rails cache data in the Redis `cache:gitlab` namespace | |
3 | + - Adjust MySQL limits for existing installations | |
4 | + | |
1 | 5 | v 6.8.0 |
2 | 6 | - Ability to at mention users that are participating in issue and merge req. discussion |
3 | 7 | - Enabled GZip Compression for assets in example Nginx, make sure that Nginx is compiled with --with-http_gzip_static_module flag (this is default in Ubuntu) |
... | ... | @@ -17,7 +21,6 @@ v 6.8.0 |
17 | 21 | - Fix download link for huge MR diffs |
18 | 22 | - Expose event and mergerequest timestamps in API |
19 | 23 | - Fix emails on push service when only one commit is pushed |
20 | - - Store Rails cache data in the Redis `cache:gitlab` namespace | |
21 | 24 | |
22 | 25 | v 6.7.3 |
23 | 26 | - Fix the merge notification email not being sent (Pierre de La Morinerie) | ... | ... |
... | ... | @@ -0,0 +1 @@ |
1 | +require_relative 'limits_to_mysql' | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +class LimitsToMysql < ActiveRecord::Migration | |
2 | + def up | |
3 | + return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/ | |
4 | + | |
5 | + change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647 | |
6 | + change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647 | |
7 | + change_column :snippets, :content, :text, limit: 2147483647 | |
8 | + change_column :notes, :st_diff, :text, limit: 2147483647 | |
9 | + end | |
10 | +end | ... | ... |
lib/tasks/gitlab/setup.rake
... | ... | @@ -15,14 +15,7 @@ namespace :gitlab do |
15 | 15 | end |
16 | 16 | |
17 | 17 | Rake::Task["db:setup"].invoke |
18 | - | |
19 | - config = YAML.load_file(File.join(Rails.root,'config','database.yml'))[Rails.env] | |
20 | - success = case config["adapter"] | |
21 | - when /^mysql/ then | |
22 | - Rake::Task["add_limits_mysql"].invoke | |
23 | - when "postgresql" then | |
24 | - end | |
25 | - | |
18 | + Rake::Task["add_limits_mysql"].invoke | |
26 | 19 | Rake::Task["db:seed_fu"].invoke |
27 | 20 | rescue Gitlab::TaskAbortedByUserError |
28 | 21 | puts "Quitting...".red | ... | ... |
lib/tasks/migrate/add_limits_mysql.rake
1 | +require Rails.root.join('db/migrate/limits_to_mysql') | |
2 | + | |
1 | 3 | desc "GITLAB | Add limits to strings in mysql database" |
2 | 4 | task add_limits_mysql: :environment do |
3 | 5 | puts "Adding limits to schema.rb for mysql" |
4 | 6 | LimitsToMysql.new.up |
5 | 7 | end |
6 | - | |
7 | -class LimitsToMysql < ActiveRecord::Migration | |
8 | - def up | |
9 | - change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647 | |
10 | - change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647 | |
11 | - change_column :snippets, :content, :text, limit: 2147483647 | |
12 | - change_column :notes, :st_diff, :text, limit: 2147483647 | |
13 | - end | |
14 | -end | ... | ... |