This is seed data that should reasonably be loaded into every database,
even those that are otherwise empty (e.g. no geo data). Using the seeds
process means that it will usually be loaded by default, and is easier
to find for existing rails developers.
This repo contains code for three functions to be loaded into PostgreSQL as a shared library:
1. `maptile_for_point`, which is used only by the `/changes` API call. This API call is little-used and IMHO should be deprecated and removed. However, even now it's hardly on the hot path for most development activities.
2. `tile_for_point`, which is used only in migrations. At this point, it seems unlikely that anyone will be doing a migration on existing data which would call this function (most developers will be running migrations on an empty database, to set it up).
3. `xid_to_int4`, which is only used for replication using Osmosis and isn't used in the Rails code at all. Hopefully this will be replaced Real Soon Now, but until then it's a quite advanced feature that most developers won't need.
Therefore, this patch proposes to replace the above three shared library functions with SQL implementations of the first two. These are _much_ slower - by a factor of about 30x, however this makes no difference when they're run on a completely empty database. In return, we're able to drop a dependency on the PostgreSQL server development package, and clean a few lines out of the installation instructions.
It's still possible to make and install the shared library functions, and I've included instructions about how to do that - although it shouldn't be necessary for the vast majority of `openstreetmap-website` developers.
Instead, we define models in the migrations themselves. This ensures that
column names etc match the state of the database during the migration,
not the current live version of the model.
- this adds links to the ToU in the Welcome box and on the About page
- adds a timestamp column to the users table to record acceptance of the ToU
- require ToU to be accepted before signup can proceed
- rearrange and change text on signup page
This persists jobs into the database, and uses locking to ensure that
workers from multiple machines avoid treading on each other.
Jobs can be run by using `bundle exec rake jobs:work`
Fixes#2015
In bundle < 2.0, warnings are printed to stdout, along with the path information
that we need. This takes the final line of the output and assumes it's the path.
Fixes#1930
Quad tile functions are now installed via a gem with native extension
automatically. This improves the run time of the test suite by ~30% for
users that didn't bother to build the C version of the functions.
Closes#1314Closes#1899