UPDATE ConfigurationAdmin SET VariableName = 'News_MinPopVotes', prompt = 'la_fld_News_MinPopVotes' WHERE VariableName = 'News_MinVotes';
UPDATE ConfigurationAdmin SET VariableName = 'News_MinPopRating', prompt = 'la_fld_News_MinPopRating' WHERE VariableName = 'News_TopCount';
UPDATE ConfigurationAdmin SET VariableName = 'News_MaxHotNumber', prompt = 'la_fld_News_MaxHotNumber' WHERE VariableName = 'News_VotesToHot';

UPDATE ConfigurationValues SET VariableName = 'News_MinPopVotes' WHERE VariableName = 'News_MinVotes';
UPDATE ConfigurationValues SET VariableName = 'News_MinPopRating' WHERE VariableName = 'News_TopCount';
UPDATE ConfigurationValues SET VariableName = 'News_MaxHotNumber' WHERE VariableName = 'News_VotesToHot';

UPDATE ConfigurationAdmin SET DisplayOrder = '10.01', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortField';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.01', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortOrder';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.02', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortField2';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.02', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortOrder2';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.03' WHERE VariableName = 'Perpage_News';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.04' WHERE VariableName = 'Perpage_News_Short';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.05' WHERE VariableName = 'News_CatNewDays';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.06' WHERE VariableName = 'News_MinPopRating';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.07' WHERE VariableName = 'News_MinPopVotes';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.08' WHERE VariableName = 'News_MaxHotNumber';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.09' WHERE VariableName = 'News_Archive';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.10' WHERE VariableName = 'News_ShowPick';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.11', GroupDisplayOrder = 1 WHERE VariableName = 'News_ReviewDelay_Value';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.11', GroupDisplayOrder = 2 WHERE VariableName = 'News_ReviewDelay_Interval';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.12', GroupDisplayOrder = 1 WHERE VariableName = 'News_RatingDelay_Value';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.12', GroupDisplayOrder = 2 WHERE VariableName = 'News_RatingDelay_Interval';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.01', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortReviews';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.01', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortReviewsOrder';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.02', GroupDisplayOrder = 1 WHERE VariableName = 'News_SortReviews2';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.02', GroupDisplayOrder = 2 WHERE VariableName = 'News_SortReviewsOrder2';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.03' WHERE VariableName = 'Perpage_NewsReviews';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.03' WHERE VariableName = 'Perpage_NewsReviews_Short';
UPDATE ConfigurationAdmin SET DisplayOrder = '30.01' WHERE VariableName = 'n_CategoryTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = '30.02' WHERE VariableName = 'n_ItemTemplate';

UPDATE ConfigurationValues SET VariableValue = 0 WHERE VariableName = 'News_Archive';
ALTER TABLE News CHANGE EditorsPick EditorsPick TINYINT(4) NOT NULL DEFAULT '0';
ALTER TABLE News CHANGE EndOn EndOn INT NOT NULL DEFAULT '0';
ALTER TABLE News CHANGE CreatedOn CreatedOn INT NOT NULL DEFAULT '0';
ALTER TABLE News CHANGE Modified Modified INT NOT NULL DEFAULT '0';

INSERT INTO CustomField (Type, FieldName, FieldLabel, Heading, Prompt, ElementType, ValueList, DisplayOrder, OnGeneralTab, IsSystem) VALUES (1, 'n_ItemTemplate', 'n_ItemTemplate', 'la_title_SystemCF', 'n_ItemTemplate', 'text', NULL, 0, 0, 1);

UPDATE Modules SET Version = '1.2.1' WHERE Name = 'In-News';