From b64528f58046bb08d64ba1cab8b367e1aaa44433 Mon Sep 17 00:00:00 2001
From: icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>
Date: Thu, 13 Mar 2008 11:20:31 +0000
Subject: Marcus Povey <marcus@dushka.co.uk> * Made subtype a unique key

git-svn-id: https://code.elgg.org/elgg/trunk@192 36083f99-b078-4883-b0ff-0f9b5a30f544
---
 engine/schema/mysql.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'engine/schema/mysql.sql')

diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 9caa2a81e..fb979d3a9 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -39,7 +39,8 @@ CREATE TABLE `prefix_entity_subtypes` (
 	`subtype` varchar(50) NOT NULL,
 	
 	PRIMARY KEY (`id`),
-	UNIQUE KEY (`guid`)
+	UNIQUE KEY (`guid`),
+	UNIQUE KEY (`subtype`)
 ) ENGINE=MyISAM;
 
 -- Describe relationships between entities, can describe friendships but also site membership, depending on context
-- 
cgit v1.2.3

