fix(Core/DB-Updater): correct world DB update (#9009)
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
-- DB update 2021_11_05_12 -> 2021_11_06_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 = '2021_11_05_12';
|
||||||
|
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
|
||||||
|
START TRANSACTION;
|
||||||
|
ALTER TABLE version_db_world CHANGE COLUMN 2021_11_05_12 2021_11_06_00 bit;
|
||||||
|
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1636218261558574700'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
|
||||||
|
--
|
||||||
|
-- START UPDATING QUERIES
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636218261558574700');
|
||||||
|
|
||||||
|
--
|
||||||
|
-- END UPDATING QUERIES
|
||||||
|
--
|
||||||
|
UPDATE version_db_world SET date = '2021_11_06_00' WHERE sql_rev = '1636218261558574700';
|
||||||
|
COMMIT;
|
||||||
|
END //
|
||||||
|
DELIMITER ;
|
||||||
|
CALL updateDb();
|
||||||
|
DROP PROCEDURE IF EXISTS `updateDb`;
|
||||||
@@ -17,7 +17,7 @@ SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '163605041442388901
|
|||||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636050414423889017');
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636050414423889017');
|
||||||
|
|
||||||
-- Condition for Wind Stone Gossip menu option
|
-- Condition for Wind Stone Gossip menu option
|
||||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (6540,6542,6543) AND `SourceEntry` IN (0,1,2,3,4) AND `SourceId`=0;
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 15 AND `SourceGroup` IN (6540,6542,6543) AND `SourceEntry` IN (0,1,2,3,4) AND `SourceId`=0;
|
||||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
(15, 6540, 0, 0, 0, 1, 0, 24746, 0, 0, 0, 0, 0, '', 'Show gossip menu 6540 option id 0 if target has aura Twilight Cultist Disguise (effect 0).'),
|
(15, 6540, 0, 0, 0, 1, 0, 24746, 0, 0, 0, 0, 0, '', 'Show gossip menu 6540 option id 0 if target has aura Twilight Cultist Disguise (effect 0).'),
|
||||||
(15, 6540, 1, 0, 0, 1, 0, 24746, 0, 0, 0, 0, 0, '', 'Show gossip menu 6540 option id 1 if target has aura Twilight Cultist Disguise (effect 0).'),
|
(15, 6540, 1, 0, 0, 1, 0, 24746, 0, 0, 0, 0, 0, '', 'Show gossip menu 6540 option id 1 if target has aura Twilight Cultist Disguise (effect 0).'),
|
||||||
@@ -62,6 +62,7 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry
|
|||||||
(15, 6543, 4, 0, 0, 1, 0, 24782, 0, 0, 0, 0, 0, '', 'Show gossip menu 6543 option id 4 if target has aura Twilight Cultist Disguise (effect 0).'),
|
(15, 6543, 4, 0, 0, 1, 0, 24782, 0, 0, 0, 0, 0, '', 'Show gossip menu 6543 option id 4 if target has aura Twilight Cultist Disguise (effect 0).'),
|
||||||
(15, 6543, 4, 0, 0, 2, 0, 20448, 1, 0, 0, 0, 0, '', 'Show gossip menu 6543 option id 4 if player has 1 of Scepter of Beckoning: Thunder. Item cannot be in bank.');
|
(15, 6543, 4, 0, 0, 2, 0, 20448, 1, 0, 0, 0, 0, '', 'Show gossip menu 6543 option id 4 if player has 1 of Scepter of Beckoning: Thunder. Item cannot be in bank.');
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- END UPDATING QUERIES
|
-- END UPDATING QUERIES
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '163570007622291300
|
|||||||
|
|
||||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635700076222913000');
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635700076222913000');
|
||||||
|
|
||||||
-- remove sneak from iron guard
|
-- Remove sneak from iron guard
|
||||||
DELETE FROM `creature_addon` WHERE `guid` = 137990;
|
DELETE FROM `creature_addon` WHERE `guid` = 137990;
|
||||||
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `isLarge`, `auras`) VALUES
|
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `isLarge`, `auras`) VALUES
|
||||||
(137990, 1379900, 0, 0, 1, 0, 0, '');
|
(137990, 1379900, 0, 0, 1, 0, 0, '');
|
||||||
|
|
||||||
-- remove "remove sneak" from assassin, this way they drop the sneak on attacking
|
-- Remove "remove sneak" from assassin, this way they drop the sneak on attacking
|
||||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10318;
|
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10318;
|
||||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 10318 AND `source_type` = 0 AND `id` = 1;
|
DELETE FROM `smart_scripts` WHERE `entryorguid` = 10318 AND `source_type` = 0 AND `id` = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635944366683482486');
|
|||||||
|
|
||||||
-- Add missing weapons to Gordunni npcs
|
-- Add missing weapons to Gordunni npcs
|
||||||
DELETE FROM `creature_equip_template` WHERE `CreatureID` IN (5239,5234,5236,5240);
|
DELETE FROM `creature_equip_template` WHERE `CreatureID` IN (5239,5234,5236,5240);
|
||||||
INSERT INTO `creature_equip_template` (`CreatureID`,`ID`,`ItemID1`,`ItemID2`,`ItemID3`,`VerifiedBuild`) VALUES
|
INSERT INTO `creature_equip_template` (`CreatureID`, `ID`, `ItemID1`, `ItemID2`, `ItemID3`, `VerifiedBuild`) VALUES
|
||||||
(5239,1,5304,0,0,0),
|
(5239,1,5304,0,0,0),
|
||||||
(5234,1,1903,2809,0,0),
|
(5234,1,1903,2809,0,0),
|
||||||
(5236,1,1907,0,0,0),
|
(5236,1,1907,0,0,0),
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '163595118786692386
|
|||||||
|
|
||||||
-- add revision
|
-- add revision
|
||||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635951187866923861');
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635951187866923861');
|
||||||
|
|
||||||
-- add orientation` and delay into existing wp table
|
-- add orientation` and delay into existing wp table
|
||||||
ALTER TABLE `waypoints` ADD COLUMN `orientation` FLOAT DEFAULT 0 NOT NULL AFTER `position_z`, ADD COLUMN `delay` INT UNSIGNED DEFAULT 0 NOT NULL AFTER `orientation`;
|
ALTER TABLE `waypoints` ADD COLUMN `orientation` FLOAT DEFAULT 0 NOT NULL AFTER `position_z`, ADD COLUMN `delay` INT UNSIGNED DEFAULT 0 NOT NULL AFTER `orientation`;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '163620618767619340
|
|||||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636206187676193400');
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636206187676193400');
|
||||||
|
|
||||||
-- Fix equipment for Southsea Swashbuckler
|
-- Fix equipment for Southsea Swashbuckler
|
||||||
UPDATE `creature_equip_template` SET `ItemID1`=1897, `ItemID2`=0 WHERE `CreatureID`=7858;
|
UPDATE `creature_equip_template` SET `ItemID1`= 1897, `ItemID2`=0 WHERE `CreatureID`=7858;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- END UPDATING QUERIES
|
-- END UPDATING QUERIES
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '163620694354037610
|
|||||||
|
|
||||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636206943540376100');
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1636206943540376100');
|
||||||
|
|
||||||
ALTER TABLE `updates` CHANGE `state` `state` ENUM('RELEASED','CUSTOM','MODULE','ARCHIVED') CHARSET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'RELEASED' NOT NULL COMMENT 'defines if an update is released or archived.';
|
ALTER TABLE `updates`
|
||||||
|
CHANGE `state` `state` ENUM('RELEASED','CUSTOM','MODULE','ARCHIVED') CHARSET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'RELEASED' NOT NULL COMMENT 'defines if an update is released or archived.';
|
||||||
|
|
||||||
--
|
--
|
||||||
-- END UPDATING QUERIES
|
-- END UPDATING QUERIES
|
||||||
|
|||||||
Reference in New Issue
Block a user