]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - tables/player_ranks.tab
6bcd2df2e93d60042d73a86c8596125606e03e6f
[xonotic/xonstatdb.git] / tables / player_ranks.tab
1 CREATE TABLE xonstat.player_ranks
2 (
3   player_id integer NOT NULL,
4   game_type_cd character varying(10) NOT NULL,
5   elo numeric NOT NULL,
6   create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
7   CONSTRAINT player_ranks_pk PRIMARY KEY (player_id, game_type_cd),
8   CONSTRAINT player_ranks_fk01 FOREIGN KEY (player_id)
9       REFERENCES xonstat.players (player_id) MATCH SIMPLE
10       ON UPDATE NO ACTION ON DELETE NO ACTION,
11   CONSTRAINT player_ranks_fk02 FOREIGN KEY (game_type_cd)
12       REFERENCES xonstat.cd_game_type (game_type_cd) MATCH SIMPLE
13       ON UPDATE NO ACTION ON DELETE NO ACTION
14 )
15 WITH (
16   OIDS=FALSE
17 );
18 ALTER TABLE xonstat.player_ranks OWNER TO xonstat;