nidus-sync/db/migrations/00033_h3cell_fieldseeker_traplocation.sql
Eli Ribble 948f967a16
Add aggregation map for traps
This also makes the first time I've done a Mapbox map within a web
component. It's not officially supported according to:

https://github.com/mapbox/mapbox-gl-js/issues/12796

but I found a codepen that had a working example:

https://codepen.io/keichan34/pen/ZEKqeEj?editors=1111
2026-01-15 20:25:00 +00:00

5 lines
213 B
SQL

-- +goose Up
ALTER TABLE fieldseeker.traplocation ADD COLUMN h3cell h3index GENERATED ALWAYS AS (h3_latlng_to_cell(geospatial, 15)) STORED;
-- +goose Down
ALTER TABLE fieldseeker.traplocation DROP COLUMN h3cell;