aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Persist.hs16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/Persist.hs b/lib/Persist.hs
index f722487..637155a 100644
--- a/lib/Persist.hs
+++ b/lib/Persist.hs
@@ -103,7 +103,7 @@ Import sql=tt_imports
date UTCTime
Stop sql=tt_stop
- ticket TicketId
+ ticket TicketId OnDeleteCascade OnUpdateCascade
station StationId
arrival GTFS.Time
departure GTFS.Time
@@ -131,25 +131,23 @@ Tracker sql=tt_tracker_token
deriving Eq Show Generic
TrackerTicket
- ticket TicketId
- tracker TrackerId
+ ticket TicketId OnDeleteCascade OnUpdateCascade
+ tracker TrackerId OnDeleteCascade OnUpdateCascade
UniqueTrackerTicket ticket tracker
-
-- raw frames as received from OBUs
TrainPing json sql=tt_trip_ping
- -- ticket TicketId
- token TrackerId
+ ticket TicketId OnDeleteCascade OnUpdateCascade
+ token TrackerId OnDeleteSetNull OnUpdateCascade
geopos Geopos
timestamp UTCTime
sequence Double
- ticket TicketId
deriving Show Generic Eq
-- status of a train somewhen in time (may be in the future),
-- inferred from trainpings / entered via controlRoom
TrainAnchor json sql=tt_trip_anchor
- ticket TicketId
+ ticket TicketId OnDeleteCascade OnUpdateCascade
created UTCTime
when GTFS.Seconds
sequence Double
@@ -160,7 +158,7 @@ TrainAnchor json sql=tt_trip_anchor
-- TODO: multi-language support?
Announcement json sql=tt_announcements
Id UUID default=uuid_generate_v4()
- ticket TicketId
+ ticket TicketId OnDeleteCascade OnUpdateCascade
header Text
message Text
url Text Maybe