UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, 'Topic_VotesToHot', 'Topic_MaxHotNumber');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, 'Link_VotesToHot', 'Link_MaxHotNumber');
UPDATE StatItem SET ValueSQL = REPLACE(ValueSQL, 'News_VotesToHot', 'News_MaxHotNumber');

ALTER TABLE Language CHANGE ThousandSep ThousandSep TINYTEXT NULL;

UPDATE Phrase SET Translation = TRIM(TRAILING CHAR(10) FROM Translation);
UPDATE Phrase SET Translation = TRIM(TRAILING CHAR(13) FROM Translation);
UPDATE Phrase SET Translation = TRIM(TRAILING CHAR(10) FROM Translation);
UPDATE Phrase SET Translation = TRIM(TRAILING CHAR(13) FROM Translation);

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