From d1e83f6e3d6255802e123845f3377685d9b78695 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Thu, 28 May 2020 11:25:43 +0000 Subject: [PATCH] Import pending SQL update file... Referenced commit(s): 027c42fdec66de82aac036d5071aacaf707d3312 --- .../2020_05_28_00.sql} | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) rename data/sql/updates/{pending_db_world/rev_1588099547971545300.sql => db_world/2020_05_28_00.sql} (63%) diff --git a/data/sql/updates/pending_db_world/rev_1588099547971545300.sql b/data/sql/updates/db_world/2020_05_28_00.sql similarity index 63% rename from data/sql/updates/pending_db_world/rev_1588099547971545300.sql rename to data/sql/updates/db_world/2020_05_28_00.sql index 53568d0d1..17f5c4071 100644 --- a/data/sql/updates/pending_db_world/rev_1588099547971545300.sql +++ b/data/sql/updates/db_world/2020_05_28_00.sql @@ -1,3 +1,19 @@ +-- DB update 2020_05_25_00 -> 2020_05_28_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 = '2020_05_25_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2020_05_25_00 2020_05_28_00 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1588099547971545300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1588099547971545300'); UPDATE `command` SET `name` = "lookup teleport", `help` = "Syntax: .lookup teleport $substring\r\nSearch and output all .teleport command locations with provide $substring in name." WHERE `name` = "lookup tele"; @@ -6,3 +22,12 @@ UPDATE `command` SET `name` = "teleport add", `help` = "Syntax: .teleport add $n UPDATE `command` SET `name` = "teleport del", `help` = "Syntax: .teleport del $name\r\nRemove location with name $name for .teleport command locations list." WHERE `name` = "tele del"; UPDATE `command` SET `name` = "teleport group", `help` = "Syntax: .teleport group#location\r\nTeleport a selected player and his group members to a given location." WHERE `name` = "tele group"; UPDATE `command` SET `name` = "teleport name", `help` = "Syntax: .teleport name [#playername] #location\r\nTeleport the given character to a given location. Character can be offline.\r\nTo teleport to homebind, set #location to \"$home\" (without quotes)." WHERE `name` = "tele name"; + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;