mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-17 01:25:37 -05:00
Record last time an environmental device reported
This commit is contained in:
11
Environment/Service/Data/Queries/SetDeviceLastUpdated.psql
Normal file
11
Environment/Service/Data/Queries/SetDeviceLastUpdated.psql
Normal file
@@ -0,0 +1,11 @@
|
||||
INSERT INTO device(
|
||||
name,
|
||||
last_updated
|
||||
)
|
||||
VALUES (
|
||||
@Name,
|
||||
@LastUpdated
|
||||
)
|
||||
ON CONFLICT (name)
|
||||
DO UPDATE
|
||||
SET last_updated = EXCLUDED.last_updated
|
||||
Reference in New Issue
Block a user