INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1');
# ===== v 5.0.0 =====
ALTER TABLE News ADD INDEX (StartDate), ADD INDEX (Archived);
UPDATE Category SET Template = '/in-news/designs/section' WHERE Template = 'innews/index';
UPDATE Category SET CachedTemplate = '/in-news/designs/section' WHERE CachedTemplate = 'innews/index';
UPDATE ConfigurationValues SET VariableValue = '/in-news/designs/section' WHERE VariableName = 'n_CategoryTemplate';
UPDATE ConfigurationValues SET VariableValue = 'in-news/designs/detail' WHERE VariableName = 'n_ItemTemplate';
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:articles.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-news:setting_folder.view', 11, 1, 1, 0);
DELETE FROM Permissions WHERE Permission LIKE 'in-news:innews_general.%';
UPDATE Phrase SET Module = 'In-News' WHERE ((Phrase LIKE '%Article%' OR Phrase LIKE '%News%') AND (Module = 'Core') AND Phrase NOT IN ('la_ToolTip_NewSearchConfig', 'la_tooltip_newstylesheet'));
UPDATE Phrase SET Module = 'In-News' WHERE Phrase = 'la_title_In-News';
# ===== v 5.0.1 =====
UPDATE ConfigurationValues SET VariableValue = 'in-news/articles/article_detail' WHERE VariableName = 'n_ItemTemplate';
UPDATE ConfigurationAdmin
SET ValueList = 'ReviewText=la_opt_CommentText,CreatedOn=la_opt_CreatedOn'
WHERE VariableName IN ('News_SortReviews', 'News_SortReviews2');
UPDATE ConfigurationAdmin SET ValueList = 'ASC=la_common_Ascending,DESC=la_common_Descending'
WHERE VariableName IN ('News_SortReviewsOrder', 'News_SortReviewsOrder2');
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_Sec,60=la_opt_Min,3600=la_opt_Hour,86400=la_opt_Day,604800=la_opt_Week,2419200=la_opt_Month,29030400=la_opt_Year'
WHERE VariableName IN ('News_ReviewDelay_Interval', 'News_RatingDelay_Interval');
UPDATE CustomField SET FieldLabel = 'la_fld_RssSource', Prompt = 'la_fld_RssSource' WHERE FieldName = 'RssSource';
UPDATE CustomField SET FieldLabel = 'la_fld_RssDefaultExpiration', Prompt = 'la_fld_RssDefaultExpiration' WHERE FieldName = 'RssDefaultExpiration';
UPDATE CustomField SET FieldLabel = 'la_fld_RssUpdateInterval', Prompt = 'la_fld_RssUpdateInterval' WHERE FieldName = 'RssUpdateInterval';
UPDATE CustomField SET FieldLabel = 'la_fld_RssExpireInterval', Prompt = 'la_fld_RssExpireInterval' WHERE FieldName = 'RssExpireInterval';
UPDATE CustomField SET FieldLabel = 'la_fld_RssDeleteExpired', Prompt = 'la_fld_RssDeleteExpired' WHERE FieldName = 'RssDeleteExpired';
UPDATE CustomField SET FieldLabel = 'la_fld_RssLastExpired', Prompt = 'la_fld_RssLastExpired' WHERE FieldName = 'RssLastExpired';
UPDATE CustomField SET FieldLabel = 'la_fld_RssDefaultExpirationType', Prompt = 'la_fld_RssDefaultExpirationType' WHERE FieldName = 'RssDefaultExpirationType';
UPDATE CustomField SET FieldLabel = 'la_fld_RssExpireIntervalType', Prompt = 'la_fld_RssExpireIntervalType' WHERE FieldName = 'RssExpireIntervalType';
UPDATE CustomField SET FieldLabel = 'la_fld_RssUpdateIntervalType', Prompt = 'la_fld_RssUpdateIntervalType' WHERE FieldName = 'RssUpdateIntervalType';
UPDATE CustomField SET FieldLabel = 'la_fld_RssLastUpdated', Prompt = 'la_fld_RssLastUpdated' WHERE FieldName = 'RssLastUpdated';
UPDATE CustomField SET FieldLabel = 'la_fld_RssArticleCRC', Prompt = 'la_fld_RssArticleCRC' WHERE FieldName = 'RssArticleCRC';
UPDATE CustomField SET FieldLabel = 'la_fld_cust_n_ItemTemplate', Prompt = 'la_fld_cust_n_ItemTemplate' WHERE FieldName = 'n_ItemTemplate';
SET VariableValue = 'in-news/articles/article_detail'
WHERE VariableName = 'n_ItemTemplate' AND VariableValue = 'in-news/designs/detail';
# ===== v 5.1.3-RC2 =====
# ===== v 5.1.3 =====
UPDATE Phrase
SET `Module` = 'Core'
WHERE PhraseKey = 'LA_FLD_STARTDATE';
# ===== v 5.2.0-B1 =====
DELETE FROM SystemSettings
WHERE VariableName IN ('News_Highlight_OpenTag', 'News_Highlight_CloseTag');
# ===== v 5.2.0-B2 =====
UPDATE News main_table
SET main_table.CachedReviewsQty = (SELECT COUNT(*) FROM <%TABLE_PREFIX%>CatalogReviews review_table WHERE review_table.ItemId = main_table.ResourceId);
# ===== v 5.2.0-B3 =====
# ===== v 5.2.0-RC1 =====
# ===== v 5.2.0 =====
INSERT INTO Permissions VALUES(DEFAULT, 'in-news:configuration_output.add', 11, 1, 1, 0);
# ===== v 5.2.1-B1 =====
UPDATE SystemSettings
SET DisplayOrder = 20.04
WHERE VariableName = 'Perpage_NewsReviews';
# ===== v 5.2.1-B2 =====
UPDATE Modules
SET ClassNamespace = 'Intechnic\\InPortal\\Modules\\InNews'
WHERE `Name` = 'In-News';
# ===== v 5.2.1-RC1 =====
# ===== v 5.2.1 =====
# ===== v 5.2.2-B1 =====
-# ===== v 5.3.0-B1 =====
+# ===== v 5.2.2-B2 =====
UPDATE Modules
SET ClassNamespace = 'InPortal\\Modules\\InNews'
WHERE `Name` = 'In-News';
+# ===== v 5.3.0-B1 =====
+# Backported in http://jira.in-portal.org/browse/INP-1690.
+# UPDATE Modules
+# SET ClassNamespace = 'InPortal\\Modules\\InNews'