From: Ant Zucaro Date: Fri, 20 May 2011 02:02:48 +0000 (-0400) Subject: Remove nick from weapon stats and replace it w/ pgstat id. Remove corresponding const... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6fadb473da829b2a02075418f51c831b27a1acd5;p=xonotic%2Fxonstatdb.git Remove nick from weapon stats and replace it w/ pgstat id. Remove corresponding constraint and replace it with an FK to player_game_stats. --- diff --git a/tables/player_weapon_stats.tab b/tables/player_weapon_stats.tab index 888b547..2968a89 100644 --- a/tables/player_weapon_stats.tab +++ b/tables/player_weapon_stats.tab @@ -3,7 +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, - nick character varying(64), + 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, @@ -21,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, nick) + 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