nidus-sync/db/sql/publicreport_publicid_suggestion.sql
Eli Ribble e932c2c473
Rework publicreport addressing
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'.
2026-03-09 18:02:22 +00:00

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;