Import pending SQL update file...

Referenced commit(s): 807005ae25
This commit is contained in:
AzerothCoreBot
2020-05-14 23:04:36 +00:00
parent 807005ae25
commit 4a402d6dcd
2 changed files with 30 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
-- DB update 2020_05_14_00 -> 2020_05_14_01
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_14_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2020_05_14_00 2020_05_14_01 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1586480454432011500'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1586480454432011500');
DELETE FROM `command` WHERE `name`='cheat explore';
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('cheat explore', 2, 'Syntax: .cheat explore #flag\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.');
--
-- END UPDATING QUERIES
--
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -1,5 +0,0 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1586480454432011500');
DELETE FROM `command` WHERE `name`='cheat explore';
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('cheat explore', 2, 'Syntax: .cheat explore #flag\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.');