Skip to content

Commit

Permalink
[frontend] Rails 5.2: Update database rake task
Browse files Browse the repository at this point in the history
The supports_migrations? method got deprecated in Rails 5.1 and now got
removed.
Since OBS only supports the MySQL adapter and we know that this one
supports migration dumps, we don't need this check anyway.

See rails/rails#28172 for details.
  • Loading branch information
bgeuken authored and Oleg Girko committed Feb 12, 2020
1 parent 9da54bc commit 6890716
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api/lib/tasks/databases.rake
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ namespace :db do
raise "Task not supported by '#{abcs[Rails.env]['adapter']}'"
end

if ActiveRecord::Base.connection.supports_migrations?
structure << ActiveRecord::Base.connection.dump_schema_information
end
structure << ActiveRecord::Base.connection.dump_schema_information

structure.gsub!(%r{AUTO_INCREMENT=[0-9]* }, '')
structure.gsub!('auto_increment', 'AUTO_INCREMENT')
Expand Down

0 comments on commit 6890716

Please sign in to comment.