Source feed is UTC ("…Z"); the fleet is in Kenya (UTC+3). Storing UTC timestamptz
made record_datetime::date bucket by UTC day. Migration 03 converts record_datetime,
deleted_at, ingested_at, updated_at (+ ingest_state.updated_at) to Africa/Nairobi
wall-clock `timestamp`, updates the trigger to derive EAT, recreates the views
(fuel_date now EAT day) and re-grants grafana_ro. Verified in prod: 18:38Z -> 21:38 EAT.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A plate can map to multiple tracksolid.devices rows (vehicle re-fitted with a
new tracker), so the plain LEFT JOIN fanned out and double-counted litres/spend
(3345 view rows for 1888 live records). LATERAL ... ORDER BY enabled_flag,
updated_at LIMIT 1 picks one device per fill. Applied to prod as migration 02;
01 updated so fresh installs are correct. Verified: 1888 rows, 1775 matched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>