X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..9fc2a5c4e9c2d0bc7df5493b5b74345992aa9dfa:/db/migrate/20180204153242_tile_users.rb diff --git a/db/migrate/20180204153242_tile_users.rb b/db/migrate/20180204153242_tile_users.rb index 917948d43..53cea91cf 100644 --- a/db/migrate/20180204153242_tile_users.rb +++ b/db/migrate/20180204153242_tile_users.rb @@ -6,11 +6,7 @@ class TileUsers < ActiveRecord::Migration[5.1] add_column :users, :home_tile, :bigint add_index :users, [:home_tile], :name => "users_home_idx" - if ENV["USE_DB_FUNCTIONS"] - User.update_all("home_tile = tile_for_point(cast(round(home_lat * #{GeoRecord::SCALE}) as integer), cast(round(home_lon * #{GeoRecord::SCALE}) as integer))") - else - User.all.each(&:save!) - end + User.all.each(&:save!) end def down