openstreetmap-website/db/migrate/20180204153242_tile_users.rb
Andy Allan 479c1575e1 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.
2022-12-07 17:22:50 +00:00

16 lines
345 B
Ruby

class TileUsers < ActiveRecord::Migration[5.1]
class User < ApplicationRecord
end
def up
add_column :users, :home_tile, :bigint
add_index :users, [:home_tile], :name => "users_home_idx"
User.all.each(&:save!)
end
def down
remove_index :users, :name => "users_home_idx"
remove_column :users, :home_tile
end
end