CREATE TABLE Visits (VisitId int(11) NOT NULL auto_increment, VisitDate int(10) unsigned NOT NULL default '0', Referer varchar(255) NOT NULL default '', IPAddress varchar(15) NOT NULL default '', AffiliateId int(10) unsigned NOT NULL default '0', PortalUserId int(11) NOT NULL default '0', PRIMARY KEY  (VisitId), KEY PortalUserId (PortalUserId), KEY AffiliateId (AffiliateId) );

INSERT INTO ConfigurationAdmin VALUES ('FirstDayOfWeek', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday,1=la_monday', 8, 1);
INSERT INTO ConfigurationValues VALUES ('FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('SSL_URL', 'la_Text_Website', 'la_config_ssl_url', 'text', '', '', 11, '1');
INSERT INTO ConfigurationValues VALUES ('SSL_URL', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('Require_SSL', 'la_Text_Website', 'la_config_require_ssl', 'checkbox', '', '', 12, '1');
INSERT INTO ConfigurationValues VALUES ('Require_SSL', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('Force_HTTP_When_SSL_Not_Required', 'la_Text_Website', 'la_config_force_http', 'checkbox', '', '', 13, '1');
INSERT INTO ConfigurationValues VALUES ('Force_HTTP_When_SSL_Not_Required', '1', 'In-Portal', 'in-portal:configure_general');
ALTER TABLE StylesheetSelectors DROP INDEX UniqueIdName;

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