]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - tables/player_game_stats.tab
Change datatypes from integer to serial where I forgot.
[xonotic/xonstatdb.git] / tables / player_game_stats.tab
1 CREATE TABLE xonstat.player_game_stats
2 (
3   player_game_stat_id bigserial NOT NULL,
4   player_id integer NOT NULL,
5   game_id bigint NOT NULL,
6   stat_type character varying(1),
7   nick character varying(64),
8   team integer,
9   kills integer,
10   deaths integer,
11   suicides integer,
12   score integer,
13   "time" interval,
14   held interval,
15   captures integer,
16   pickups integer,
17   drops integer,
18   "returns" integer,
19   collects integer,
20   destroys integer,
21   destroys_holding_key integer,
22   pushes integer,
23   pushed integer,
24   carrier_frags integer,
25   create_dt timestamp with time zone NOT NULL,
26   CONSTRAINT player_game_stats_pk PRIMARY KEY (player_game_stat_id),
27   CONSTRAINT player_game_stats_fk001 FOREIGN KEY (player_id)
28       REFERENCES xonstat.players (player_id) MATCH SIMPLE
29       ON UPDATE NO ACTION ON DELETE NO ACTION,
30   CONSTRAINT player_game_stats_fk002 FOREIGN KEY (game_id)
31       REFERENCES xonstat.games (game_id) MATCH SIMPLE
32       ON UPDATE NO ACTION ON DELETE NO ACTION,
33   CONSTRAINT player_game_stats_uk001 UNIQUE (player_id, game_id, stat_type)
34 )
35 WITH (
36   OIDS=FALSE
37 );
38 ALTER TABLE xonstat.player_game_stats OWNER TO xonstat;