From 940f4f907a4ab240823eb490f47f1b28d8c02fa2 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Tue, 9 Jul 2019 12:35:53 +0000 Subject: [PATCH] Import pending SQL update file... Referenced commit(s): 5e251afaa7ef0c6e7de4fe7b77a003369b394b6e --- .../2019_07_09_00.sql} | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) rename data/sql/updates/{pending_db_world/rev_1561636568439132700.sql => db_world/2019_07_09_00.sql} (70%) diff --git a/data/sql/updates/pending_db_world/rev_1561636568439132700.sql b/data/sql/updates/db_world/2019_07_09_00.sql similarity index 70% rename from data/sql/updates/pending_db_world/rev_1561636568439132700.sql rename to data/sql/updates/db_world/2019_07_09_00.sql index ee8ddcb8f..daeef4f21 100644 --- a/data/sql/updates/pending_db_world/rev_1561636568439132700.sql +++ b/data/sql/updates/db_world/2019_07_09_00.sql @@ -1,3 +1,19 @@ +-- DB update 2019_07_08_00 -> 2019_07_09_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 = '2019_07_08_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2019_07_08_00 2019_07_09_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1561636568439132700'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1561636568439132700'); -- "Caverndeep Burrower" and "Caverndeep Reaver" used wrong group id "1" for their creature text ("0" is correct) @@ -21,3 +37,12 @@ UPDATE `smart_scripts` SET `target_type` = 1 WHERE `action_type` = 1 AND `target -- "Scarlet Medic" has to use target "self" for the "talk" action UPDATE `smart_scripts` SET `target_type` = 1 WHERE `action_type` = 1 AND `target_type` = 2 AND `source_type` = 0 AND `entryorguid` = 28608; + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;