Commit 46cc3b22c9fbe89b9fadc9c7488ec4e353b4970e
1 parent
c4263dfb
Exists in
spb-stable
and in
3 other branches
Add mysql limits to db during setup
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
9 additions
and
0 deletions
Show diff stats
lib/tasks/gitlab/setup.rake
... | ... | @@ -15,6 +15,14 @@ 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 | 26 | Rake::Task["db:seed_fu"].invoke |
19 | 27 | rescue Gitlab::TaskAbortedByUserError |
20 | 28 | puts "Quitting...".red | ... | ... |
lib/tasks/migrate/add_limits_mysql.rake
... | ... | @@ -9,5 +9,6 @@ class LimitsToMysql < ActiveRecord::Migration |
9 | 9 | change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647 |
10 | 10 | change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647 |
11 | 11 | change_column :snippets, :content, :text, limit: 2147483647 |
12 | + change_column :notes, :st_diff, :text, limit: 2147483647 | |
12 | 13 | end |
13 | 14 | end | ... | ... |