Import pending SQL update file...

Referenced commit(s): c7156c787f
This commit is contained in:
AzerothCoreBot
2019-07-29 22:28:08 +00:00
parent c7156c787f
commit 7e3016d7d4
2 changed files with 31 additions and 6 deletions

View File

@@ -0,0 +1,31 @@
-- DB update 2019_07_29_00 -> 2019_07_29_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 = '2019_07_29_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2019_07_29_00 2019_07_29_01 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1563566703983662300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1563566703983662300');
DELETE FROM `waypoint_data` WHERE `id`=1142920 AND `point` IN (33,34);
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(1142920, 33, 5761.59, 597.858, 649.707, 0, 0, 0, 0, 100, 0),
(1142920, 34, 5722.22, 624.876, 646.633, 0, 0, 0, 0, 100, 0);
--
-- END UPDATING QUERIES
--
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -1,6 +0,0 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1563566703983662300');
DELETE FROM `waypoint_data` WHERE `id`=1142920 AND `point` IN (33,34);
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(1142920, 33, 5761.59, 597.858, 649.707, 0, 0, 0, 0, 100, 0),
(1142920, 34, 5722.22, 624.876, 646.633, 0, 0, 0, 0, 100, 0);