]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - tables/player_weapon_stats.tab
Add plural to alter for map_game_types.
[xonotic/xonstatdb.git] / tables / player_weapon_stats.tab
1 CREATE TABLE xonstat.player_weapon_stats
2 (
3   player_weapon_stats_id bigserial 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,
8   max integer NOT NULL,
9   frags integer NOT NULL,
10   create_dt timestamp without 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)
22 )
23 WITH (
24   OIDS=FALSE
25 );
26 ALTER TABLE xonstat.player_weapon_stats OWNER TO xonstat;