]> de.git.xonotic.org Git - xonotic/xonstatdb.git/commitdiff
Add a unique constraint on server_id/match_id.
authorAnt Zucaro <azucaro@gmail.com>
Mon, 5 Dec 2011 17:15:31 +0000 (12:15 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 5 Dec 2011 17:15:31 +0000 (12:15 -0500)
tables/games.tab [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index e26ba1d..a9a5e5a
@@ -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