]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/008_remove_segments.rb
Dressed up a few more messages.
[rails.git] / db / migrate / 008_remove_segments.rb
index f4d08cf18b8a5a6a75f11cfe6f5b13755d61f767..8ca894d92b54d61773b9dd5f6b11d9fd6ceba32f 100644 (file)
@@ -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}."