From: Ant Zucaro Date: Sun, 30 Apr 2017 12:37:09 +0000 (-0400) Subject: Add elo categories to several tables. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a49b111e04da2f30dc9c5713b3724b3530c4893c;p=xonotic%2Fxonstatdb.git Add elo categories to several tables. --- diff --git a/tables/player_elos.tab b/tables/player_elos.tab index 104c8c1..24d8d90 100755 --- a/tables/player_elos.tab +++ b/tables/player_elos.tab @@ -2,12 +2,13 @@ CREATE TABLE xonstat.player_elos ( player_id integer NOT NULL, game_type_cd character varying(10) NOT NULL, + category character varying(10) NOT NULL default 'general', games integer NOT NULL default 0, elo numeric NOT NULL, active_ind boolean NOT NULL default true, create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), update_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), - CONSTRAINT player_elos_pk PRIMARY KEY (player_id, game_type_cd), + CONSTRAINT player_elos_pk PRIMARY KEY (player_id, game_type_cd, category), CONSTRAINT player_elos_fk01 FOREIGN KEY (player_id) REFERENCES xonstat.players (player_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, diff --git a/tables/player_ranks.tab b/tables/player_ranks.tab index 254b53a..a40be2b 100755 --- a/tables/player_ranks.tab +++ b/tables/player_ranks.tab @@ -3,6 +3,7 @@ CREATE TABLE player_ranks player_id integer NOT NULL, nick character varying(128), game_type_cd character varying(10) NOT NULL, + category character varying(10) NOT NULL default 'general', elo numeric NOT NULL, rank integer NOT NULL, create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), diff --git a/tables/player_ranks_history.tab b/tables/player_ranks_history.tab index 970806f..ec6673a 100755 --- a/tables/player_ranks_history.tab +++ b/tables/player_ranks_history.tab @@ -3,6 +3,7 @@ CREATE TABLE player_ranks_history player_id integer NOT NULL, nick character varying(128), game_type_cd character varying(10) NOT NULL, + category character varying(10) NOT NULL default 'general', elo numeric NOT NULL, rank integer NOT NULL, create_dt timestamp without time zone diff --git a/tables/servers.tab b/tables/servers.tab index ad52bba..cf37cd7 100755 --- a/tables/servers.tab +++ b/tables/servers.tab @@ -11,6 +11,7 @@ CREATE TABLE xonstat.servers pure_ind boolean NOT NULL DEFAULT true, impure_cvars integer NULL, elo_ind boolean NOT NULL DEFAULT true, + categories character varying(10)[], active_ind boolean NOT NULL DEFAULT true, create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), CONSTRAINT servers_pk PRIMARY KEY (server_id)