forked from azerothcore/azerothcore-wotlk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Referenced commit(s): f5d01ba
- Loading branch information
AzerothCoreBot
committed
Mar 27, 2022
1 parent
f5d01ba
commit c9d2c5a
Showing
2 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- DB update 2022_03_27_00 -> 2022_03_27_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_03_27_00'; | ||
IF @COLEXISTS = 0 THEN LEAVE proc; END IF; | ||
START TRANSACTION; | ||
ALTER TABLE version_db_world CHANGE COLUMN 2022_03_27_00 2022_03_27_01 bit; | ||
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1647566741929769300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; | ||
-- | ||
-- START UPDATING QUERIES | ||
-- | ||
|
||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1647566741929769300'); | ||
|
||
SET @LEADERGUID := 84648; | ||
DELETE FROM `creature_formations` WHERE `memberGUID` IN (@LEADERGUID, 84639, 84650); | ||
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES | ||
(@LEADERGUID, @LEADERGUID, 0, 0, 3), | ||
(@LEADERGUID, 84639, 0, 0, 3), | ||
(@LEADERGUID, 84650, 0, 0, 3); | ||
|
||
-- | ||
-- END UPDATING QUERIES | ||
-- | ||
UPDATE version_db_world SET date = '2022_03_27_01' WHERE sql_rev = '1647566741929769300'; | ||
COMMIT; | ||
END // | ||
DELIMITER ; | ||
CALL updateDb(); | ||
DROP PROCEDURE IF EXISTS `updateDb`; |
8 changes: 0 additions & 8 deletions
8
data/sql/updates/pending_db_world/rev_1647566741929769300.sql
This file was deleted.
Oops, something went wrong.