diff --git a/apps/db_pendings/import.sh b/apps/db_pendings/import.sh index 40d68e83f..fb5e3d872 100644 --- a/apps/db_pendings/import.sh +++ b/apps/db_pendings/import.sh @@ -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"; diff --git a/data/sql/updates/db_world/2021_05_30_02.sql b/data/sql/updates/db_world/2021_05_30_02.sql index 906fceacf..d2583b3b1 100644 --- a/data/sql/updates/db_world/2021_05_30_02.sql +++ b/data/sql/updates/db_world/2021_05_30_02.sql @@ -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 ; diff --git a/data/sql/updates/db_world/2021_05_30_03.sql b/data/sql/updates/db_world/2021_05_30_03.sql index 684db0479..341757384 100644 --- a/data/sql/updates/db_world/2021_05_30_03.sql +++ b/data/sql/updates/db_world/2021_05_30_03.sql @@ -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 ;