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:
Kitzunu
2021-05-31 01:01:30 +02:00
committed by GitHub
parent f25a47715a
commit 268fa40c75
3 changed files with 3 additions and 5 deletions

View File

@@ -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";

View File

@@ -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 ;

View File

@@ -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 ;