From 4539833833cda12ccac8da8ccd707b1df7685a72 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 13 Oct 2021 03:46:04 +0000 Subject: [PATCH] chore(DB): import pending files Referenced commit(s): cd03fd4e561ce2aee2495f5acd44bf97377b0189 --- .../2021_10_13_00.sql} | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) rename data/sql/updates/{pending_db_world/rev_1633950727186349900.sql => db_world/2021_10_13_00.sql} (73%) diff --git a/data/sql/updates/pending_db_world/rev_1633950727186349900.sql b/data/sql/updates/db_world/2021_10_13_00.sql similarity index 73% rename from data/sql/updates/pending_db_world/rev_1633950727186349900.sql rename to data/sql/updates/db_world/2021_10_13_00.sql index cd93bb07a..d2d06f782 100644 --- a/data/sql/updates/pending_db_world/rev_1633950727186349900.sql +++ b/data/sql/updates/db_world/2021_10_13_00.sql @@ -1,3 +1,19 @@ +-- DB update 2021_10_12_03 -> 2021_10_13_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_10_12_03'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2021_10_12_03 2021_10_13_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1633950727186349900'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1633950727186349900'); -- Server-side spell 'Summon Darrowshire Poltergeinst (DND)' @@ -22,3 +38,13 @@ INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Lan (@NPC_GHOST, 0, 4, 'You must save him!', 12, 0, 100, 0, 0, 0, 7206, 0, 'Darrowshire Poltergeist'), (@NPC_GHOST, 0, 5, 'I was devoured by Horgus! I can still feel his teeth upon me!', 12, 0, 100, 0, 0, 0, 7211, 0, 'Darrowshire Poltergeist'), (@NPC_GHOST, 0, 6, 'Beware Marduk! Beware, or your strength will wither.', 12, 0, 100, 0, 0, 0, 7210, 0, 'Darrowshire Poltergeist'); + +-- +-- END UPDATING QUERIES +-- +UPDATE version_db_world SET date = '2021_10_13_00' WHERE sql_rev = '1633950727186349900'; +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;