mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
feat(Core/DryRun): add support db autoupdate for DryRun (#9572)
This commit is contained in:
@@ -173,10 +173,13 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool)
|
||||
LOG_WARN("sql.updates", "Database \"{}\" does not exist, do you want to create it? [yes (default) / no]: ",
|
||||
pool.GetConnectionInfo()->database);
|
||||
|
||||
std::string answer;
|
||||
std::getline(std::cin, answer);
|
||||
if (!answer.empty() && !(answer.substr(0, 1) == "y"))
|
||||
return false;
|
||||
if (!sConfigMgr->isDryRun())
|
||||
{
|
||||
std::string answer;
|
||||
std::getline(std::cin, answer);
|
||||
if (!answer.empty() && !(answer.substr(0, 1) == "y"))
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG_INFO("sql.updates", "Creating database \"{}\"...", pool.GetConnectionInfo()->database);
|
||||
|
||||
@@ -192,7 +195,6 @@ bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool)
|
||||
}
|
||||
|
||||
file << "CREATE DATABASE `" << pool.GetConnectionInfo()->database << "` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_general_ci;\n\n";
|
||||
|
||||
file.close();
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user