From fafa17160223deaab78da1203657bbeb1b218ad7 Mon Sep 17 00:00:00 2001
From: icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>
Date: Tue, 25 Mar 2008 18:02:57 +0000
Subject: Marcus Povey <marcus@dushka.co.uk> * Subtype subclass instantiation

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

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

diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 1b12bfd72..f087cde93 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -34,10 +34,14 @@ CREATE TABLE `prefix_entities` (
 CREATE TABLE `prefix_entity_subtypes` (
 	`id` int(11) NOT NULL auto_increment,
 	
+	`type` enum ('object', 'user', 'collection', 'site') NOT NULL,
 	`subtype` varchar(50) NOT NULL,
 	
+	class varchar(50) NOT NULL default '',
+	
 	PRIMARY KEY (`id`),
-	UNIQUE KEY (`subtype`)
+	UNIQUE KEY (`class`),
+	UNIQUE KEY (`type`, `subtype`)
 ) ENGINE=MyISAM;
 
 -- Describe relationships between entities, can describe friendships but also site membership, depending on context
-- 
cgit v1.2.3

