From: Ant Zucaro Date: Sun, 22 Jan 2012 03:49:43 +0000 (-0500) Subject: Add ranks table for batch purposes. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1b7c1847e938ba4afa3d682f4a2b318bcd8832c7;p=xonotic%2Fxonstatdb.git Add ranks table for batch purposes. --- diff --git a/tables/player_ranks.tab b/tables/player_ranks.tab new file mode 100644 index 0000000..6bcd2df --- /dev/null +++ b/tables/player_ranks.tab @@ -0,0 +1,18 @@ +CREATE TABLE xonstat.player_ranks +( + player_id integer NOT NULL, + game_type_cd character varying(10) NOT NULL, + elo numeric NOT NULL, + create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + CONSTRAINT player_ranks_pk PRIMARY KEY (player_id, game_type_cd), + CONSTRAINT player_ranks_fk01 FOREIGN KEY (player_id) + REFERENCES xonstat.players (player_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT player_ranks_fk02 FOREIGN KEY (game_type_cd) + REFERENCES xonstat.cd_game_type (game_type_cd) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +) +WITH ( + OIDS=FALSE +); +ALTER TABLE xonstat.player_ranks OWNER TO xonstat;