Add location x and y to address table

For easier reference
This commit is contained in:
Eli Ribble 2026-03-20 17:59:13 +00:00
parent 441e4d45b1
commit edfd8e285f
No known key found for this signature in database
3 changed files with 39 additions and 2 deletions

View file

@ -0,0 +1,6 @@
-- +goose Up
ALTER TABLE address ADD COLUMN location_x DOUBLE PRECISION GENERATED ALWAYS AS (ST_X(location)) STORED;
ALTER TABLE address ADD COLUMN location_y DOUBLE PRECISION GENERATED ALWAYS AS (ST_Y(location)) STORED;
-- +goose Down
ALTER TABLE address DROP COLUMN location_y;
ALTER TABLE address DROP COLUMN location_x;