]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blobdiff - tables/player_weapon_stats.tab
Remove nick from weapon stats and replace it w/ pgstat id. Remove corresponding const...
[xonotic/xonstatdb.git] / tables / player_weapon_stats.tab
index 05474f799196497d9665073353f95d67a242432e..2968a8982c0f5ceb5231a6aa5eb2f1db8f7eb8ce 100644 (file)
@@ -3,6 +3,7 @@ CREATE TABLE xonstat.player_weapon_stats
   player_weapon_stats_id bigserial NOT NULL,
   player_id integer NOT NULL,
   game_id bigint NOT NULL,
+  player_game_stat_id bigint NOT NULL,
   weapon_cd character varying(15) NOT NULL,
   actual integer NOT NULL default 0,
   max integer NOT NULL default 0,
@@ -20,7 +21,9 @@ CREATE TABLE xonstat.player_weapon_stats
   CONSTRAINT player_weapon_stats_fk003 FOREIGN KEY (weapon_cd)
       REFERENCES xonstat.cd_weapon (weapon_cd) MATCH SIMPLE
       ON UPDATE NO ACTION ON DELETE NO ACTION,
-  CONSTRAINT player_weapon_stats_uk001 UNIQUE (player_id, game_id, weapon_cd)
+  CONSTRAINT player_weapon_stats_fk004 FOREIGN KEY (player_game_stat_id)
+      REFERENCES xonstat.player_game_stats (player_game_stat_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
 )
 WITH (
   OIDS=FALSE