Fixed a few problems with SQL databases (#6242)

Fixes #6202
Follow up to 6b84115

Thanks to @bgamez23
This commit is contained in:
Lemongrass3110
2021-09-27 15:02:13 +02:00
committed by GitHub
parent 6672bfc490
commit 029d8dff9b
16 changed files with 181 additions and 144 deletions

View File

@@ -139,9 +139,11 @@ bool process( const std::string& type, uint32 version, const std::vector<std::st
const std::string to = "sql-files/" + to_table + ".sql";
if( fileExists( from ) ){
#ifndef CONVERT_ALL
if( !askConfirmation( "Found the file \"%s\", which can be converted to sql.\nDo you want to convert it now? (Y/N)\n", from.c_str() ) ){
continue;
}
#endif
inNode.reset();
@@ -156,11 +158,13 @@ bool process( const std::string& type, uint32 version, const std::vector<std::st
if (!inNode["Body"].IsDefined())
continue;
#ifndef CONVERT_ALL
if (fileExists(to)) {
if (!askConfirmation("The file \"%s\" already exists.\nDo you want to replace it? (Y/N)\n", to.c_str())) {
continue;
}
}
#endif
out.open(to);