From eb9b476b7a097714c63949bf2eccbeb69eb00665 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 24 Feb 2022 16:27:31 +0000 Subject: [PATCH] chore(DB): import pending files Referenced commit(s): 67fdd2a12a3168c5cde02f752cba7d7b808bb8d7 --- data/sql/updates/db_world/2022_02_24_01.sql | 31 +++++++++++++++++++ .../rev_1644947346227111600.sql | 5 --- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 data/sql/updates/db_world/2022_02_24_01.sql delete mode 100644 data/sql/updates/pending_db_world/rev_1644947346227111600.sql diff --git a/data/sql/updates/db_world/2022_02_24_01.sql b/data/sql/updates/db_world/2022_02_24_01.sql new file mode 100644 index 000000000..94037fe4a --- /dev/null +++ b/data/sql/updates/db_world/2022_02_24_01.sql @@ -0,0 +1,31 @@ +-- DB update 2022_02_24_00 -> 2022_02_24_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_24_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2022_02_24_00 2022_02_24_01 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1644947346227111600'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1644947346227111600'); + +DELETE FROM `creature_text` WHERE `CreatureID`=19255 AND `GroupID`=0 AND `ID`=4; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(19255, 0, 4, "The warchief's put a price on Arazzius's head! As of right now, that no-good piece of demon refuse is enemy number one.", 12, 1, 100, 1, 0, 0, 16391, 0, "General Krakork"); + +-- +-- END UPDATING QUERIES +-- +UPDATE version_db_world SET date = '2022_02_24_01' WHERE sql_rev = '1644947346227111600'; +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`; diff --git a/data/sql/updates/pending_db_world/rev_1644947346227111600.sql b/data/sql/updates/pending_db_world/rev_1644947346227111600.sql deleted file mode 100644 index 415f073a4..000000000 --- a/data/sql/updates/pending_db_world/rev_1644947346227111600.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1644947346227111600'); - -DELETE FROM `creature_text` WHERE `CreatureID`=19255 AND `GroupID`=0 AND `ID`=4; -INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES -(19255, 0, 4, "The warchief's put a price on Arazzius's head! As of right now, that no-good piece of demon refuse is enemy number one.", 12, 1, 100, 1, 0, 0, 16391, 0, "General Krakork");