Files
oott/backend/database_migrations/03-add_device_events/up.sql
T
rzuastiandClaude Sonnet 4.6 888f18603f Add device_events table and scan history API endpoint
Records a DeviceEvent row on every scan: NewDevice when a device is first
seen, DeviceSeen on subsequent scans. Exposes GET /api/devices/{mac}/events
with pagination, ordered by date descending.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 21:22:13 -04:00

9 lines
207 B
SQL

CREATE TABLE device_events(
id INTEGER PRIMARY KEY,
mac_address TEXT NOT NULL,
created_on TEXT NOT NULL,
event_type TEXT NOT NULL,
ipv4_address TEXT NOT NULL,
vendor TEXT NOT NULL
);