mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
*Merged db_version and script_db_version table in one table - by Zor
--HG-- branch : trunk
This commit is contained in:
8
sql/updates/917_world.sql
Normal file
8
sql/updates/917_world.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE `version` (
|
||||
`core_version` varchar(120) default NULL COMMENT 'Core revision dumped at startup.',
|
||||
`db_version` varchar(120) default NULL COMMENT 'Version of world DB.',
|
||||
`script_version` varchar(120) default NULL COMMENT 'Version of scripts DB.'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Version Notes';
|
||||
INSERT INTO version (core_version, db_version, script_version) VALUES ("",(SELECT version FROM db_version),(SELECT version FROM script_db_version));
|
||||
DROP TABLE IF EXISTS db_version;
|
||||
DROP TABLE IF EXISTS script_db_version;
|
||||
@@ -630,7 +630,7 @@ void LoadDatabase()
|
||||
QueryResult *result;
|
||||
|
||||
//Get Version information
|
||||
result = TScriptDB.PQuery("SELECT version FROM script_db_version");
|
||||
result = TScriptDB.PQuery("SELECT script_version FROM version LIMIT 1");
|
||||
|
||||
if (result)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ void LoadDatabase()
|
||||
|
||||
}else
|
||||
{
|
||||
error_log("TSCR: Missing `script_db_version` information.");
|
||||
error_log("TSCR: Missing `version.script_version` information.");
|
||||
outstring_log("");
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ EndScriptData */
|
||||
#define SPELL_WATER_BOLT_VOLLEY 38335
|
||||
#define SPELL_TIDAL_SURGE 38358
|
||||
#define SPELL_TIDAL_SURGE_FREEZE 38357
|
||||
#define SPELL_HEAL 41386
|
||||
#define SPELL_HEAL 38330
|
||||
#define SPELL_SUMMON_CYCLONE 38337
|
||||
#define SPELL_CYCLONE_CYCLONE 29538
|
||||
|
||||
|
||||
@@ -3001,7 +3001,7 @@ void World::UpdateMaxSessionCounters()
|
||||
|
||||
void World::LoadDBVersion()
|
||||
{
|
||||
QueryResult* result = WorldDatabase.Query("SELECT version FROM db_version LIMIT 1");
|
||||
QueryResult* result = WorldDatabase.Query("SELECT db_version FROM version LIMIT 1");
|
||||
if(result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
@@ -458,6 +458,9 @@ bool Master::_StartDB()
|
||||
///- Clean the database before starting
|
||||
clearOnlineAccounts();
|
||||
|
||||
///- Insert version info into DB
|
||||
WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s'", _FULLVERSION);
|
||||
|
||||
sWorld.LoadDBVersion();
|
||||
|
||||
sLog.outString("Using %s", sWorld.GetDBVersion());
|
||||
|
||||
Reference in New Issue
Block a user