Reputation: 61994
When installing/updating AzerothCore sometimes one encounters errors such as:
[ERROR]: In mysql_stmt_prepare() id: 3, sql:
[ERROR]: Unknown column 'entry' in 'field list'
[ERROR]: Unknown column 'dmg_multiplier' in 'field list'
[ERROR]: Table 'acore_world.graveyard_zone' doesn't exist
[ERROR]: Unknown column 'mindmg' in 'field list'
ERROR: Your database structure is not up to date. Please make sure you've executed all queries in the sql/updates folders.
this usually means the database structure is not up to date.
More specifically, the local DB version is not aligned with the local core version.
This leads to the following questions:
Upvotes: 3
Views: 2636
Reputation: 61994
The latest AzerothCore has now the automated DB updater integrated inside the core.
You just need to enable it via worldserver.conf
by setting:
Updates.EnableDatabases = 7
Then your worldserver
process will automatically update all DBs for you.
You need latest AC to get this feature.
AzerothCore has three databases: auth, characters and world. All of them need to be properly up to date in order to start the server application.
Each database has a table version_db_xxxx
which holds information about the database version inside its last column's name.
version_db_auth
tableversion_db_characters
tableversion_db_world
tableThe database version will be expressed in the format of YYYY_MM_DD_XX
which is basically a date followed by a number (XX
).
This value will be the name of the last column of such tables and it corresponds to the name of the last SQL update file that has been applied to that database.
The SQL update files can be found in the azerothcore-wotlk/data/sql/updates/db_xxxx/
directory (where xxx
is the database name):
https://github.com/azerothcore/azerothcore-wotlk/tree/master/data/sql/updates/db_auth
https://github.com/azerothcore/azerothcore-wotlk/tree/master/data/sql/updates/db_characters
https://github.com/azerothcore/azerothcore-wotlk/tree/master/data/sql/updates/db_world
To make sure the database is up to date, one should compare (per each database):
version_db_xxxx
tabledata/sql/updates/db_xxxx
(most recent in terms of most recent date. If the date is the same, the file having the highest pending number is the most recent)
If the values are the same, then the DB is up to date. Otherwise, the DB needs to be updated by importing all missing SQL update files in order.
Upvotes: 4