Index: trunk/core/install/upgrades.sql
===================================================================
diff -u -N -r8015 -r8029
--- trunk/core/install/upgrades.sql	(.../upgrades.sql)	(revision 8015)
+++ trunk/core/install/upgrades.sql	(.../upgrades.sql)	(revision 8029)
@@ -9,7 +9,10 @@
 
 # ===== v 4.0.2 =====
 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,
@@ -48,11 +51,22 @@
 	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 '';
+	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 PortalGroup CHANGE CreatedOn CreatedOn 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';
