From e069ef649d63b0a39bb876feaf0c5f7ecd8c627e Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Fri, 11 Dec 2020 15:48:06 +0000 Subject: [PATCH] chore(DB): import pending SQL update file Referenced commit(s): 85c31a13e68224bc95cbc2b3f7383551fc82f429 --- .../2020_12_11_00.sql} | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) rename data/sql/updates/{pending_db_world/rev_1606625488742709700.sql => db_world/2020_12_11_00.sql} (63%) diff --git a/data/sql/updates/pending_db_world/rev_1606625488742709700.sql b/data/sql/updates/db_world/2020_12_11_00.sql similarity index 63% rename from data/sql/updates/pending_db_world/rev_1606625488742709700.sql rename to data/sql/updates/db_world/2020_12_11_00.sql index 51f0c7589..b4458d1ce 100644 --- a/data/sql/updates/pending_db_world/rev_1606625488742709700.sql +++ b/data/sql/updates/db_world/2020_12_11_00.sql @@ -1,3 +1,19 @@ +-- DB update 2020_12_10_05 -> 2020_12_11_00 +DROP PROCEDURE IF EXISTS `updateDb`; +DELIMITER // +CREATE PROCEDURE updateDb () +proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE'; +SELECT COUNT(*) INTO @COLEXISTS +FROM information_schema.COLUMNS +WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2020_12_10_05'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2020_12_10_05 2020_12_11_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1606625488742709700'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1606625488742709700'); /* Add missing messages when attempting to enter an instance without completing the required quest. */ @@ -10,3 +26,12 @@ INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1606625488742709700'); /* Halls of Reflection */ UPDATE `access_requirement` SET `quest_failed_text`='You must complete the quest "Deliverance from the Pit" before entering the Halls of Reflection.' WHERE `mapId`=668 AND `difficulty`=0; UPDATE `access_requirement` SET `quest_failed_text`='You must complete the quest "Deliverance from the Pit" and be level 80 before entering the Heroic difficulty of the Halls of Reflection.' WHERE `mapId`=668 AND `difficulty`=1; + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;