Commit 46cc3b22 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add mysql limits to db during setup

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c4263dfb
...@@ -15,6 +15,14 @@ namespace :gitlab do ...@@ -15,6 +15,14 @@ namespace :gitlab do
end end
Rake::Task["db:setup"].invoke Rake::Task["db:setup"].invoke
config = YAML.load_file(File.join(Rails.root,'config','database.yml'))[Rails.env]
success = case config["adapter"]
when /^mysql/ then
Rake::Task["add_limits_mysql"].invoke
when "postgresql" then
end
Rake::Task["db:seed_fu"].invoke Rake::Task["db:seed_fu"].invoke
rescue Gitlab::TaskAbortedByUserError rescue Gitlab::TaskAbortedByUserError
puts "Quitting...".red puts "Quitting...".red
......
...@@ -9,5 +9,6 @@ class LimitsToMysql < ActiveRecord::Migration ...@@ -9,5 +9,6 @@ class LimitsToMysql < ActiveRecord::Migration
change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647 change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647
change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647 change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647
change_column :snippets, :content, :text, limit: 2147483647 change_column :snippets, :content, :text, limit: 2147483647
change_column :notes, :st_diff, :text, limit: 2147483647
end end
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