summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAzerothCoreBot <azerothcorebot@gmail.com>2020-11-24 16:19:36 +0000
committerAzerothCoreBot <azerothcorebot@gmail.com>2020-11-24 16:19:36 +0000
commit3f7f41089c500bc5fed79dfeb5e2a2b3f97e7d32 (patch)
treeffc04ecef1550e2aeda6bfb58149dfa101d4ed4d /data
parent46f4b9ed1341e687d04e7fd16e35481a74e44b89 (diff)
chore(DB): import pending SQL update file
Referenced commit(s): 46f4b9ed1341e687d04e7fd16e35481a74e44b89
Diffstat (limited to 'data')
-rw-r--r--data/sql/updates/db_world/2020_11_24_00.sql30
-rw-r--r--data/sql/updates/pending_db_world/rev_1605488437069394200.sql5
2 files changed, 30 insertions, 5 deletions
diff --git a/data/sql/updates/db_world/2020_11_24_00.sql b/data/sql/updates/db_world/2020_11_24_00.sql
new file mode 100644
index 0000000000..e4bddff64e
--- /dev/null
+++ b/data/sql/updates/db_world/2020_11_24_00.sql
@@ -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`;
diff --git a/data/sql/updates/pending_db_world/rev_1605488437069394200.sql b/data/sql/updates/pending_db_world/rev_1605488437069394200.sql
deleted file mode 100644
index 882412c41f..0000000000
--- a/data/sql/updates/pending_db_world/rev_1605488437069394200.sql
+++ /dev/null
@@ -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)');