From 52fe23aa28ad6516faeb6f5ac5220edf3065c580 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 3 Feb 2022 14:03:14 +0000 Subject: [PATCH] chore(DB): import pending files Referenced commit(s): 26267e0cb4fc4a4dfcc7ab93ddf60034443bd3cd --- data/sql/updates/db_world/2022_02_03_01.sql | 39 +++++++++++++++++++ .../rev_1643734354433050200.sql | 13 ------- 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 data/sql/updates/db_world/2022_02_03_01.sql delete mode 100644 data/sql/updates/pending_db_world/rev_1643734354433050200.sql diff --git a/data/sql/updates/db_world/2022_02_03_01.sql b/data/sql/updates/db_world/2022_02_03_01.sql new file mode 100644 index 000000000..bc449a9b9 --- /dev/null +++ b/data/sql/updates/db_world/2022_02_03_01.sql @@ -0,0 +1,39 @@ +-- DB update 2022_02_03_00 -> 2022_02_03_01 +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 = '2022_02_03_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2022_02_03_00 2022_02_03_01 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1643734354433050200'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1643734354433050200'); + +UPDATE `creature_template` SET `gossip_menu_id` = 61026 WHERE `entry` = 3567; +UPDATE `creature_template` SET `npcflag` = 3 WHERE `entry` = 3567; +DELETE FROM `npc_text` WHERE `ID` = 50032; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`) +VALUES (50032, + 'Well met, $N. It is good to see that $cs like yourself are taking an active part in protecting the groves.', + 'Well met, $N. It is good to see that $cs like yourself are taking an active part in protecting the groves.', 0); + +DELETE FROM `gossip_menu` WHERE `MenuID` = 61026 AND `TextID` = 50032; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(61026, 50032); + +-- +-- END UPDATING QUERIES +-- +UPDATE version_db_world SET date = '2022_02_03_01' WHERE sql_rev = '1643734354433050200'; +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`; diff --git a/data/sql/updates/pending_db_world/rev_1643734354433050200.sql b/data/sql/updates/pending_db_world/rev_1643734354433050200.sql deleted file mode 100644 index 0a3836f91..000000000 --- a/data/sql/updates/pending_db_world/rev_1643734354433050200.sql +++ /dev/null @@ -1,13 +0,0 @@ -INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1643734354433050200'); - -UPDATE `creature_template` SET `gossip_menu_id` = 61026 WHERE `entry` = 3567; -UPDATE `creature_template` SET `npcflag` = 3 WHERE `entry` = 3567; -DELETE FROM `npc_text` WHERE `ID` = 50032; -INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`) -VALUES (50032, - 'Well met, $N. It is good to see that $cs like yourself are taking an active part in protecting the groves.', - 'Well met, $N. It is good to see that $cs like yourself are taking an active part in protecting the groves.', 0); - -DELETE FROM `gossip_menu` WHERE `MenuID` = 61026 AND `TextID` = 50032; -INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES -(61026, 50032);