Index: trunk/admin/install/inportal_schema.sql
===================================================================
diff -u -r4029 -r4052
--- trunk/admin/install/inportal_schema.sql	(.../inportal_schema.sql)	(revision 4029)
+++ trunk/admin/install/inportal_schema.sql	(.../inportal_schema.sql)	(revision 4052)
@@ -710,12 +710,14 @@
 CREATE TABLE PortalUserCustomData (
   CustomDataId int(11) NOT NULL auto_increment,
   ResourceId int(10) unsigned NOT NULL default '0',
+  UNIQUE KEY ResourceId (ResourceId),
   PRIMARY KEY  (CustomDataId)
 )
 # --------------------------------------------------------
 CREATE TABLE CategoryCustomData (
   CustomDataId int(11) NOT NULL auto_increment,
   ResourceId int(10) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`CustomDataId`)
+  UNIQUE KEY ResourceId (ResourceId),
+  PRIMARY KEY  (CustomDataId)
 )
 # --------------------------------------------------------
