Index: trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.sql
===================================================================
diff -u -r8015 -r8029
--- trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.sql	(.../inportal_upgrade_v4.0.2.sql)	(revision 8015)
+++ trunk/admin/install/upgrades/inportal_upgrade_v4.0.2.sql	(.../inportal_upgrade_v4.0.2.sql)	(revision 8029)
@@ -1,8 +1,7 @@
 ALTER TABLE EmailMessage ADD ReplacementTags TEXT AFTER Template;
 
-ALTER TABLE Phrase CHANGE Translation Translation TEXT NOT NULL;
+ALTER TABLE Phrase CHANGE Translation Translation TEXT NOT NULL, CHANGE Module Module VARCHAR(30) NOT NULL DEFAULT 'In-Portal';
 ALTER TABLE Category CHANGE Description Description TEXT, CHANGE l1_Description l1_Description TEXT, CHANGE l2_Description l2_Description TEXT, CHANGE l3_Description l3_Description TEXT, CHANGE l4_Description l4_Description TEXT, CHANGE l5_Description l5_Description TEXT, CHANGE CachedNavbar CachedNavbar text, CHANGE l1_CachedNavbar l1_CachedNavbar text, CHANGE l2_CachedNavbar l1_CachedNavbar text, CHANGE l3_CachedNavbar l1_CachedNavbar text, CHANGE l4_CachedNavbar l1_CachedNavbar text, CHANGE l5_CachedNavbar l1_CachedNavbar text;
-                                
 ALTER TABLE ConfigurationAdmin CHANGE ValueList ValueList TEXT;
 
 ALTER TABLE EmailQueue CHANGE `Subject` `Subject` TEXT, CHANGE toaddr toaddr TEXT, CHANGE fromaddr fromaddr TEXT; 
@@ -11,17 +10,26 @@
 ALTER TABLE PortalUser CHANGE CreatedOn CreatedOn INT NOT NULL DEFAULT '0', CHANGE dob dob INT(11) NULL DEFAULT NULL, CHANGE PassResetTime PassResetTime INT(11) UNSIGNED NULL DEFAULT NULL, CHANGE PwRequestTime PwRequestTime INT(11) UNSIGNED NULL DEFAULT NULL, CHANGE `Password` `Password` VARCHAR(255) NULL DEFAULT 'd41d8cd98f00b204e9800998ecf8427e';
 
 ALTER TABLE Modules CHANGE BuildDate BuildDate INT UNSIGNED NULL DEFAULT NULL, CHANGE Version Version VARCHAR(10) NOT NULL DEFAULT '0.0.0'; 
-ALTER TABLE Language CHANGE Enabled Enabled INT(11) NOT NULL DEFAULT '1', CHANGE InputDateFormat InputDateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y', CHANGE InputTimeFormat InputTimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A', CHANGE DecimalPoint DecimalPoint CHAR(2) NOT NULL DEFAULT '', CHANGE ThousandSep ThousandSep TINYTEXT NOT NULL DEFAULT '';
+ALTER TABLE Language CHANGE Enabled Enabled INT(11) NOT NULL DEFAULT '1', CHANGE InputDateFormat InputDateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y', CHANGE InputTimeFormat InputTimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A', CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '', CHANGE ThousandSep ThousandSep VARCHAR(10) NOT NULL DEFAULT '';
 ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NOT NULL DEFAULT '-1';
-
+	
 ALTER TABLE StdDestinations CHANGE DestAbbr2 DestAbbr2 CHAR(2) NULL DEFAULT NULL;
 
 ALTER TABLE PermCache DROP DACL;
 
 ALTER TABLE Images CHANGE LocalThumb LocalThumb TINYINT(4) NOT NULL DEFAULT '1', CHANGE SameImages SameImages TINYINT(4) NOT NULL DEFAULT '1', CHANGE AltName AltName VARCHAR(255) NOT NULL DEFAULT '';
 
-ALTER TABLE SearchConfig CHANGE SimpleSearch SimpleSearch TINYINT(4) NOT NULL DEFAULT '1', CHANGE AdvancedSearch AdvancedSearch TINYINT(4) NOT NULL DEFAULT '1', CHANGE ModuleName ModuleName VARCHAR(20) NULL DEFAULT 'In-Portal';
-ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NOT NULL DEFAULT '-1', CHANGE Status Status TINYINT(4) NOT NULL DEFAULT '2';
+ALTER TABLE SearchConfig CHANGE SimpleSearch SimpleSearch TINYINT(4) NOT NULL DEFAULT '1', CHANGE AdvancedSearch AdvancedSearch TINYINT(4) NOT NULL DEFAULT '1', CHANGE ModuleName ModuleName VARCHAR(20) NOT NULL DEFAULT 'In-Portal';
+ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NOT NULL DEFAULT '-1', CHANGE Status Status TINYINT(4) NOT NULL DEFAULT '2', CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL;
 ALTER TABLE Visits CHANGE PortalUserId PortalUserId INT(11) NOT NULL DEFAULT '-2';
 
+ALTER TABLE ItemRating CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL;
+ALTER TABLE PortalGroup CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL;
+
+ALTER TABLE SpamControl CHANGE Expire Expire INT UNSIGNED NULL DEFAULT NULL;
+ALTER TABLE SuggestMail CHANGE sent sent INT UNSIGNED NULL DEFAULT NULL;
+ALTER TABLE SysCache CHANGE Expire Expire INT UNSIGNED NULL DEFAULT NULL;
+
+ALTER TABLE UserSession CHANGE SessionKey SessionKey INT UNSIGNED NULL DEFAULT NULL, CHANGE CurrentTempKey CurrentTempKey INT UNSIGNED NULL DEFAULT NULL, CHANGE PrevTempKey PrevTempKey INT UNSIGNED NULL DEFAULT NULL, CHANGE LastAccessed LastAccessed INT UNSIGNED NOT NULL DEFAULT '0', CHANGE PortalUserId PortalUserId INT(11) NOT NULL DEFAULT '-2', CHANGE Language Language INT(11) NOT NULL DEFAULT '1', CHANGE Theme Theme INT(11) NOT NULL DEFAULT '1';
+
 UPDATE Modules SET Version = '4.0.2' WHERE Name = 'In-Portal';
\ No newline at end of file
