From: Ant Zucaro Date: Mon, 16 May 2011 03:10:45 +0000 (-0400) Subject: Add nick to player_weapon_stats to give anonymous players uniqueness (they always... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7359c5ee68aa059f2acc14b77a88a6aa32579986;p=xonotic%2Fxonstatdb.git Add nick to player_weapon_stats to give anonymous players uniqueness (they always have player_id of 2). --- diff --git a/tables/player_weapon_stats.tab b/tables/player_weapon_stats.tab index 05474f7..888b547 100644 --- a/tables/player_weapon_stats.tab +++ b/tables/player_weapon_stats.tab @@ -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, + nick character varying(64), weapon_cd character varying(15) NOT NULL, actual integer NOT NULL default 0, max integer NOT NULL default 0, @@ -20,7 +21,7 @@ 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_uk001 UNIQUE (player_id, game_id, weapon_cd, nick) ) WITH ( OIDS=FALSE