mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8441] Implement check DBs versions (required_* fields) at mangosd/realmd loading.
* git_id updated to generate revision_sql.h file with required_* fields strings. * mangosd/realmd changed to include header and check this strings at startup. * mangosd/realmd will terminated if related strings not match in DB content. In most cases this meaning that not all expected sql updates applied. Current required_* field stored in DB output in error to help find what last sql updates applied. IMPORTNAT NOTE for mangos devs: please update used git_id before adding next commits with sql updates!
This commit is contained in:
parent
c9f475dfa0
commit
8a7b77c088
7 changed files with 111 additions and 7 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include "SystemConfig.h"
|
||||
#include "revision.h"
|
||||
#include "revision_nr.h"
|
||||
#include "revision_sql.h"
|
||||
#include "Util.h"
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
|
@ -325,6 +326,9 @@ bool StartDB(std::string &dbstring)
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!loginDatabase.CheckRequiredField("realmd_db_version",REVISION_DB_REALMD))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue