Remove report_location view, add lat lng to report table

This commit is contained in:
Eli Ribble 2026-03-18 18:55:50 +00:00
parent 341c3ef6b9
commit 21e8b9880d
No known key found for this signature in database
9 changed files with 57 additions and 358 deletions

View file

@ -0,0 +1,2 @@
-- +goose Up
DROP VIEW publicreport.report_location;

View file

@ -0,0 +1,6 @@
-- +goose Up
ALTER TABLE publicreport.report ADD COLUMN location_latitude DOUBLE PRECISION GENERATED ALWAYS AS (ST_Y(location)) STORED;
ALTER TABLE publicreport.report ADD COLUMN location_longitude DOUBLE PRECISION GENERATED ALWAYS AS (ST_X(location)) STORED;
-- +goose Down
ALTER TABLE publicreport.report DROP COLUMN location_longitude;
ALTER TABLE publicreport.report DROP COLUMN location_latitude;