Commit cd61239540c00279563cc0e4ae763a569be0bef5
1 parent
43e77099
Exists in
spb-stable
and in
2 other branches
Move the adapter check to the migration
Showing
2 changed files
with
2 additions
and
9 deletions
Show diff stats
db/migrate/limits_to_mysql.rb
1 | 1 | class LimitsToMysql < ActiveRecord::Migration |
2 | 2 | def up |
3 | - return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] == 'mysql2' | |
3 | + return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/ | |
4 | 4 | |
5 | 5 | change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647 |
6 | 6 | change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647 | ... | ... |
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 | ... | ... |