From: Ant Zucaro Date: Mon, 16 Jun 2014 01:16:30 +0000 (-0400) Subject: Add support for the new player_groups table. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a0f6920c9bb09316d5de47b4dcd5057c82715352;p=xonotic%2Fxonstat.git Add support for the new player_groups table. --- diff --git a/xonstat/models.py b/xonstat/models.py index 6cf94b8..b496104 100644 --- a/xonstat/models.py +++ b/xonstat/models.py @@ -322,6 +322,15 @@ class PlayerGameAnticheat(object): return "" % (self.key, self.value) +class PlayerGroups(object): + def __init__(self, player_id=None, group_name=None): + self.player_id = player_id + self.group_name = group_name + + def __repr__(self): + return "" % (self.player_id, self.group_name) + + def initialize_db(engine=None): DBSession.configure(bind=engine) Base.metadata.bind = engine @@ -349,6 +358,7 @@ def initialize_db(engine=None): summary_stats_table = MetaData.tables['summary_stats'] team_game_stats_table = MetaData.tables['team_game_stats'] player_game_anticheats_table = MetaData.tables['player_game_anticheats'] + player_groups_table = MetaData.tables['player_groups'] # now map the tables and the objects together mapper(PlayerAchievement, achievements_table) @@ -369,3 +379,4 @@ def initialize_db(engine=None): mapper(SummaryStat, summary_stats_table) mapper(TeamGameStat, team_game_stats_table) mapper(PlayerGameAnticheat, player_game_anticheats_table) + mapper(PlayerGroups, player_groups_table)