Index: branches/5.0.x/core/install/upgrades.sql
===================================================================
diff -u -r12238 -r12244
--- branches/5.0.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 12238)
+++ branches/5.0.x/core/install/upgrades.sql	(.../upgrades.sql)	(revision 12244)
@@ -1417,4 +1417,14 @@
 UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName = 'SessionTimeout';
 UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('KeepSessionOnBrowserClose', 'SessionReferrerCheck', 'UseJSRedirect');
 
+ALTER TABLE Events
+	ADD FrontEndOnly TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER Enabled,
+	ADD INDEX (FrontEndOnly);
+
+UPDATE Events SET FrontEndOnly = 1 WHERE Enabled = 2;
+UPDATE Events SET Enabled = 1 WHERE Enabled = 2;
+
+ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NULL DEFAULT NULL;
+UPDATE Events SET FromUserId = NULL WHERE FromUserId = 0;
+
 UPDATE Modules SET Version = '5.0.1', Loaded = 1 WHERE Name = 'In-Portal';
\ No newline at end of file
