Database reference
Generated from the table definitions in sql/tables.sql and plugins/*/db/tables.sql. Plugin tables are created by the plugin's own migration.
version
Defined by: core
| Column | Type | Notes |
|---|---|---|
version |
TEXT | PRIMARY KEY |
plugins
Defined by: core
| Column | Type | Notes |
|---|---|---|
plugin |
TEXT | PRIMARY KEY, version TEXT NOT NULL |
servers
Defined by: core
| Column | Type | Notes |
|---|---|---|
server_name |
TEXT | PRIMARY KEY |
blue_password |
TEXT | |
red_password |
TEXT | |
maintenance |
BOOLEAN | NOT NULL DEFAULT FALSE |
launched_preset |
TEXT | NULL |
launched_preset_temporary |
BOOLEAN | NOT NULL DEFAULT FALSE |
message_persistence
Defined by: core
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
TEXT | |
embed_name |
TEXT | NOT NULL |
embed |
BIGINT | NOT NULL |
thread |
BIGINT | NULL |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
instances
Defined by: core
| Column | Type | Notes |
|---|---|---|
node |
TEXT | NOT NULL |
instance |
TEXT | NOT NULL |
port |
BIGINT | NOT NULL |
server_name |
TEXT | |
last_seen |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
| PRIMARY KEY(node, instance) | ||
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
audit
Defined by: core
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
node |
TEXT | NOT NULL |
event |
TEXT | NOT NULL |
server_name |
TEXT | |
actor |
TEXT | |
discord_id |
BIGINT | |
ucid |
TEXT | |
time |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
bg_geometry
Defined by: battleground
| Column | Type | Notes |
|---|---|---|
id |
INTEGER | PRIMARY KEY |
type |
TEXT | NOT NULL |
name |
TEXT | |
posmgrs |
TEXT | |
screenshot |
TEXT[] | DEFAULT '{}'::TEXT[] |
side |
TEXT | NOT NULL |
server |
TEXT | NOT NULL |
"position" |
NUMERIC[] | DEFAULT '{}'::NUMERIC[] |
points |
NUMERIC[] | DEFAULT '{}'::NUMERIC[] |
center |
NUMERIC[] | DEFAULT '{}'::NUMERIC[] |
radius |
NUMERIC | DEFAULT 0 |
discordname |
TEXT | NOT NULL |
avatar |
TEXT | NOT NULL |
| FOREIGN KEY (server) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
bg_geometry2
Defined by: battleground2
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
text | NOT NULL |
data |
json | |
"time" |
timestamp | without time zone DEFAULT timezone('utc'::text, now()) |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
bg_missions
Defined by: battleground2
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
text | NOT NULL |
"time" |
timestamp | without time zone NOT NULL DEFAULT timezone('utc'::text, now()) |
data |
json | |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
bg_task
Defined by: battleground2
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
id_mission |
integer | NOT NULL |
server_name |
text | NOT NULL |
"time" |
timestamp | without time zone NOT NULL DEFAULT timezone('utc'::text, now()) |
data |
json | |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
bg_task_user_rltn
Defined by: battleground2
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
id_task |
integer | NOT NULL |
discord_id |
bigint | NOT NULL |
"time" |
timestamp | without time zone NOT NULL DEFAULT timezone('utc'::text, now()) |
| FOREIGN KEY (id_task) REFERENCES bg_task (id) ON DELETE CASCADE |
charity_donations
Defined by: charity
| Column | Type | Notes |
|---|---|---|
campaign_id |
TEXT | NOT NULL |
donation_id |
TEXT | NOT NULL |
amount |
NUMERIC(10, | 2) |
name |
TEXT | |
message |
TEXT | |
created_at |
TIMESTAMP | |
| PRIMARY KEY (campaign_id, donation_id) |
trueskill
Defined by: competitive
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | PRIMARY KEY |
skill_mu |
NUMERIC | NOT NULL |
skill_sigma |
NUMERIC | NOT NULL |
time |
TIMESTAMP | DEFAULT (NOW() AT TIME ZONE 'UTC') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
trueskill_hist
Defined by: competitive
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | |
skill_mu |
NUMERIC | NOT NULL |
skill_sigma |
NUMERIC | NOT NULL |
time |
TIMESTAMP, | PRIMARY KEY (player_ucid, time) |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
credits
Defined by: creditsystem
| Column | Type | Notes |
|---|---|---|
campaign_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
points |
INTEGER | NOT NULL DEFAULT 0 |
| PRIMARY KEY (campaign_id, player_ucid) | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (campaign_id) REFERENCES campaigns (id) ON DELETE CASCADE |
credits_log
Defined by: creditsystem
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
campaign_id |
INTEGER | NOT NULL |
event |
TEXT | NOT NULL |
player_ucid |
TEXT | NOT NULL |
old_points |
INTEGER | NOT NULL |
new_points |
INTEGER | NOT NULL |
remark |
TEXT | |
time |
TIMESTAMP | DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (campaign_id) REFERENCES campaigns (id) ON DELETE CASCADE |
squadron_credits
Defined by: creditsystem
| Column | Type | Notes |
|---|---|---|
campaign_id |
INTEGER | NOT NULL |
squadron_id |
INTEGER | NOT NULL |
points |
INTEGER | NOT NULL DEFAULT 0 |
| PRIMARY KEY (campaign_id, squadron_id) | ||
| FOREIGN KEY (squadron_id) REFERENCES squadrons (id) ON DELETE CASCADE | ||
| FOREIGN KEY (campaign_id) REFERENCES campaigns (id) ON DELETE CASCADE |
squadron_credits_log
Defined by: creditsystem
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
campaign_id |
INTEGER | NOT NULL |
event |
TEXT | NOT NULL |
squadron_id |
INTEGER | NOT NULL |
old_points |
INTEGER | NOT NULL |
new_points |
INTEGER | NOT NULL |
player_ucid |
TEXT | |
remark |
TEXT | |
time |
TIMESTAMP | DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (squadron_id) REFERENCES squadrons (id) ON DELETE CASCADE | ||
| FOREIGN KEY (campaign_id) REFERENCES campaigns (id) ON DELETE CASCADE |
players_badges
Defined by: creditsystem
| Column | Type | Notes |
|---|---|---|
campaign_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
badge_name |
TEXT | NOT NULL |
badge_url |
TEXT | |
time |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') |
| PRIMARY KEY (campaign_id, player_ucid) | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (campaign_id) REFERENCES campaigns (id) ON DELETE CASCADE |
port_traffic
Defined by: firewall
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
node |
TEXT | NOT NULL |
server_name |
TEXT | NOT NULL |
port |
INTEGER | NOT NULL |
protocol |
TEXT | NOT NULL |
bytes_in |
BIGINT | NOT NULL DEFAULT 0 |
bytes_out |
BIGINT | NOT NULL DEFAULT 0 |
packets_in |
BIGINT | NOT NULL DEFAULT 0 |
packets_out |
BIGINT | NOT NULL DEFAULT 0 |
| unique_ips INTEGER NOT NULL DEFAULT 0 | ||
non_player_udp_ips |
INTEGER | NOT NULL DEFAULT 0 |
connections |
INTEGER | NOT NULL DEFAULT 0 |
players |
INTEGER | NOT NULL DEFAULT 0 |
under_attack |
BOOLEAN | NOT NULL DEFAULT FALSE |
time |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
flightplan_plans
Defined by: flightplan
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
player_ucid |
TEXT | NOT NULL |
server_name |
TEXT | |
filed_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
departure |
TEXT | |
destination |
TEXT | |
alternate |
TEXT | |
aircraft_type |
TEXT | |
callsign |
TEXT | |
route |
TEXT | |
remarks |
TEXT | |
status |
TEXT | NOT NULL DEFAULT 'filed' |
etd |
TIMESTAMPTZ | |
eta |
TIMESTAMPTZ | |
cruise_altitude |
INTEGER | |
cruise_speed |
TEXT, | -- Can be knots (e.g., "450") or Mach (e.g., "M0.85") |
waypoints |
JSONB | |
departure_position |
JSONB | |
destination_position |
JSONB | |
alternate_position |
JSONB | |
activated_at |
TIMESTAMP | |
completed_at |
TIMESTAMP | |
stale_at |
TIMESTAMP | |
discord_message_id |
BIGINT | |
coalition |
INTEGER | DEFAULT 0 |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
flightplan_waypoints
Defined by: flightplan
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
name |
TEXT | NOT NULL |
created_by_ucid |
TEXT | |
position_x |
DOUBLE | PRECISION NOT NULL |
position_z |
DOUBLE | PRECISION NOT NULL |
latitude |
DOUBLE | PRECISION |
longitude |
DOUBLE | PRECISION |
altitude |
INTEGER | |
description |
TEXT | |
map_theater |
TEXT | |
is_public |
BOOLEAN | DEFAULT TRUE |
created_at |
TIMESTAMP | DEFAULT (NOW() AT TIME ZONE 'utc') |
| FOREIGN KEY (created_by_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE SET NULL |
flightplan_navigation_fixes
Defined by: flightplan
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
identifier |
TEXT | NOT NULL |
name |
TEXT | |
fix_type |
TEXT | NOT NULL |
latitude |
DOUBLE | PRECISION NOT NULL |
longitude |
DOUBLE | PRECISION NOT NULL |
position_x |
DOUBLE | PRECISION |
position_z |
DOUBLE | PRECISION |
map_theater |
TEXT | NOT NULL |
frequency |
TEXT | |
source |
TEXT | |
| UNIQUE(identifier, map_theater) |
flightplan_markers
Defined by: flightplan
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
TEXT | NOT NULL |
flight_plan_id |
INTEGER | NOT NULL |
marker_id |
INTEGER | NOT NULL |
marker_type |
TEXT | NOT NULL |
created_at |
TIMESTAMP | DEFAULT (NOW() AT TIME ZONE 'utc') |
expires_at |
TIMESTAMP | |
| FOREIGN KEY (flight_plan_id) REFERENCES flightplan_plans (id) ON DELETE CASCADE |
strafe_runs
Defined by: funkman
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
mission_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
unit_type |
TEXT | NOT NULL |
range_name |
TEXT | NOT NULL |
accuracy |
NUMERIC | NOT NULL |
quality |
INTEGER | |
time |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
bomb_runs
Defined by: funkman
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
mission_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
unit_type |
TEXT | NOT NULL |
range_name |
TEXT | NOT NULL |
distance |
NUMERIC | NOT NULL |
quality |
INTEGER | |
time |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
campaigns
Defined by: gamemaster
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
name |
TEXT | NOT NULL |
description |
TEXT | |
image_url |
TEXT | |
start |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
stop |
TIMESTAMP |
campaigns_servers
Defined by: gamemaster
| Column | Type | Notes |
|---|---|---|
campaign_id |
INTEGER | NOT NULL |
server_name |
TEXT | NOT NULL |
| PRIMARY KEY (campaign_id, server_name) | ||
| FOREIGN KEY (campaign_id) REFERENCES campaigns (id) ON DELETE CASCADE | ||
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
coalitions
Defined by: gamemaster
| Column | Type | Notes |
|---|---|---|
server_name |
TEXT | NOT NULL |
player_ucid |
TEXT | NOT NULL |
coalition |
TEXT | |
coalition_join |
TIMESTAMP | |
coalition_leave |
TIMESTAMP | |
| PRIMARY KEY(server_name, player_ucid) | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
messages
Defined by: gamemaster
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
sender |
TEXT | NOT NULL |
player_ucid |
TEXT | NOT NULL |
message |
TEXT | NOT NULL |
ack |
BOOLEAN | NOT NULL DEFAULT TRUE |
time |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
traps
Defined by: greenieboard
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
mission_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
unit_type |
TEXT | NOT NULL |
tgroove |
DECIMAL | |
landingdist |
INTEGER | |
wind |
INTEGER | |
grade |
TEXT | NOT NULL |
comment |
TEXT | NOT NULL |
place |
TEXT | NOT NULL |
trapcase |
INTEGER | NOT NULL |
wire |
INTEGER | |
night |
BOOLEAN | NOT NULL |
points |
DECIMAL | |
trapsheet |
BYTEA | |
trapdata |
JSONB | |
time |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
logbook_pilots
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | PRIMARY KEY |
service |
TEXT | |
rank |
TEXT | |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
logbook_squadron_metadata
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
squadron_id |
INTEGER | PRIMARY KEY REFERENCES squadrons(id) ON DELETE CASCADE |
abbreviation |
TEXT | |
service |
TEXT |
logbook_qualifications
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
name |
TEXT | NOT NULL |
description |
TEXT | |
aircraft_type |
TEXT | |
requirements |
JSONB | |
valid_days |
INTEGER |
logbook_pilot_qualifications
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | NOT NULL |
qualification_id |
INTEGER | NOT NULL |
granted_by |
TEXT | |
granted_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
expires_at |
TIMESTAMP | |
| PRIMARY KEY (player_ucid, qualification_id) | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (qualification_id) REFERENCES logbook_qualifications (id) ON DELETE CASCADE | ||
| FOREIGN KEY (granted_by) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE SET NULL |
logbook_awards
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
name |
TEXT | NOT NULL |
description |
TEXT | |
image_url |
TEXT | |
ribbon_colors |
JSONB | |
ribbon_image |
BYTEA | |
auto_grant |
BOOLEAN | NOT NULL DEFAULT FALSE |
requirements |
JSONB |
logbook_pilot_awards
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | NOT NULL |
award_id |
INTEGER | NOT NULL |
granted_by |
TEXT | |
granted_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
citation |
TEXT | |
| PRIMARY KEY (player_ucid, award_id, granted_at) | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (award_id) REFERENCES logbook_awards (id) ON DELETE CASCADE | ||
| FOREIGN KEY (granted_by) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE SET NULL |
logbook_historical_hours
Defined by: logbook
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | NOT NULL |
imported_from |
TEXT | |
total_hours |
DECIMAL | NOT NULL DEFAULT 0 |
aircraft_hours |
JSONB | |
imported_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
| PRIMARY KEY (player_ucid, imported_from) | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
logistics_tasks
Defined by: logistics
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
TEXT | NOT NULL |
created_by_ucid |
TEXT, | -- NULL for admin-created tasks |
status |
TEXT | NOT NULL DEFAULT 'pending', -- pending, approved, assigned, in_progress, completed, failed, cancelled |
priority |
TEXT | NOT NULL DEFAULT 'normal', -- low, normal, high, urgent |
cargo_type |
TEXT | NOT NULL, -- Human-readable cargo description |
cargo_items |
JSONB, | -- Structured cargo data: [{item: "...", qty: N}, ...] |
source_name |
TEXT | NOT NULL, -- Airbase/FARP/carrier name |
source_position |
JSONB, | -- {x, y, z} coordinates |
destination_name |
TEXT | NOT NULL, -- Airbase/FARP/carrier name |
destination_position |
JSONB, | -- {x, y, z} coordinates |
waypoints |
JSONB, | -- Optional VIA points: [{name, x, y, z}, ...] |
coalition |
INTEGER | NOT NULL, -- 1=RED, 2=BLUE |
deadline |
TIMESTAMP, | -- Need-by date/time |
assigned_ucid |
TEXT, | -- Player who accepted the task |
assigned_at |
TIMESTAMP | |
completed_at |
TIMESTAMP | |
notes |
TEXT | |
remarks |
TEXT, | -- Additional pilot instructions (from creator) |
created_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
updated_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
approved_by |
TEXT, | -- Discord user ID who approved |
approved_at |
TIMESTAMP | |
discord_message_id |
BIGINT, | -- Discord message ID for status board posts |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (created_by_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE SET NULL | ||
| FOREIGN KEY (assigned_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE SET NULL |
logistics_tasks_history
Defined by: logistics
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
task_id |
INTEGER | NOT NULL |
event |
TEXT | NOT NULL, -- created, approved, denied, assigned, started, completed, failed, cancelled, abandoned |
actor_ucid |
TEXT, | -- Player who performed the action (in-game) |
actor_discord_id |
BIGINT, | -- Discord user (for admin actions) |
details |
JSONB, | -- Additional event-specific data |
created_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
| FOREIGN KEY (task_id) REFERENCES logistics_tasks (id) ON DELETE CASCADE |
logistics_markers
Defined by: logistics
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
TEXT | NOT NULL |
task_id |
INTEGER | NOT NULL |
marker_id |
INTEGER | NOT NULL, -- DCS marker ID |
marker_type |
TEXT | NOT NULL, -- route_line, source_marker, dest_marker, waypoint_marker |
created_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (task_id) REFERENCES logistics_tasks (id) ON DELETE CASCADE |
logbook_logistics_completions
Defined by: logistics
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
player_ucid |
TEXT | NOT NULL |
task_id |
INTEGER | NOT NULL |
cargo_type |
TEXT | NOT NULL |
source_name |
TEXT | NOT NULL |
destination_name |
TEXT | NOT NULL |
completed_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (task_id) REFERENCES logistics_tasks (id) ON DELETE CASCADE |
players
Defined by: mission
| Column | Type | Notes |
|---|---|---|
ucid |
TEXT | PRIMARY KEY |
discord_id |
BIGINT | NOT NULL DEFAULT -1 |
name |
TEXT | |
manual |
BOOLEAN | NOT NULL DEFAULT FALSE |
first_seen |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
last_seen |
TIMESTAMP | |
vip |
BOOLEAN | NOT NULL DEFAULT FALSE |
muted |
BOOLEAN | NOT NULL DEFAULT FALSE |
bans
Defined by: mission
| Column | Type | Notes |
|---|---|---|
ucid |
TEXT | NOT NULL |
banned_by |
TEXT | NOT NULL |
reason |
TEXT | |
banned_at |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
banned_until |
TIMESTAMP | NOT NULL DEFAULT TO_DATE('99991231','YYYYMMDD') |
server_name |
TEXT |
bans_hist
Defined by: mission
| Column | Type | Notes |
|---|---|---|
ucid |
TEXT | NOT NULL |
banned_by |
TEXT | NOT NULL |
reason |
TEXT | |
banned_at |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
banned_until |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
auto_unban |
BOOLEAN | DEFAULT FALSE |
server_name |
TEXT |
missions
Defined by: mission
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
server_name |
TEXT | NOT NULL |
mission_name |
TEXT | NOT NULL |
mission_theatre |
TEXT | NOT NULL |
mission_start |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
mission_end |
TIMESTAMP | |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
watchlist
Defined by: mission
| Column | Type | Notes |
|---|---|---|
player_ucid |
TEXT | PRIMARY KEY |
reason |
TEXT | |
created_by |
TEXT | NOT NULL |
created_at |
TIMESTAMP | DEFAULT (NOW() AT TIME ZONE 'utc') |
missionstats
Defined by: missionstats
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
mission_id |
INTEGER | NOT NULL |
event |
TEXT | NOT NULL |
init_id |
TEXT | |
init_side |
TEXT | |
init_type |
TEXT | |
init_cat |
TEXT | |
target_id |
TEXT | |
target_side |
TEXT | |
target_type |
TEXT | |
target_cat |
TEXT | |
weapon_id |
INTEGER | |
weapon |
TEXT | |
place |
TEXT | |
comment |
TEXT | |
time |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
| FOREIGN KEY (init_id) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (target_id) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (mission_id) REFERENCES missions (id) ON DELETE CASCADE |
refuelingstats
Defined by: missionstats
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
mission_id |
INTEGER | NOT NULL |
init_id |
TEXT | NOT NULL |
init_type |
TEXT | NOT NULL |
tanker |
TEXT | NOT NULL |
fuel_taken |
INTEGER | |
transfer_complete |
BOOLEAN | |
transfer_time |
DECIMAL | |
time |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
mm_packages
Defined by: modmanager
| Column | Type | Notes |
|---|---|---|
node |
TEXT | |
server_name |
TEXT | |
package_name |
TEXT | NOT NULL |
version |
TEXT | NOT NULL |
folder |
TEXT | NOT NULL |
time |
TIMESTAMP | DEFAULT NOW() |
| UNIQUE (node, package_name) | ||
| UNIQUE (server_name, package_name) | ||
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
serverstats
Defined by: monitoring
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
node |
TEXT | NOT NULL |
server_name |
TEXT | NOT NULL |
mission_id |
INTEGER | NOT NULL |
users |
INTEGER | NOT NULL |
status |
TEXT | NOT NULL |
mission_time |
INTEGER | |
cpu |
NUMERIC(7,2) | NOT NULL |
mem_total |
NUMERIC | NOT NULL |
mem_ram |
NUMERIC | NOT NULL |
read_bytes |
NUMERIC | NOT NULL |
write_bytes |
NUMERIC | NOT NULL |
bytes_sent |
NUMERIC | NOT NULL |
bytes_recv |
NUMERIC | NOT NULL |
fps |
NUMERIC(7,2) | NOT NULL |
ping |
NUMERIC | NULL |
time |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE |
pu_events
Defined by: punishment
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
init_id |
TEXT | NOT NULL |
target_id |
TEXT | |
server_name |
TEXT | NOT NULL |
event |
TEXT | NOT NULL |
points |
DECIMAL | NOT NULL |
time |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
decay_run |
INTEGER | NOT NULL DEFAULT -1 |
| FOREIGN KEY (server_name) REFERENCES servers (server_name) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (init_id) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE | ||
| FOREIGN KEY (target_id) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
statistics
Defined by: userstats
| Column | Type | Notes |
|---|---|---|
mission_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
slot |
TEXT | NOT NULL |
tail_no |
TEXT | NULL |
side |
INTEGER | DEFAULT 0 |
kills |
INTEGER | DEFAULT 0 |
pvp |
INTEGER | DEFAULT 0 |
deaths |
INTEGER | DEFAULT 0 |
ejections |
INTEGER | DEFAULT 0 |
crashes |
INTEGER | DEFAULT 0 |
teamkills |
INTEGER | DEFAULT 0 |
kills_planes |
INTEGER | DEFAULT 0 |
kills_helicopters |
INTEGER | DEFAULT 0 |
kills_ships |
INTEGER | DEFAULT 0 |
kills_sams |
INTEGER | DEFAULT 0 |
kills_ground |
INTEGER | DEFAULT 0 |
deaths_pvp |
INTEGER | DEFAULT 0 |
deaths_planes |
INTEGER | DEFAULT 0 |
deaths_helicopters |
INTEGER | DEFAULT 0 |
deaths_ships |
INTEGER | DEFAULT 0 |
deaths_sams |
INTEGER | DEFAULT 0 |
deaths_ground |
INTEGER | DEFAULT 0 |
takeoffs |
INTEGER | DEFAULT 0 |
landings |
INTEGER | DEFAULT 0 |
hop_on |
TIMESTAMP | NOT NULL DEFAULT (now() AT TIME ZONE 'utc') |
hop_off |
TIMESTAMP | |
| PRIMARY KEY (mission_id, player_ucid, slot, hop_on) | ||
| FOREIGN KEY (mission_id) REFERENCES missions (id) ON DELETE CASCADE | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |
squadrons
Defined by: userstats
| Column | Type | Notes |
|---|---|---|
id |
SERIAL | PRIMARY KEY |
name |
TEXT | NOT NULL |
description |
TEXT | NULL |
role |
BIGINT | NULL |
co_ucid |
TEXT | NULL REFERENCES players(ucid) ON UPDATE CASCADE ON DELETE SET NULL |
xo_ucid |
TEXT | NULL REFERENCES players(ucid) ON UPDATE CASCADE ON DELETE SET NULL |
image_url |
TEXT | NULL |
channel |
BIGINT | NULL |
locked |
BOOLEAN | NOT NULL DEFAULT FALSE |
squadron_members
Defined by: userstats
| Column | Type | Notes |
|---|---|---|
squadron_id |
INTEGER | NOT NULL |
player_ucid |
TEXT | NOT NULL |
rank |
TEXT | NULL |
position |
TEXT | NULL |
joined_at |
TIMESTAMP | NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') |
| PRIMARY KEY (squadron_id, player_ucid) | ||
| FOREIGN KEY (squadron_id) REFERENCES squadrons (id) ON DELETE CASCADE | ||
| FOREIGN KEY (player_ucid) REFERENCES players (ucid) ON UPDATE CASCADE ON DELETE CASCADE |