mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-18 01:34:33 +00:00
feat(Core/DBUpdater): implement db auto update (#6576)
* feat(Core/DBUpdater): implement db auto update * 1 * 2 * 3 * Some minor improvements * add find bin for mysql 8.0 * lic Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -55,6 +55,7 @@ private:
|
||||
enum State
|
||||
{
|
||||
RELEASED,
|
||||
CUSTOM,
|
||||
ARCHIVED
|
||||
};
|
||||
|
||||
@@ -64,21 +65,33 @@ private:
|
||||
: name(name_), hash(hash_), state(state_), timestamp(timestamp_) { }
|
||||
|
||||
std::string const name;
|
||||
|
||||
std::string const hash;
|
||||
|
||||
State const state;
|
||||
|
||||
uint64 const timestamp;
|
||||
|
||||
static inline State StateConvert(std::string const& state)
|
||||
{
|
||||
return (state == "RELEASED") ? RELEASED : ARCHIVED;
|
||||
if (state == "RELEASED")
|
||||
return RELEASED;
|
||||
else if (state == "CUSTOM")
|
||||
return CUSTOM;
|
||||
|
||||
return ARCHIVED;
|
||||
}
|
||||
|
||||
static inline std::string StateConvert(State const state)
|
||||
{
|
||||
return (state == RELEASED) ? "RELEASED" : "ARCHIVED";
|
||||
switch (state)
|
||||
{
|
||||
case RELEASED:
|
||||
return "RELEASED";
|
||||
case CUSTOM:
|
||||
return "CUSTOM";
|
||||
case ARCHIVED:
|
||||
return "ARCHIVED";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetStateAsString() const
|
||||
|
||||
Reference in New Issue
Block a user