chore(DB): import pending files

Referenced commit(s): cf5ee62b70
This commit is contained in:
AzerothCoreBot
2022-01-22 15:48:41 +00:00
parent cf5ee62b70
commit e9965ebbd8
2 changed files with 49 additions and 23 deletions

View File

@@ -0,0 +1,49 @@
-- DB update 2022_01_22_00 -> 2022_01_22_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 = '2022_01_22_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_01_22_00 2022_01_22_01 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1641999047507916400'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641999047507916400');
DELETE FROM `creature_formations` WHERE (`leaderGUID` IN (137960, 137956, 137852, 137977));
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES
(137960, 137960, 0, 0, 3),
(137960, 137978, 0, 0, 3),
(137960, 137858, 0, 0, 3),
(137960, 137985, 0, 0, 3),
(137956, 137956, 0, 0, 3),
(137956, 137996, 0, 0, 3),
(137956, 137862, 0, 0, 3),
(137956, 137857, 0, 0, 3),
(137956, 137965, 0, 0, 3),
(137852, 137852, 0, 0, 3),
(137852, 137995, 0, 0, 3),
(137852, 137850, 0, 0, 3),
(137852, 137989, 0, 0, 3),
(137977, 137977, 0, 0, 3),
(137977, 137964, 0, 0, 3),
(137977, 137853, 0, 0, 3);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_01_22_01' WHERE sql_rev = '1641999047507916400';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -1,23 +0,0 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1641999047507916400');
DELETE FROM `creature_formations` WHERE (`leaderGUID` IN (137960, 137956, 137852, 137977));
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES
(137960, 137960, 0, 0, 3),
(137960, 137978, 0, 0, 3),
(137960, 137858, 0, 0, 3),
(137960, 137985, 0, 0, 3),
(137956, 137956, 0, 0, 3),
(137956, 137996, 0, 0, 3),
(137956, 137862, 0, 0, 3),
(137956, 137857, 0, 0, 3),
(137956, 137965, 0, 0, 3),
(137852, 137852, 0, 0, 3),
(137852, 137995, 0, 0, 3),
(137852, 137850, 0, 0, 3),
(137852, 137989, 0, 0, 3),
(137977, 137977, 0, 0, 3),
(137977, 137964, 0, 0, 3),
(137977, 137853, 0, 0, 3);