From df9c1df33446b479f6be0a351ea0be7f3629ddf5 Mon Sep 17 00:00:00 2001 From: AzerothCoreBot Date: Wed, 7 Oct 2020 10:18:41 +0000 Subject: [PATCH] chore(DB): import pending SQL update file Referenced commit(s): 22f8195c1464448f40c1b75078846d95f48be5b3 --- .../2020_10_07_01.sql} | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) rename data/sql/updates/{pending_db_world/rev_1587680634936830200.sql => db_world/2020_10_07_01.sql} (67%) diff --git a/data/sql/updates/pending_db_world/rev_1587680634936830200.sql b/data/sql/updates/db_world/2020_10_07_01.sql similarity index 67% rename from data/sql/updates/pending_db_world/rev_1587680634936830200.sql rename to data/sql/updates/db_world/2020_10_07_01.sql index 5d30ed04b..f8bfb7e20 100644 --- a/data/sql/updates/pending_db_world/rev_1587680634936830200.sql +++ b/data/sql/updates/db_world/2020_10_07_01.sql @@ -1,6 +1,31 @@ +-- DB update 2020_10_07_00 -> 2020_10_07_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 = '2020_10_07_00'; +IF @COLEXISTS = 0 THEN LEAVE proc; END IF; +START TRANSACTION; +ALTER TABLE version_db_world CHANGE COLUMN 2020_10_07_00 2020_10_07_01 bit; +SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1587680634936830200'; IF OK <> 'FALSE' THEN LEAVE proc; END IF; +-- +-- START UPDATING QUERIES +-- + INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1587680634936830200'); DELETE FROM `creature_template` WHERE `entry`=38440; INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `DamageModifier`, `BaseAttackTime`, `RangeAttackTime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES (38440, 0, 0, 0, 0, 0, 1126, 14501, 0, 0, 'Toravon Whiteout Ground Effect', '', '', 0, 1, 1, 0, 35, 0, 1, 1.14286, 0.3, 0, 0, 0, 0, 0, 1, 2000, 2000, 1, 0, 2048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 128, '', 12340); + +-- +-- END UPDATING QUERIES +-- +COMMIT; +END // +DELIMITER ; +CALL updateDb(); +DROP PROCEDURE IF EXISTS `updateDb`;