aboutsummaryrefslogtreecommitdiff
path: root/lib/Persist.hs
diff options
context:
space:
mode:
authorstuebinm2026-05-13 00:05:37 +0200
committerstuebinm2026-05-13 00:05:37 +0200
commitdbb5c4b6b882cd99981eb854386586854a23fdec (patch)
tree7cf698de3ceae355e9f040a6563b1139be029b99 /lib/Persist.hs
parentd668e36403c293c86f761e4ac9f902cda73f4a7d (diff)
Server.Frontend.Tracker: dedicated configuration menuHEADmain
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.hs9
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