Skip to content

Commit

Permalink
chore(DB): import pending files
Browse files Browse the repository at this point in the history
Referenced commit(s): 623c3f1
  • Loading branch information
AzerothCoreBot committed Mar 6, 2022
1 parent 623c3f1 commit b57ee3e
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
-- DB update 2022_03_06_13 -> 2022_03_06_14
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_06_13';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_03_06_13 2022_03_06_14 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1646089487915555800'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--

INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1646089487915555800');

SET @NPC := 849;
Expand Down Expand Up @@ -78,3 +94,13 @@ INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `positio
(@PATH, 10, -12309.3, -908.34, 8.68362, 0, 0),
(@PATH, 11, -12330.2, -933.855, 9.33679, 0, 0),
(@PATH, 12, -12351.4, -969, 13.033, 0, 0);

--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_03_06_14' WHERE sql_rev = '1646089487915555800';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

0 comments on commit b57ee3e

Please sign in to comment.