1 CREATE TABLE xonstat.player_weapon_stats
3 player_weapon_stats_id serial NOT NULL,
4 player_id integer NOT NULL,
5 game_id bigint NOT NULL,
6 weapon_cd character varying(3) NOT NULL,
7 actual integer NOT NULL,
9 frags integer NOT NULL,
10 create_dt timestamp with time zone NOT NULL DEFAULT now(),
11 CONSTRAINT player_weapon_stats_pk PRIMARY KEY (player_weapon_stats_id),
12 CONSTRAINT player_weapon_stats_fk001 FOREIGN KEY (player_id)
13 REFERENCES xonstat.players (player_id) MATCH SIMPLE
14 ON UPDATE NO ACTION ON DELETE NO ACTION,
15 CONSTRAINT player_weapon_stats_fk002 FOREIGN KEY (game_id)
16 REFERENCES xonstat.games (game_id) MATCH SIMPLE
17 ON UPDATE NO ACTION ON DELETE NO ACTION,
18 CONSTRAINT player_weapon_stats_fk003 FOREIGN KEY (weapon_cd)
19 REFERENCES xonstat.cd_weapon (weapon_cd) MATCH SIMPLE
20 ON UPDATE NO ACTION ON DELETE NO ACTION,
21 CONSTRAINT player_weapon_stats_uk001 UNIQUE (player_id, game_id, weapon_cd)
26 ALTER TABLE xonstat.player_weapon_stats OWNER TO xonstat;