UPDATE ConfigurationAdmin SET VariableName = 'Topic_MinPopVotes', prompt = 'la_fld_Topic_MinPopVotes' WHERE VariableName = 'Topic_MinVotes';
UPDATE ConfigurationAdmin SET VariableName = 'Topic_MinPopRating', prompt = 'la_fld_Topic_MinPopRating' WHERE VariableName = 'Topic_PostsToPop';
UPDATE ConfigurationAdmin SET VariableName = 'Topic_MaxHotNumber', prompt = 'la_fld_Topic_MaxHotNumber' WHERE VariableName = 'Topic_VotesToHot';

UPDATE ConfigurationAdmin SET DisplayOrder = '10.01', GroupDisplayOrder = 1 WHERE VariableName = 'Topic_SortField';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.01', GroupDisplayOrder = 2 WHERE VariableName = 'Topic_SortOrder';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.02', GroupDisplayOrder = 1 WHERE VariableName = 'Topic_SortField2';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.02', GroupDisplayOrder = 2 WHERE VariableName = 'Topic_SortOrder2';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.03' WHERE VariableName = 'Perpage_Topics';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.04' WHERE VariableName = 'Perpage_Topics_Short';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.05' WHERE VariableName = 'Topic_NewDays';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.06' WHERE VariableName = 'Topic_MinPopRating';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.07' WHERE VariableName = 'Topic_MinPopVotes';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.08' WHERE VariableName = 'Topic_MaxHotNumber';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.09' WHERE VariableName = 'Topic_EditorPicksAbove';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.10', GroupDisplayOrder = 1 WHERE VariableName = 'topic_ReviewDelay_Value';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.10', GroupDisplayOrder = 2 WHERE VariableName = 'topic_ReviewDelay_Interval';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.11', GroupDisplayOrder = 1 WHERE VariableName = 'topic_RatingDelay_Value';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.11', GroupDisplayOrder = 2 WHERE VariableName = 'topic_RatingDelay_Interval';
UPDATE ConfigurationAdmin SET DisplayOrder = '10.12' WHERE VariableName = 'AutoTopicLockPosts';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.01' WHERE VariableName = 'Perpage_Postings';
UPDATE ConfigurationAdmin SET DisplayOrder = '20.02' WHERE VariableName = 'Posts_NewDays';
UPDATE ConfigurationAdmin SET DisplayOrder = '30.01' WHERE VariableName = 'Perpage_TopicReviews';
UPDATE ConfigurationAdmin SET DisplayOrder = '40.01' WHERE VariableName = 'bb_CategoryTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = '40.02' WHERE VariableName = 'bb_ItemTemplate';

UPDATE ConfigurationValues SET VariableName = 'Topic_MinPopVotes' WHERE VariableName = 'Topic_MinVotes';
UPDATE ConfigurationValues SET VariableName = 'Topic_MinPopRating' WHERE VariableName = 'Topic_PostsToPop';
UPDATE ConfigurationValues SET VariableName = 'Topic_MaxHotNumber' WHERE VariableName = 'Topic_VotesToHot';

ALTER TABLE Topic CHANGE Status Status TINYINT(4) UNSIGNED NOT NULL DEFAULT '2';

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

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