From 10cb4941fb20c7ce153e43ab72ddf5f0dfc216c0 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 11 Jun 2018 19:38:48 +0000 Subject: [PATCH] Importing pending sql --- .../2018_06_11_00.sql} | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) rename data/sql/updates/{pending_db_world/rev_1528726462349010200.sql => db_world/2018_06_11_00.sql} (66%) diff --git a/data/sql/updates/pending_db_world/rev_1528726462349010200.sql b/data/sql/updates/db_world/2018_06_11_00.sql similarity index 66% rename from data/sql/updates/pending_db_world/rev_1528726462349010200.sql rename to data/sql/updates/db_world/2018_06_11_00.sql index afbef4386..c7e33c3f4 100644 --- a/data/sql/updates/pending_db_world/rev_1528726462349010200.sql +++ b/data/sql/updates/db_world/2018_06_11_00.sql @@ -1,3 +1,19 @@ +-- DB update 2018_06_07_00 -> 2018_06_11_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 = '2018_06_07_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2018_06_07_00 2018_06_11_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1528726462349010200'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO version_db_world (`sql_rev`) VALUES ('1528726462349010200'); UPDATE `event_scripts` SET `x`= -12132.446289, `y`=964.982422, `z`= 5.194236, `o`= 5.130559 WHERE `id`=10554; SET @ENTRY := 17207; @@ -10,4 +26,12 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type DELETE FROM `creature_text` WHERE `entry`=17207; INSERT INTO `creature_text` (`entry`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES -(17207, 0, 0, 'Who challenges Naias? Puny $r, you are little better than those mindless trolls I have played against each other like so many pieces on a game board!', 12, 0, 100, 0, 0, 0, 13560, 0, 'Naias'); \ No newline at end of file +(17207, 0, 0, 'Who challenges Naias? Puny $r, you are little better than those mindless trolls I have played against each other like so many pieces on a game board!', 12, 0, 100, 0, 0, 0, 13560, 0, 'Naias'); +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;