/* =================================================================================================================================
*
* UPGRADE TO DEMOTIC 1.2
* DIFFICULTY: INTERMEDIATE DB ADMIN
*
===================================================================================================================================*/

/*
* INSTUCTION 1
* UPDATE THE CACHE NUMBER
* IF YOUR STORAGE TABLE IS NOT `dm_storage` REPLACE WITH THE APPROPRIATE TABLE NAME
*/
UPDATE `dm_storage` SET `value` = '3' WHERE `dm_storage`.`plugin` = 'Demotic' AND `dm_storage`.`key` = 'cacheVersion';

/*
* INSTUCTION 2
* UPDATE THE VERSION NUMBER
* IF YOUR STORAGE TABLE IS NOT `dm_storage` REPLACE WITH THE APPROPRIATE TABLE NAME
*/
UPDATE `dm_storage` SET `value` = '"1.2"' WHERE `dm_storage`.`plugin` = 'Demotic' AND `dm_storage`.`key` = 'version';

/*
* INSTUCTION 3
* UPDATE RESERVED DIRECTORIES KEY (VERY IMPORTANT)
* IF YOUR STORAGE TABLE IS NOT `dm_storage` REPLACE WITH THE APPROPRIATE TABLE NAME
*/
UPDATE `dm_storage` SET `value` = '["file","install","Demotic","Plugin","update","Theme","index.php","admin","admin.php", "Updates", "dashboard.php", "dashboard"]' WHERE `dm_storage`.`plugin` = 'Config' AND `dm_storage`.`key` = 'Config.reservedDirs'; 

/*
* INSTUCTION 4
* SET MAINTENANCE MODE OPTIONS
* IF YOUR STORAGE TABLE IS NOT `dm_storage` REPLACE WITH THE APPROPRIATE TABLE NAME
*/
INSERT INTO `dm_storage` (`plugin`, `key`, `value`) VALUES
('Config', 'Config.maintenanceModeActive', '"0"');