mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
chore(import-sql): fix update (#6139)
* Update import.sh * Update 2021_05_30_03.sql * Update 2021_05_30_02.sql * Update import.sh * Update import.sh * Update 2021_05_30_02.sql * Update 2021_05_30_03.sql
This commit is contained in:
@@ -44,8 +44,6 @@ function import() {
|
||||
|
||||
startTransaction="START TRANSACTION;";
|
||||
updHeader="ALTER TABLE version_db_"$db" CHANGE COLUMN "$oldVer" "$newVer" bit;";
|
||||
updDate="UPDATE version_db_"$db" SET date = '"$newVer"' WHERE sql_rev = '"$rev"';";
|
||||
|
||||
endTransaction="COMMIT;";
|
||||
|
||||
newFile="$updPath/"$dateToday"_"$cnt".sql"
|
||||
@@ -75,7 +73,6 @@ function import() {
|
||||
|
||||
echo "$startTransaction" >> "$newFile";
|
||||
echo "$updHeader" >> "$newFile";
|
||||
echo "$updDate" >> "$newFile";
|
||||
|
||||
if [[ $isRev -eq 1 ]]; then
|
||||
echo "SELECT sql_rev INTO OK FROM version_db_"$db" WHERE sql_rev = '$rev'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;" >> "$newFile";
|
||||
@@ -92,6 +89,7 @@ function import() {
|
||||
echo "--" >> "$newFile";
|
||||
echo "-- END UPDATING QUERIES" >> "$newFile";
|
||||
echo "--" >> "$newFile";
|
||||
echo "UPDATE version_db_"$db" SET date = '"$newVer"' WHERE sql_rev = '"$rev"';" >> "$newFile";
|
||||
|
||||
echo "$endTransaction" >> "$newFile";
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_N
|
||||
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
|
||||
START TRANSACTION;
|
||||
ALTER TABLE version_db_world CHANGE COLUMN 2021_05_30_01 2021_05_30_02 bit;
|
||||
UPDATE version_db_world SET date = '2021_05_30_02' WHERE sql_rev = '';
|
||||
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1621659447273280925'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
|
||||
--
|
||||
-- START UPDATING QUERIES
|
||||
@@ -28,6 +27,7 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `Q
|
||||
--
|
||||
-- END UPDATING QUERIES
|
||||
--
|
||||
UPDATE version_db_world SET date = '2021_05_30_02' WHERE sql_rev = '1621659447273280925';
|
||||
COMMIT;
|
||||
END //
|
||||
DELIMITER ;
|
||||
|
||||
@@ -9,7 +9,6 @@ WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_N
|
||||
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
|
||||
START TRANSACTION;
|
||||
ALTER TABLE version_db_world CHANGE COLUMN 2021_05_30_02 2021_05_30_03 bit;
|
||||
UPDATE version_db_world SET date = '2021_05_30_03' WHERE sql_rev = '';
|
||||
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1621718778456057300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
|
||||
--
|
||||
-- START UPDATING QUERIES
|
||||
@@ -24,6 +23,7 @@ INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||
--
|
||||
-- END UPDATING QUERIES
|
||||
--
|
||||
UPDATE version_db_world SET date = '2021_05_30_03' WHERE sql_rev = '1621718778456057300';
|
||||
COMMIT;
|
||||
END //
|
||||
DELIMITER ;
|
||||
|
||||
Reference in New Issue
Block a user