Skip to content

Commit

Permalink
Make healing NULLable
Browse files Browse the repository at this point in the history
This stat is basically useless [1], and some sources (e.g. clone_logs)
don't even record it. Make it nullable, and handle sources of logs which
don't set it.

[1] a2bbd88 ("Move away from player_stats.healing")

Signed-off-by: Sean Anderson <[email protected]>
  • Loading branch information
Forty-Bot committed Aug 27, 2021
1 parent c00bc3f commit 997e770
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions import.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def import_log(cctx, c, logid, log):
if not info.get('hasIntel'):
player['ic'] = None
player['suicides'] = player.get('suicides')
player['heal'] = player.get('heal')

c.execute("INSERT INTO name (name) VALUES (%(name)s) ON CONFLICT DO NOTHING;", player)
c.execute("INSERT INTO player (steamid64) VALUES (%(steamid)s) ON CONFLICT DO NOTHING;",
Expand Down
2 changes: 1 addition & 1 deletion schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ CREATE TABLE IF NOT EXISTS player_stats_extra (
headshots INT, -- headshot kills
headshots_hit INT, -- headshot non-kills
sentries INT, -- sentries built
healing INT NOT NULL,
healing INT,
cpc INT, -- Capture Point Captures
ic INT, -- Intel Captures
PRIMARY KEY (steamid64, logid),
Expand Down

0 comments on commit 997e770

Please sign in to comment.