ALTER TABLE Category DROP INDEX ResourceId, ADD UNIQUE ResourceId (ResourceId);
ALTER TABLE PortalGroup DROP INDEX ResourceId, ADD UNIQUE ResourceId (ResourceId);
ALTER TABLE PortalUser DROP INDEX ResourceId, ADD UNIQUE ResourceId (ResourceId);

ALTER TABLE PortalUser ADD PwResetConfirm VARCHAR(255);
ALTER TABLE PortalUser ADD PwRequestTime BIGINT(20);
ALTER TABLE PortalUser ADD MinPwResetDelay INT DEFAULT '1800' NOT NULL;

ALTER TABLE CustomMetaData ADD INDEX (ResourceId);
ALTER TABLE CustomMetaData ADD INDEX (CustomFieldId);

ALTER TABLE PortalUser ADD PassResetTime BIGINT(20);

ALTER TABLE SysCache ADD INDEX (Expire);

INSERT INTO Events VALUES (67, 'USER.PSWDC', '1', '0', 'In-Portal:Users', 'la_event_user.pswd_confirm', '0');
INSERT INTO Events VALUES (68, 'USER.ADD.PENDING', 2, 0, 'In-Portal:Users', 'la_event_user.add.pending', 1)

INSERT INTO ConfigurationAdmin VALUES ('Users_AllowReset', 'la_Text_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 3, 0);

INSERT INTO ConfigurationValues VALUES ('Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES ('Search_MinKeyword_Length', '3', 'In-Portal', '');

ALTER TABLE Language ADD Charset varchar(20) NOT NULL default '';

DELETE FROM ConfigurationAdmin WHERE VariableName = 'Smtp_SendHTML';

UPDATE Modules SET Version = '1.0.10' WHERE Name = 'In-Portal';

UPDATE SearchConfig SET ConfigHeader = 'la_text_category' WHERE ConfigHeader = 'la_Text_Category';