Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
diff -u -N -r13840 -r14092
--- branches/5.2.x/core/install/install_schema.sql	(.../install_schema.sql)	(revision 13840)
+++ branches/5.2.x/core/install/install_schema.sql	(.../install_schema.sql)	(revision 14092)
@@ -115,7 +115,7 @@
   MessageType varchar(4) NOT NULL DEFAULT 'text',
   Enabled int(11) NOT NULL DEFAULT '1',
   FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
-  Module varchar(40) NOT NULL DEFAULT '',
+  Module varchar(40) NOT NULL DEFAULT 'Core',
   Description text,
   `Type` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (EventId),
@@ -144,13 +144,13 @@
   Priority int(11) NOT NULL DEFAULT '0',
   IconURL varchar(255) DEFAULT NULL,
   IconDisabledURL varchar(255) DEFAULT NULL,
-  DateFormat varchar(50) NOT NULL DEFAULT '',
-  TimeFormat varchar(50) NOT NULL DEFAULT '',
+  DateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
+  TimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
   InputDateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
   InputTimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
-  DecimalPoint varchar(10) NOT NULL DEFAULT '',
+  DecimalPoint varchar(10) NOT NULL DEFAULT '.',
   ThousandSep varchar(10) NOT NULL DEFAULT '',
-  `Charset` varchar(20) NOT NULL DEFAULT '',
+  `Charset` varchar(20) NOT NULL DEFAULT 'utf-8',
   UnitSystem tinyint(4) NOT NULL DEFAULT '1',
   FilenameReplacements text,
   Locale varchar(10) NOT NULL DEFAULT 'en-US',
@@ -244,26 +244,27 @@
   Company varchar(255) NOT NULL DEFAULT '',
   Email varchar(255) NOT NULL DEFAULT '',
   CreatedOn int(11) DEFAULT NULL,
-  Phone varchar(20) DEFAULT NULL,
+  Phone varchar(255) NOT NULL DEFAULT '',
   Fax varchar(255) NOT NULL DEFAULT '',
-  Street varchar(255) DEFAULT NULL,
+  Street varchar(255) NOT NULL DEFAULT '',
   Street2 varchar(255) NOT NULL DEFAULT '',
-  City varchar(20) DEFAULT NULL,
+  City varchar(255) NOT NULL DEFAULT '',
   State varchar(20) NOT NULL DEFAULT '',
-  Zip varchar(20) DEFAULT NULL,
+  Zip varchar(20) NOT NULL DEFAULT '',
   Country varchar(20) NOT NULL DEFAULT '',
   ResourceId int(11) NOT NULL DEFAULT '0',
   `Status` tinyint(4) NOT NULL DEFAULT '1',
   Modified int(11) DEFAULT NULL,
   dob int(11) DEFAULT NULL,
   tz int(11) DEFAULT NULL,
-  ip varchar(20) DEFAULT NULL,
+  ip varchar(20) NOT NULL DEFAULT '',
   IsBanned tinyint(1) NOT NULL DEFAULT '0',
   PassResetTime int(11) unsigned DEFAULT NULL,
   PwResetConfirm varchar(255) DEFAULT NULL,
   PwRequestTime int(11) unsigned DEFAULT NULL,
   MinPwResetDelay int(11) NOT NULL DEFAULT '1800',
   AdminLanguage int(11) DEFAULT NULL,
+  DisplayToPublic text,
   PRIMARY KEY (PortalUserId),
   UNIQUE KEY ResourceId (ResourceId),
   UNIQUE KEY Login (Login),
@@ -397,7 +398,7 @@
 
 CREATE TABLE Category (
   CategoryId int(11) NOT NULL AUTO_INCREMENT,
-  `Type` int(11) NOT NULL DEFAULT '0',
+  `Type` int(11) NOT NULL DEFAULT '1',
   SymLinkCategoryId int(10) unsigned DEFAULT NULL,
   ParentId int(11) NOT NULL DEFAULT '0',
   `Name` varchar(255) NOT NULL DEFAULT '',
@@ -419,14 +420,14 @@
   `Status` tinyint(4) NOT NULL DEFAULT '1',
   Priority int(11) NOT NULL DEFAULT '0',
   MetaKeywords text,
-  CachedDescendantCatsQty int(11) DEFAULT NULL,
+  CachedDescendantCatsQty int(11) NOT NULL DEFAULT '0',
   CachedNavbar text,
   l1_CachedNavbar text,
   l2_CachedNavbar text,
   l3_CachedNavbar text,
   l4_CachedNavbar text,
   l5_CachedNavbar text,
-  CreatedById int(11) NOT NULL DEFAULT '0',
+  CreatedById int(11) DEFAULT NULL,
   ResourceId int(11) DEFAULT NULL,
   ParentPath text,
   TreeLeft bigint(20) NOT NULL DEFAULT '0',
@@ -437,7 +438,7 @@
   NewItem int(11) NOT NULL DEFAULT '2',
   PopItem int(11) NOT NULL DEFAULT '2',
   Modified int(11) DEFAULT NULL,
-  ModifiedById int(11) NOT NULL DEFAULT '0',
+  ModifiedById int(11) DEFAULT NULL,
   CachedTemplate varchar(255) NOT NULL DEFAULT '',
   Template varchar(255) NOT NULL DEFAULT '#inherit#',
   UseExternalUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
@@ -457,7 +458,7 @@
   MetaTitle text,
   IndexTools text,
   IsMenu tinyint(4) NOT NULL DEFAULT '1',
-  IsSystem tinyint(4) NOT NULL DEFAULT '0',
+  Protected tinyint(4) NOT NULL DEFAULT '0',
   FormId int(11) DEFAULT NULL,
   FormSubmittedTemplate varchar(255) DEFAULT NULL,
   FriendlyURL varchar(255) NOT NULL DEFAULT '',
@@ -492,7 +493,8 @@
   KEY ThemeId (ThemeId),
   KEY EnablePageCache (EnablePageCache),
   KEY OverridePageCacheKey (OverridePageCacheKey),
-  KEY PageExpiration (PageExpiration)
+  KEY PageExpiration (PageExpiration),
+  KEY Protected (Protected)
 );
 
 CREATE TABLE CategoryCustomData (
@@ -790,10 +792,10 @@
   ReviewId int(11) NOT NULL AUTO_INCREMENT,
   CreatedOn int(10) unsigned DEFAULT NULL,
   ReviewText longtext,
-  Rating tinyint(3) unsigned DEFAULT NULL,
+  Rating tinyint(3) unsigned NOT NULL DEFAULT '0',
   IPAddress varchar(255) NOT NULL DEFAULT '',
   ItemId int(11) NOT NULL DEFAULT '0',
-  CreatedById int(11) NOT NULL DEFAULT '-1',
+  CreatedById int(11) DEFAULT NULL,
   ItemType tinyint(4) NOT NULL DEFAULT '0',
   Priority int(11) NOT NULL DEFAULT '0',
   `Status` tinyint(4) NOT NULL DEFAULT '2',
@@ -833,7 +835,7 @@
   Size int(11) NOT NULL DEFAULT '0',
   `Status` tinyint(4) NOT NULL DEFAULT '1',
   CreatedOn int(11) unsigned DEFAULT NULL,
-  CreatedById int(11) NOT NULL DEFAULT '-1',
+  CreatedById int(11) DEFAULT NULL,
   MimeType varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY (FileId),
   KEY ResourceId (ResourceId),
@@ -1149,7 +1151,7 @@
   DraftId int(11) NOT NULL AUTO_INCREMENT,
   FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0',
   CreatedOn int(10) unsigned DEFAULT NULL,
-  CreatedById int(11) NOT NULL,
+  CreatedById int(11) DEFAULT NULL,
   Message text,
   PRIMARY KEY (DraftId),
   KEY FormSubmissionId (FormSubmissionId),
