chore(DB): import pending SQL update file

Referenced commit(s): 46f4b9ed13
This commit is contained in:
AzerothCoreBot
2020-11-24 16:19:36 +00:00
parent 46f4b9ed13
commit 3f7f41089c
2 changed files with 30 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
-- DB update 2020_11_23_01 -> 2020_11_24_00
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_11_23_01';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2020_11_23_01 2020_11_24_00 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1605488437069394200'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1605488437069394200');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = 15998;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 15998, 0, 0, 29, 0, 10221, 3, 0, 0, 0, 0, '', 'Empty Worg Pup Cage requires Bloodaxe Worg Pup (3y)');
--
-- 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 ('1605488437069394200');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = 15998;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 15998, 0, 0, 29, 0, 10221, 3, 0, 0, 0, 0, '', 'Empty Worg Pup Cage requires Bloodaxe Worg Pup (3y)');