This adds the ability to link a proper address in the database to the report and harmonizes the field names with the address table. It also migrates away from mapbox entirely. And I fixed the "pool" naming for the publicreports, which are supposed to be the more generic 'water'.
22 lines
296 B
SQL
22 lines
296 B
SQL
-- PublicreportPublicIDSuggestion
|
|
SELECT
|
|
'nuisance' AS table_name,
|
|
public_id,
|
|
location
|
|
FROM
|
|
publicreport.nuisance
|
|
WHERE
|
|
public_id LIKE $1
|
|
|
|
UNION ALL
|
|
|
|
SELECT
|
|
'water' AS table_name,
|
|
public_id,
|
|
location
|
|
FROM
|
|
publicreport.water
|
|
WHERE
|
|
public_id LIKE $1
|
|
ORDER BY
|
|
public_id;
|