chore(DB): import pending files

Referenced commit(s): e6b1201e50
This commit is contained in:
AzerothCoreBot
2021-09-24 17:53:21 +00:00
parent e6b1201e50
commit 21dafe62cd

View File

@@ -1,3 +1,19 @@
-- DB update 2021_09_24_01 -> 2021_09_24_02
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 = '2021_09_24_01';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2021_09_24_01 2021_09_24_02 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1631783274789936800'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1631783274789936800');
-- Warning fixes
@@ -15,3 +31,13 @@ update creature_formations set angle=0, dist=0 where leaderGUID=134952 and membe
update creature_formations set groupAI = 1 | 2 where leaderGUID=85221 and memberGUID=85221;
update creature_formations set groupAI = 1 | 2 where leaderGUID=114937 and memberGUID=114937;
update creature_formations set groupAI = 1 | 2 where leaderGUID=248035 and memberGUID != 248035;
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2021_09_24_02' WHERE sql_rev = '1631783274789936800';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;