Record originating scanner on device events

So that consumers of the events API can tell whether a sighting came
from the ARP scanner or the mDNS listener. Adds a DeviceEventScanner
enum (Arp / Mdns) plumbed from each scanner's call site through to a
new scanner column on device_events, exposed via the existing events
endpoint and OpenAPI schema. Pre-existing rows are backfilled with
'ARP' since that was the only scanner before mDNS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-01 08:09:34 -04:00
co-authored by Claude Opus 4.7
parent 0e43194492
commit d6cf9be412
8 changed files with 110 additions and 19 deletions
@@ -0,0 +1 @@
ALTER TABLE device_events ADD COLUMN scanner TEXT NOT NULL DEFAULT 'ARP' COLLATE NOCASE;