Skip to content

Database Model

Topvennie edited this page Mar 8, 2023 · 3 revisions

The database scheme

dbimg

detection

Incoming hardware detection events

column type constraints
id integer primary key
station_id integer fk_station
baton_id integer fk_baton
timestamp timestamp
rssi integer
battery float
uptime_ms integer
remote_id integer
timestamp_ingestion timestamp

team

All teams

column type constraints
id integer primary key
name varchar
baton_id integer fk_baton

baton

All batons

column type constraints
id integer primary key
name varchar
mac varchar

lap

Generated by the logic, based on incoming detections.

column type constraints
id integer primary key
team_id integer fk_team
timestamp timestamp
lap_source_id integer fk_lap_source
manual boolean

station

All stations

column type constraints
id integer primary key
name varchar
broken boolean
distance_from_start integer
url varchar
coord_x float
coord_y float

lap_soure

The different lapper algorithms

column type constraints
id integer primary key
name varchar

batonswitchover

Teams switching to a new baton

column type constraints
id integer primary key
teamid integer fk_team
previousbatonid integer fk_baton
newbatonid integer fk_baton
timestamp timestamp

lapsourceswitchover

Switchover for lapper algorithms

column type constraints
id integer primary key
newlapsource integer fk_lap_source
timestamp timestamp

flyway_schema_history

column type constraints
installed_rank_integer integer primary key
version varchar
description varchar
type varchar
script varchar
checksum integer
installed_by varchar
installed_on timestamp
execution_time integer
success boolean