Remove tile_for_point SQL functions
This removes both the pl/pgsql version and the shared library version of the `tile_for_point` SQL function. This function was only used in some old migrations, and is not required for production usage. Removing this function simplifies the installation and configuration for new developers. These SQL functions are separate from the `tile_for_point` ruby/C function which is part of the quad_tile gem. This function is still used when creating and updating database records. Fixes #3110.
This commit is contained in:
parent
74a79711e1
commit
479c1575e1
14 changed files with 13 additions and 235 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue