From ff431dbde2c3dd26bbb2463419c208406d4fdaef Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 19 Sep 2021 15:04:21 +0000 Subject: [PATCH] chore(DB): import pending files Referenced commit(s): 99b3b0de63b74df0c6ae92d9b541949aeac4c940 --- data/sql/updates/db_world/2021_09_19_02.sql | 39 +++++++++++++++++++ .../rev_1631624817554390205.sql | 13 ------- 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 data/sql/updates/db_world/2021_09_19_02.sql delete mode 100644 data/sql/updates/pending_db_world/rev_1631624817554390205.sql diff --git a/data/sql/updates/db_world/2021_09_19_02.sql b/data/sql/updates/db_world/2021_09_19_02.sql new file mode 100644 index 000000000..ec9268175 --- /dev/null +++ b/data/sql/updates/db_world/2021_09_19_02.sql @@ -0,0 +1,39 @@ +-- DB update 2021_09_19_01 -> 2021_09_19_02 +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_09_19_01'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2021_09_19_01 2021_09_19_02 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1631624817554390205'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1631624817554390205'); + +-- Flags: Orc 2, Undead 16, Tauren 32, Troll 128, Blood Elf 512 + +-- The Mindless Ones and Rattling the Rattlecages are now Horde only from undead only +UPDATE `quest_template` SET `AllowableRaces` = `AllowableRaces`|2|16|32|128|512 WHERE (`ID` IN (364, 3901)); + +-- Simple scroll, Encrypted Scroll, Hallowed Scroll, Glyphic Scroll and Tainted Scroll are now undead only from Horde only +UPDATE `quest_template` SET `AllowableRaces` = `AllowableRaces`&~(2|16|32|128|512) WHERE (`ID` IN (3095, 3096, 3097, 3098, 3099)); + +-- Remove the prerequisite quest of The Mindless Ones +UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 364); + + +-- +-- END UPDATING QUERIES +-- +UPDATE version_db_world SET date = '2021_09_19_02' WHERE sql_rev = '1631624817554390205'; +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`; diff --git a/data/sql/updates/pending_db_world/rev_1631624817554390205.sql b/data/sql/updates/pending_db_world/rev_1631624817554390205.sql deleted file mode 100644 index c53719a24..000000000 --- a/data/sql/updates/pending_db_world/rev_1631624817554390205.sql +++ /dev/null @@ -1,13 +0,0 @@ -INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1631624817554390205'); - --- Flags: Orc 2, Undead 16, Tauren 32, Troll 128, Blood Elf 512 - --- The Mindless Ones and Rattling the Rattlecages are now Horde only from undead only -UPDATE `quest_template` SET `AllowableRaces` = `AllowableRaces`|2|16|32|128|512 WHERE (`ID` IN (364, 3901)); - --- Simple scroll, Encrypted Scroll, Hallowed Scroll, Glyphic Scroll and Tainted Scroll are now undead only from Horde only -UPDATE `quest_template` SET `AllowableRaces` = `AllowableRaces`&~(2|16|32|128|512) WHERE (`ID` IN (3095, 3096, 3097, 3098, 3099)); - --- Remove the prerequisite quest of The Mindless Ones -UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 364); -