From 3d34d799a6a9cd76044bbe5e9c895c43bf6119f7 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Sun, 24 Nov 2019 08:46:12 +0000 Subject: [PATCH] Import pending SQL update file... Referenced commit(s): da6c255a7074b7ccb09156ea8c4711b31b2fc865 --- .../2019_11_24_00.sql} | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) rename data/sql/updates/{pending_db_world/rev_1572032036915466688.sql => db_world/2019_11_24_00.sql} (54%) diff --git a/data/sql/updates/pending_db_world/rev_1572032036915466688.sql b/data/sql/updates/db_world/2019_11_24_00.sql similarity index 54% rename from data/sql/updates/pending_db_world/rev_1572032036915466688.sql rename to data/sql/updates/db_world/2019_11_24_00.sql index ca502ad9a..6dbff7eb3 100644 --- a/data/sql/updates/pending_db_world/rev_1572032036915466688.sql +++ b/data/sql/updates/db_world/2019_11_24_00.sql @@ -1,3 +1,19 @@ +-- DB update 2019_11_20_00 -> 2019_11_24_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 = '2019_11_20_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2019_11_20_00 2019_11_24_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1572032036915466688'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1572032036915466688'); DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 24 AND `SourceEntry` IN (48539,48544,48545); @@ -5,3 +21,12 @@ INSERT INTO `conditions`(`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry` (24, 0, 48539, 0, 0, 1, 1, 70405, 0, 0, 1, 0, 0, '', 'Revitalize (Rank 1) - cannot proc if target has Mutated abomination aura ICC - 10 or 25'), (24, 0, 48544, 0, 0, 1, 1, 70405, 0, 0, 1, 0, 0, '', 'Revitalize (Rank 2) - cannot proc if target has Mutated abomination aura ICC - 10 or 25'), (24, 0, 48545, 0, 0, 1, 1, 70405, 0, 0, 1, 0, 0, '', 'Revitalize (Rank 3) - cannot proc if target has Mutated abomination aura ICC - 10 or 25'); + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;