Files
beacon-server/db/migrations/030_observation_airtime.sql
MrAlders0n 7650d9b742 feat(observers): per-observer activity endpoint
GET /observers/{id}/activity returns bucketed observation counts, LoRa
airtime, SNR/RSSI aggregates and a payload-type breakdown for one
observer. Airtime is computed at ingest from the raw frame length and
stored on the observation; intervals of 1h and up are served from an
hourly matview so no request path joins back to packets.
2026-09-10 06:37:45 -04:00

3 lines
145 B
SQL

-- Time-on-air per observation so per-observer activity never joins back to packets.
ALTER TABLE packet_observations ADD COLUMN airtime_ms REAL;