Fixed upgrade command

This commit is contained in:
WolverinDEV 2020-07-31 19:42:40 +02:00
parent eab2155384
commit 7aa37e40b9
1 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,10 @@ inline bool execute_commands(sql::SqlManager* sql, std::string& error, const std
for(const auto& cmd : commands) {
std::string command{cmd};
command.erase(command.begin(), std::find_if(command.begin(), command.end(), [](int ch) {
return !std::isspace(ch);
}));
if(command.starts_with("[INSERT_OR_IGNORE]"))
command = insert_or_ignore + command.substr(18);