From af3b2494231c4f72c4a0c490557279e3e31f6cd5 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Mon, 10 May 2021 04:16:10 +0000 Subject: [PATCH] chore(DB): import pending SQL update file Referenced commit(s): 5bd26262b052a9761c8f21cc99a200825d21b246 --- data/sql/updates/db_world/2021_05_10_03.sql | 33 +++++++++++++++++++ .../rev_1620498329028793558.sql | 8 ----- 2 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 data/sql/updates/db_world/2021_05_10_03.sql delete mode 100644 data/sql/updates/pending_db_world/rev_1620498329028793558.sql diff --git a/data/sql/updates/db_world/2021_05_10_03.sql b/data/sql/updates/db_world/2021_05_10_03.sql new file mode 100644 index 000000000..f98324107 --- /dev/null +++ b/data/sql/updates/db_world/2021_05_10_03.sql @@ -0,0 +1,33 @@ +-- DB update 2021_05_10_02 -> 2021_05_10_03 +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_05_10_02'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2021_05_10_02 2021_05_10_03 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1620498329028793558'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1620498329028793558'); + +-- Missing Reference Tables in STV +UPDATE `creature_loot_template` SET `Reference` = 24723, `Comment` = 'Ana''thek the Cruel - (ReferenceTable)' WHERE `Entry`= 1059 AND `Item` = 24723; +UPDATE `creature_loot_template` SET `Reference` = 24722, `Comment` = 'Gan''zulah - (ReferenceTable)' WHERE `Entry`= 1061 AND `Item` = 24722; +UPDATE `creature_loot_template` SET `Reference` = 24723, `Comment` = 'Nezzliok the Dire - (ReferenceTable)' WHERE `Entry`= 1062 AND `Item` = 24723; +UPDATE `creature_loot_template` SET `Reference` = 24736, `Comment` = 'Nezzliok the Dire - (ReferenceTable)' WHERE `Entry`= 1062 AND `Item` = 24736; + + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`; diff --git a/data/sql/updates/pending_db_world/rev_1620498329028793558.sql b/data/sql/updates/pending_db_world/rev_1620498329028793558.sql deleted file mode 100644 index b1273b554..000000000 --- a/data/sql/updates/pending_db_world/rev_1620498329028793558.sql +++ /dev/null @@ -1,8 +0,0 @@ -INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1620498329028793558'); - --- Missing Reference Tables in STV -UPDATE `creature_loot_template` SET `Reference` = 24723, `Comment` = 'Ana''thek the Cruel - (ReferenceTable)' WHERE `Entry`= 1059 AND `Item` = 24723; -UPDATE `creature_loot_template` SET `Reference` = 24722, `Comment` = 'Gan''zulah - (ReferenceTable)' WHERE `Entry`= 1061 AND `Item` = 24722; -UPDATE `creature_loot_template` SET `Reference` = 24723, `Comment` = 'Nezzliok the Dire - (ReferenceTable)' WHERE `Entry`= 1062 AND `Item` = 24723; -UPDATE `creature_loot_template` SET `Reference` = 24736, `Comment` = 'Nezzliok the Dire - (ReferenceTable)' WHERE `Entry`= 1062 AND `Item` = 24736; -