From e8d80503300a765b9d6052649509541a17c80479 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sat, 21 Aug 2021 22:57:40 +0000 Subject: [PATCH] chore(DB): import pending files Referenced commit(s): 26cc8c4f274c8a52251aa4c282c424dd33ccf476 --- data/sql/updates/db_world/2021_08_21_01.sql | 32 +++++++++++++++++++ .../rev_1629217819213526612.sql | 6 ---- 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 data/sql/updates/db_world/2021_08_21_01.sql delete mode 100644 data/sql/updates/pending_db_world/rev_1629217819213526612.sql diff --git a/data/sql/updates/db_world/2021_08_21_01.sql b/data/sql/updates/db_world/2021_08_21_01.sql new file mode 100644 index 000000000..bf7c66ea4 --- /dev/null +++ b/data/sql/updates/db_world/2021_08_21_01.sql @@ -0,0 +1,32 @@ +-- DB update 2021_08_21_00 -> 2021_08_21_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 = '2021_08_21_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2021_08_21_00 2021_08_21_01 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1629217819213526612'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1629217819213526612'); + +-- Slightly changes position_z so that the mob doesn't fall through the floor on respawn +DELETE FROM `creature` WHERE (`id` = 7448) AND (`guid` IN (41253)); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(41253, 7448, 1, 0, 0, 1, 1, 10810, 0, 6034.82, -5179.02, 867.5, 1.72181, 333, 15, 0, 3529, 0, 1, 0, 0, 0, '', 0); + +-- +-- END UPDATING QUERIES +-- +UPDATE version_db_world SET date = '2021_08_21_01' WHERE sql_rev = '1629217819213526612'; +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`; diff --git a/data/sql/updates/pending_db_world/rev_1629217819213526612.sql b/data/sql/updates/pending_db_world/rev_1629217819213526612.sql deleted file mode 100644 index 3dc8b6eba..000000000 --- a/data/sql/updates/pending_db_world/rev_1629217819213526612.sql +++ /dev/null @@ -1,6 +0,0 @@ -INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1629217819213526612'); - --- Slightly changes position_z so that the mob doesn't fall through the floor on respawn -DELETE FROM `creature` WHERE (`id` = 7448) AND (`guid` IN (41253)); -INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES -(41253, 7448, 1, 0, 0, 1, 1, 10810, 0, 6034.82, -5179.02, 867.5, 1.72181, 333, 15, 0, 3529, 0, 1, 0, 0, 0, '', 0);