diff options
| author | stuebinm | 2026-05-13 00:05:37 +0200 |
|---|---|---|
| committer | stuebinm | 2026-05-13 00:05:37 +0200 |
| commit | dbb5c4b6b882cd99981eb854386586854a23fdec (patch) | |
| tree | 7cf698de3ceae355e9f040a6563b1139be029b99 /lib/Persist.hs | |
| parent | d668e36403c293c86f761e4ac9f902cda73f4a7d (diff) | |
There is no back-channel with which we could retrieve the config that is
currently on an owntracks client. However, we can send out each config
with its own slightly tweaked host url, so that we can detect its
provisioning on the incoming requests anyways.
Credits for the idea go to Emily.
Diffstat (limited to 'lib/Persist.hs')
| -rw-r--r-- | lib/Persist.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Persist.hs b/lib/Persist.hs index dbab9bd..6f459fc 100644 --- a/lib/Persist.hs +++ b/lib/Persist.hs @@ -94,6 +94,7 @@ derivePersistFieldJSON "Value" -- We derive these here so that OwnTracks.* can become its own package eventually derivePersistFieldJSON "OwnTracks.Status" derivePersistFieldJSON "OwnTracks.Command" +derivePersistFieldJSON "OwnTracks.Configuration" data CommandStatus = Queued | Sent @@ -144,6 +145,7 @@ Tracker sql=tt_tracker blocked Bool agent Text currentTicket TicketId Maybe + configVersion Int Maybe deriving Eq Show Generic TrackerStatus sql=tt_tracker_status @@ -164,6 +166,13 @@ TrackerCommand sql=tt_tracker_command command OwnTracks.Command deriving Show Eq +TrackerConfig sql=tt_tracker_config + tracker TrackerId + timestamp UTCTime + seen Bool + configuration OwnTracks.Configuration + deriving Show Eq + -- raw frames as received from OBUs Ping json sql=tt_trip_ping ticket TicketId Maybe OnDeleteCascade OnUpdateCascade |
