Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
diff -u -N -r14244 -r14437
--- branches/5.2.x/core/install/install_schema.sql	(.../install_schema.sql)	(revision 14244)
+++ branches/5.2.x/core/install/install_schema.sql	(.../install_schema.sql)	(revision 14437)
@@ -265,6 +265,8 @@
   MinPwResetDelay int(11) NOT NULL DEFAULT '1800',
   AdminLanguage int(11) DEFAULT NULL,
   DisplayToPublic text,
+  UserType tinyint(4) NOT NULL,
+  PrimaryGroupId int(11) DEFAULT NULL,
   PRIMARY KEY (PortalUserId),
   UNIQUE KEY ResourceId (ResourceId),
   UNIQUE KEY Login (Login),
@@ -273,7 +275,8 @@
   KEY Modified (Modified),
   KEY dob (dob),
   KEY IsBanned (IsBanned),
-  KEY AdminLanguage (AdminLanguage)
+  KEY AdminLanguage (AdminLanguage),
+  KEY UserType (UserType)
 );
 
 CREATE TABLE PortalUserCustomData (
@@ -328,14 +331,12 @@
 );
 
 CREATE TABLE UserGroup (
-  PortalUserId int(11) NOT NULL default '0',
-  GroupId int(11) NOT NULL default '0',
-  MembershipExpires int(10) unsigned default NULL,
-  PrimaryGroup tinyint(4) NOT NULL default '1',
-  ExpirationReminderSent tinyint(4) NOT NULL default '0',
-  PRIMARY KEY  (PortalUserId,GroupId),
+  PortalUserId int(11) NOT NULL DEFAULT '0',
+  GroupId int(11) NOT NULL DEFAULT '0',
+  MembershipExpires int(10) unsigned DEFAULT NULL,
+  ExpirationReminderSent tinyint(4) NOT NULL DEFAULT '0',
+  PRIMARY KEY (PortalUserId,GroupId),
   KEY GroupId (GroupId),
-  KEY PrimaryGroup (PrimaryGroup),
   KEY MembershipExpires (MembershipExpires),
   KEY ExpirationReminderSent (ExpirationReminderSent)
 );
