From 422ebca567da8cdae988f25c052a31ba1dfb844c Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 31 Jan 2021 00:39:29 +0000 Subject: [PATCH] chore(DB): import pending SQL update file Referenced commit(s): 6ef73413131e58dddd45524d51b57015b0ca3b7b --- .../2021_01_31_00.sql} | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) rename data/sql/updates/{pending_db_world/rev_1607274868483442300.sql => db_world/2021_01_31_00.sql} (93%) diff --git a/data/sql/updates/pending_db_world/rev_1607274868483442300.sql b/data/sql/updates/db_world/2021_01_31_00.sql similarity index 93% rename from data/sql/updates/pending_db_world/rev_1607274868483442300.sql rename to data/sql/updates/db_world/2021_01_31_00.sql index 3676045e6..d2eb095b7 100644 --- a/data/sql/updates/pending_db_world/rev_1607274868483442300.sql +++ b/data/sql/updates/db_world/2021_01_31_00.sql @@ -1,3 +1,19 @@ +-- DB update 2021_01_29_00 -> 2021_01_31_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 = '2021_01_29_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2021_01_29_00 2021_01_31_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1607274868483442300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1607274868483442300'); -- Blackwing Mage [12420] @@ -145,3 +161,12 @@ DELETE FROM `broadcast_text` WHERE `ID` = 100003; INSERT INTO `broadcast_text` (`ID`, `Language`, `MaleText`, `FemaleText`, `EmoteID0`, `EmoteID1`, `EmoteID2`, `EmoteDelay0`, `EmoteDelay1`, `EmoteDelay2`, `SoundId`, `Unk1`, `Unk2`, `VerifiedBuild`) VALUES (100003, 0, 'Ah...the heroes. You are persistent, aren\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you. Get up little Red Wyrm, and destroy them!', 'Ah...the heroes. You are persistent, aren\'t you? Your ally here attempted to match his power against mine - and paid the price. Now he shall serve me...by slaughtering you. Get up little Red Wyrm, and destroy them!', 0, 0, 0, 0, 0, 0, 8279, 0, 0, 0); + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;