diff options
| author | leak <leak@bitmx.net> | 2012-03-28 18:37:06 +0200 |
|---|---|---|
| committer | leak <leak@bitmx.net> | 2012-03-28 19:46:38 +0200 |
| commit | 7309ee562195146220b5f048a50af15096759fd3 (patch) | |
| tree | 3b8e8a27bd3d4536eef55f3184b04e4259deca0d /sql/base | |
| parent | 6237ddac34fe40e851dbf052d5911aa8ef076be1 (diff) | |
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
Diffstat (limited to 'sql/base')
| -rw-r--r-- | sql/base/auth_database.sql | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 20bb870ff56..5803529da1e 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -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 |
