From c590cf7c35e118a9e876a0c533a67ba118dc6cc6 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 23 Jan 2020 23:36:13 -0500 Subject: [PATCH 1/6] Let's try updating travis to bionic --- .travis.yml | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index faed5b846..38db9d797 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,18 @@ language: cpp compiler: gcc -dist: trusty +dist: bionic -before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq - - mkdir $HOME/usr - - export PATH="$HOME/usr/bin:$PATH" - - wget https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.sh - - chmod +x cmake-3.11.2-Linux-x86_64.sh - - ./cmake-3.11.2-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license +addons: + apt: + packages: + - libmysqlclient-dev + - libperl-dev + - libboost-dev + - liblua5.1-0-dev + - zlib1g-dev + - uuid-dev + - libssl-dev -install: - - sudo apt-get install -qq g++-7 - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90 - - sudo apt-get install libmysqlclient-dev - - sudo apt-get install libperl-dev - - sudo apt-get install libboost-dev - - sudo apt-get install liblua5.1-0-dev - - sudo apt-get install zlib1g-dev - - sudo apt-get install uuid-dev - - sudo apt-get install libssl-dev script: - cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LOGIN=ON - make -j2 From ff897dc90ab302346a2ca6a50bf83242ca7ea8e4 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 24 Jan 2020 20:36:33 -0500 Subject: [PATCH 2/6] Update CURRENT_BINARY_DATABASE_VERSION --- common/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/version.h b/common/version.h index 0f659d57b..5d00daaf4 100644 --- a/common/version.h +++ b/common/version.h @@ -34,7 +34,7 @@ * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9146 +#define CURRENT_BINARY_DATABASE_VERSION 9147 #ifdef BOTS #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9026 From 2f49266d086e80e8b76150d85c6847bd1fb90caf Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 25 Jan 2020 18:26:59 -0600 Subject: [PATCH 3/6] Fix bots db updates when bins are in bin folder [skip ci] --- utils/scripts/eqemu_server.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 76084f23f..2c769e811 100755 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -2216,11 +2216,18 @@ sub get_bots_db_version { } sub bots_db_management { + + my $world_path = "world"; + if (-e "bin/world") { + $world_path = "bin/world"; + } + + #::: Get Binary DB version if ($OS eq "Windows") { - @db_version = split(': ', `world db_version`); + @db_version = split(': ', `$world_path db_version`); } if ($OS eq "Linux") { - @db_version = split(': ', `./world db_version`); + @db_version = split(': ', `./$world_path db_version`); } #::: Main Binary Database version From 6514ccc41c80edf6ce3dd93156ac4169553018f3 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 25 Jan 2020 18:30:52 -0600 Subject: [PATCH 4/6] Bot updates are killing running regular updates afterwards [skip ci] --- utils/scripts/eqemu_server.pl | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 2c769e811..40762a2bd 100755 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -547,10 +547,7 @@ sub check_for_world_bootup_database_update { sleep(1); bots_db_management(); run_database_check(); - print "[Update] Continuing bootup\n"; analytics_insertion("auto database bots upgrade world", $db . " :: Binary DB Version / Local DB Version :: " . $binary_database_version . " / " . $local_database_version); - - exit; } else { print "[Update] Bots database up to Date: Continuing World Bootup...\n"; From c6ba29f2e5449920bd1c822efe7fb7267cd3d0ed Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 25 Jan 2020 18:41:15 -0600 Subject: [PATCH 5/6] Revert commit until further testing [skip ci] --- utils/scripts/eqemu_server.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/scripts/eqemu_server.pl b/utils/scripts/eqemu_server.pl index 40762a2bd..2c769e811 100755 --- a/utils/scripts/eqemu_server.pl +++ b/utils/scripts/eqemu_server.pl @@ -547,7 +547,10 @@ sub check_for_world_bootup_database_update { sleep(1); bots_db_management(); run_database_check(); + print "[Update] Continuing bootup\n"; analytics_insertion("auto database bots upgrade world", $db . " :: Binary DB Version / Local DB Version :: " . $binary_database_version . " / " . $local_database_version); + + exit; } else { print "[Update] Bots database up to Date: Continuing World Bootup...\n"; From c82d08cf11adc85c0c3edc91852c98c6069bf92c Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 26 Jan 2020 16:31:15 -0600 Subject: [PATCH 6/6] Make sure character soft deletes do not reserve name once deleted, add optional retro script to run for servers who had soft deletes running prior to this commit --- common/database.cpp | 1 + .../git/optional/2020_01_26_soft_delete_retro.sql | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 utils/sql/git/optional/2020_01_26_soft_delete_retro.sql diff --git a/common/database.cpp b/common/database.cpp index f6adc3659..ac5ae16bf 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -371,6 +371,7 @@ bool Database::DeleteCharacter(char *character_name) { UPDATE character_data SET + name = SUBSTRING(CONCAT(name, '-deleted-', UNIX_TIMESTAMP()), 1, 64), deleted_at = NOW() WHERE id = '{}' diff --git a/utils/sql/git/optional/2020_01_26_soft_delete_retro.sql b/utils/sql/git/optional/2020_01_26_soft_delete_retro.sql new file mode 100644 index 000000000..d3d0c7c4b --- /dev/null +++ b/utils/sql/git/optional/2020_01_26_soft_delete_retro.sql @@ -0,0 +1,12 @@ +-- Run this to un-reserve deleted characters +UPDATE + character_data +SET + name = SUBSTRING( + CONCAT(name, '-deleted-', UNIX_TIMESTAMP()), + 1, + 64 + ) +WHERE + deleted_at IS NOT NULL + AND name NOT LIKE '%-deleted-%'; \ No newline at end of file