For the past two months, our API has been failing to write geometry data to the project_geoms table. This has been happening because the trigger function that was created to create Web Mercator (SRID 3857) copies of the geoms was preventing new projects rows from being inserted into project_geoms. To solve this, @allthesignals and I deleted the finicky trigger functions.
In this PR, I've added to the Carto SQL query to get Web Mercator (SRID 3857) geoms directly from Carto, instead of needing to create the transformed geoms in our database upon UPDATE/INSERT using a trigger function.
This PR also
Fixes error logging for when the PSQL UPDATE/INSERT fails
Adds the necessary USER API KEY variable to the update-geometries test. It had been failing because this was missing.
For the past two months, our API has been failing to write geometry data to the
project_geoms
table. This has been happening because the trigger function that was created to create Web Mercator (SRID 3857) copies of the geoms was preventing new projects rows from being inserted intoproject_geoms
. To solve this, @allthesignals and I deleted the finicky trigger functions.In this PR, I've added to the Carto SQL query to get Web Mercator (SRID 3857) geoms directly from Carto, instead of needing to create the transformed geoms in our database upon UPDATE/INSERT using a trigger function.
This PR also
Addresses #144