Fix rubocop Style/CombinableLoops warnings

This commit is contained in:
Tom Hughes 2020-09-02 18:27:11 +01:00
parent 06b8558aaf
commit b1e44c1eea
2 changed files with 1 additions and 9 deletions

View file

@ -188,11 +188,6 @@ Rails/OutputSafety:
Rails/TimeZone:
Enabled: false
# Offense count: 1
Style/CombinableLoops:
Exclude:
- 'db/migrate/021_move_to_innodb.rb'
# Offense count: 572
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.

View file

@ -11,11 +11,8 @@ class MoveToInnodb < ActiveRecord::Migration[4.2]
@ver_tbl.each do |tbl|
change_column tbl, "version", :bigint, :null => false
end
@ver_tbl.each do |tbl|
add_column "current_#{tbl}", "version", :bigint, :null => false
# As the initial version of all nodes, ways and relations is 0, we set the
# As the initial version of all nodes, ways and relations is 0, we set tehe
# current version to something less so that we can update the version in
# batches of 10000
tbl.classify.constantize.update_all(:version => -1)