]> git.xonotic.org Git - xonotic/xonstatdb.git/commitdiff
Add elo categories to several tables.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 30 Apr 2017 12:37:09 +0000 (08:37 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 30 Apr 2017 12:37:09 +0000 (08:37 -0400)
tables/player_elos.tab
tables/player_ranks.tab
tables/player_ranks_history.tab
tables/servers.tab

index 104c8c1e53f0fba3639ffdc3a2846c0815318e29..24d8d90be226c89e2ada7a56260bc20bd6b46643 100755 (executable)
@@ -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,
index 254b53ada3fabb5913bc222d0e9288f44d2b5c80..a40be2b621b7c46e1bf0393e047d8fedf9011cbe 100755 (executable)
@@ -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'),
index 970806f1315dda73152c34ad6829ef8ab3c76432..ec6673a1225487bfc5eff99bc7c0da676d51502f 100755 (executable)
@@ -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
index ad52bbad105c9f9c97c65c894cf74f761b4e365e..cf37cd73e02a872528d86ae930a56c2124abdab6 100755 (executable)
@@ -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)