diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php
index 3dc555c86..8f879c032 100644
--- a/src/Database/DBStructure.php
+++ b/src/Database/DBStructure.php
@@ -996,7 +996,8 @@ class DBStructure {
 				"indexes" => array(
 						"PRIMARY" => array("id"),
 						"contactid" => array("contact-id"),
-						"gid_contactid" => array("gid", "contact-id"),
+						"gid" => array("gid"),
+						"gid_contactid" => array("UNIQUE", "gid", "contact-id"),
 						)
 				);
 		$database["gserver"] = array(