From b2df4aa970706442c1748f144b37a913dec1cc9c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 9 Jan 2022 15:54:14 +0000 Subject: [PATCH] chore(DB): import pending files Referenced commit(s): 2947c929f3afbb4b2f946e1390392acbecef8f8f --- data/sql/updates/db_world/2022_01_09_01.sql | 31 +++++++++++++++++++ .../rev_1641574598839293356.sql | 5 --- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 data/sql/updates/db_world/2022_01_09_01.sql delete mode 100644 data/sql/updates/pending_db_world/rev_1641574598839293356.sql diff --git a/data/sql/updates/db_world/2022_01_09_01.sql b/data/sql/updates/db_world/2022_01_09_01.sql new file mode 100644 index 000000000..b139a3575 --- /dev/null +++ b/data/sql/updates/db_world/2022_01_09_01.sql @@ -0,0 +1,31 @@ +-- DB update 2022_01_09_00 -> 2022_01_09_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_01_09_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2022_01_09_00 2022_01_09_01 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1641574598839293356'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641574598839293356'); + +-- remove ctm for creatures dalaran visitor (two fo them) by default they are just walkers but smart ai set them as runnings +-- this corrects the issue of them flying when they land in dalaran +DELETE FROM `creature_template_movement` WHERE `CreatureID` IN (32596, 32597); + +-- +-- END UPDATING QUERIES +-- +UPDATE version_db_world SET date = '2022_01_09_01' WHERE sql_rev = '1641574598839293356'; +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`; diff --git a/data/sql/updates/pending_db_world/rev_1641574598839293356.sql b/data/sql/updates/pending_db_world/rev_1641574598839293356.sql deleted file mode 100644 index 91a96f483..000000000 --- a/data/sql/updates/pending_db_world/rev_1641574598839293356.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641574598839293356'); - --- remove ctm for creatures dalaran visitor (two fo them) by default they are just walkers but smart ai set them as runnings --- this corrects the issue of them flying when they land in dalaran -DELETE FROM `creature_template_movement` WHERE `CreatureID` IN (32596, 32597);