+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';
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT count(*) FROM <%prefix%>News WHERE Status=1', NULL, 'la_prompt_ActiveArticles', 0, 1);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS TotalArticles FROM <%prefix%>News', NULL, 'la_prompt_ArticlesTotal', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ActiveArticles FROM <%prefix%>News WHERE Status = 1', NULL, 'la_prompt_ArticlesActive', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PendingArticles FROM <%prefix%>News WHERE Status = 2', NULL, 'la_prompt_ArticlesPending', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS DisabledArticles FROM <%prefix%>News WHERE Status = 0', NULL, 'la_prompt_DisabledArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS ArchivedArticles FROM <%prefix%>News WHERE Archived = 1', NULL, 'la_prompt_ArticlesArchived', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS NewArticles FROM <%prefix%>News WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="News_CatNewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS HotArticles FROM <%prefix%>News WHERE (HotItem = 1) OR (Hits >= <%m:config name="News_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadStory = 1', NULL, 'la_prompt_LeadStoryArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>News WHERE LeadCatStory = 1', NULL, 'la_prompt_CategoryLeadStoryArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>News WHERE CachedRating > 0', NULL, 'la_prompt_ArticleAverageRating', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) AS PopularArticles FROM <%prefix%>News WHERE (PopItem = 1) OR ( (CachedRating >= <%article:hit_count type="top"%>) AND <%article:hit_count type="top"%> AND (PopItem = 2) )', NULL, 'la_prompt_PopularArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(Hits) AS MaxHitsArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxHitsArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT MAX(CachedVotesQty) AS MaxVotesArticles FROM <%prefix%>News', NULL, 'la_prompt_MaxVotesArticles', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_NewestArticleDate', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>News', NULL, 'la_prompt_LastArticleUpdate', 0, 2);
+INSERT INTO StatItem VALUES (DEFAULT, 'In-News', 'SELECT COUNT(*) FROM <%prefix%>CatalogReviews WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_ArticleReviews', 0, 2);
+
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 14, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 13, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 11, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 12, 1, 0, {NewsCatId});
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.VIEW', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.DELETE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.RATE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.REVIEW.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.ADD.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.MODIFY.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.MODIFY.PENDING', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'NEWS.OWNER.DELETE', 15, 0, 0, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news.view', 11, 1, 1, 0);
+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);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_output.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_search.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.view', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.add', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.edit', 11, 1, 1, 0);
+INSERT INTO Permissions VALUES (DEFAULT, 'in-news:configuration_custom.delete', 11, 1, 1, 0);
+
+INSERT INTO ImportScripts VALUES (DEFAULT, 'Articles from CSV file [In-News]', '', 'n', 'In-News', '', 'CSV', '1');
+ Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));