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.
Switch to using the zeitwork autoloader
Fix new rubocop warnings
Fix rubocop warnings
Avoid more models in old migrations Although these migrations run fine today, they could break in the future if changes are made to the current model code.
Use rails 4.2 defaults for older migrations
Add rails version number to migrations
Fix rubocop warnings
Fix rubocop warnings
Standardise on double quoted strings
Fix most auto-correctable rubocop issues
Cleanup trailing whitespace
Cleanup migrations Cleanup our migrations, replacing as much of our custom code and monkey patching with modern standard rails methods.
Modernise use of find and update_all in database migrations
Remove lib prefix from includes for ruby 1.9 compatibility
Only use the db functions for migrations if USE_DB_FUNCTIONS is set in the environment. This could possibly be revisited when we move to rails 2.3 by using a nested transaction to try the function without causing the surrounding transaction to abort.
Fix bogus casts - lat/lon are signed.
remove indexes before renaming tables (some dbs have database-level index namespaces) and unsigned is also a mysqlism
Moving AUTO_INCREMENTs to monkeypatching. Seems a bit hacky though
Fall back to adding tile numbers the hard way if the MySQL function is not available.