X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dae3dcf87edcfc0648cd0b93b069b0eee67d3ab7..392b68a65fd6ffa521b89e079b234bb0241380d3:/db/migrate/008_remove_segments.rb diff --git a/db/migrate/008_remove_segments.rb b/db/migrate/008_remove_segments.rb index f4d08cf18..8ca894d92 100644 --- a/db/migrate/008_remove_segments.rb +++ b/db/migrate/008_remove_segments.rb @@ -2,7 +2,7 @@ require "migrate" class RemoveSegments < ActiveRecord::Migration def self.up - have_segs = select_value("SELECT count(*) FROM current_segments").to_i != 0 + have_segs = select_value("SELECT count(*) FROM current_segments").to_i.nonzero? if have_segs prefix = File.join Dir.tmpdir, "008_remove_segments.#{$PROCESS_ID}."