Index: trunk/admin/install/upgrades/inportal_upgrade_v1.1.8.sql
===================================================================
diff -u -r4108 -r4446
--- trunk/admin/install/upgrades/inportal_upgrade_v1.1.8.sql	(.../inportal_upgrade_v1.1.8.sql)	(revision 4108)
+++ trunk/admin/install/upgrades/inportal_upgrade_v1.1.8.sql	(.../inportal_upgrade_v1.1.8.sql)	(revision 4446)
@@ -1,5 +1,5 @@
-UPDATE SearchConfig SET CustomFieldId = NULL WHERE CustomFieldId = 0;
 ALTER TABLE SearchConfig CHANGE CustomFieldId CustomFieldId INT(11) NULL DEFAULT NULL;
+UPDATE SearchConfig SET CustomFieldId = NULL WHERE CustomFieldId = 0;
 UPDATE SearchConfig SET SimpleSearch = -1 WHERE TableName = 'PortalUser' AND ModuleName = 'In-Portal';
 
 INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_category', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 1);
@@ -13,5 +13,6 @@
 CREATE TABLE CategoryCustomData (CustomDataId int(11) NOT NULL auto_increment, ResourceId int(10) unsigned NOT NULL default '0', UNIQUE KEY ResourceId (ResourceId), PRIMARY KEY  (CustomDataId));
 
 ALTER TABLE Category ADD CategoryTemplate VARCHAR(255) NOT NULL, ADD ItemTemplate VARCHAR(255) NOT NULL, ADD CachedCategoryTemplate VARCHAR(255) NOT NULL, ADD CachedItemTemplate VARCHAR(255) NOT NULL;
+ALTER TABLE Category CHANGE AutomaticFilename AutomaticFilename TINYINT(3) UNSIGNED NOT NULL DEFAULT '1';
 
 UPDATE Modules SET Version = '1.1.8' WHERE Name = 'In-Portal';
\ No newline at end of file
