SQL: Auth db data type cleanup logs, realmcharacters, realmlist, uptime / Storage engine switched to InnoDB Note:

As for the redundant `uptime`.`startstring` being removed, this page might be of interest how to generate time strings from unix timestamps
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_from-unixtime
This commit is contained in:
leak
2012-03-28 18:37:06 +02:00
parent 6237ddac34
commit 7309ee5621
9 changed files with 48 additions and 36 deletions

View File

@@ -140,11 +140,11 @@ DROP TABLE IF EXISTS `logs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `logs` (
`time` int(14) NOT NULL,
`realm` int(4) NOT NULL,
`type` int(4) NOT NULL,
`string` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
`time` int(10) unsigned NOT NULL,
`realm` int(10) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`string` text CHARACTER SET latin1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -164,12 +164,12 @@ DROP TABLE IF EXISTS `realmcharacters`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `realmcharacters` (
`realmid` int(11) unsigned NOT NULL DEFAULT '0',
`acctid` bigint(20) unsigned NOT NULL,
`realmid` int(10) unsigned NOT NULL DEFAULT '0',
`acctid` int(10) unsigned NOT NULL,
`numchars` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`realmid`,`acctid`),
KEY `acctid` (`acctid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm Character Tracker';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Realm Character Tracker';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -189,19 +189,19 @@ DROP TABLE IF EXISTS `realmlist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `realmlist` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL DEFAULT '',
`address` varchar(32) NOT NULL DEFAULT '127.0.0.1',
`port` int(11) NOT NULL DEFAULT '8085',
`address` varchar(15) NOT NULL DEFAULT '127.0.0.1',
`port` smallint(5) unsigned NOT NULL DEFAULT '8085',
`icon` tinyint(3) unsigned NOT NULL DEFAULT '0',
`flag` tinyint(3) unsigned NOT NULL DEFAULT '2',
`timezone` tinyint(3) unsigned NOT NULL DEFAULT '0',
`allowedSecurityLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
`population` float unsigned NOT NULL DEFAULT '0',
`gamebuild` int(11) unsigned NOT NULL DEFAULT '12340',
`gamebuild` int(10) unsigned NOT NULL DEFAULT '12340',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Realm System';
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Realm System';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -222,14 +222,13 @@ DROP TABLE IF EXISTS `uptime`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `uptime` (
`realmid` int(11) unsigned NOT NULL,
`starttime` bigint(20) unsigned NOT NULL DEFAULT '0',
`startstring` varchar(64) NOT NULL DEFAULT '',
`uptime` bigint(20) unsigned NOT NULL DEFAULT '0',
`realmid` int(10) unsigned NOT NULL,
`starttime` int(10) unsigned NOT NULL DEFAULT '0',
`uptime` int(10) 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';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Uptime system';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -250,4 +249,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2012-03-28 16:44:39
-- Dump completed on 2012-03-28 18:26:06