From: Ant Zucaro Date: Mon, 5 Dec 2011 17:15:31 +0000 (-0500) Subject: Add a unique constraint on server_id/match_id. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d0ad8051bb08e1460be7cfd310f2fb9342623199;p=xonotic%2Fxonstatdb.git Add a unique constraint on server_id/match_id. --- diff --git a/tables/games.tab b/tables/games.tab old mode 100644 new mode 100755 index e26ba1d..a9a5e5a --- a/tables/games.tab +++ b/tables/games.tab @@ -18,7 +18,8 @@ CREATE TABLE xonstat.games ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT games_fk003 FOREIGN KEY (map_id) REFERENCES xonstat.maps (map_id) MATCH SIMPLE - ON UPDATE NO ACTION ON DELETE NO ACTION + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT games_uk001 UNIQUE KEY (server_id, match_id) ) WITH ( OIDS=FALSE