Add Server revision to realmd.uptime table

--HG--
branch : trunk
This commit is contained in:
Chaz Brown
2009-09-15 01:09:36 -04:00
parent 6cb428318a
commit c7cc007950
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -209,6 +209,7 @@ CREATE TABLE `uptime` (
`startstring` varchar(64) NOT NULL default '',
`uptime` bigint(20) unsigned NOT NULL default '0',
`maxplayers` smallint(5) unsigned NOT NULL default '0',
`revision` VARCHAR(255) NOT NULL DEFAULT 'Trinitycore',
PRIMARY KEY (`realmid`,`starttime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Uptime system';
+1
View File
@@ -0,0 +1 @@
ALTER TABLE `uptime` ADD COLUMN `revision` VARCHAR(255) NOT NULL DEFAULT 'Trinitycore' AFTER `maxplayers`;
+2 -2
View File
@@ -1600,8 +1600,8 @@ void World::SetInitialWorldSettings()
sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d",
local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec);
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " UI64FMTD ", '%s', 0)",
realmID, uint64(m_startTime), isoDate);
loginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime, revision) VALUES('%u', " UI64FMTD ", '%s', 0, '%s')",
realmID, uint64(m_startTime), isoDate, _FULLVERSION);
static uint32 abtimer = 0;
abtimer = sConfig.GetIntDefault("AutoBroadcast.Timer", 60000);