From 9683dc79286ed7c469678528e8fc03fea95b4abe Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Wed, 26 Dec 2012 23:37:48 -0500 Subject: [PATCH] New database script --- database.sql | 139 +++++++++++++++++++++------------------------------ 1 file changed, 56 insertions(+), 83 deletions(-) diff --git a/database.sql b/database.sql index 1a516bd..69e22e3 100644 --- a/database.sql +++ b/database.sql @@ -1,10 +1,5 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; - --- -------------------------------------------------------- - --- --- Table structure for table `banned` --- +SET time_zone = "+00:00"; DROP TABLE IF EXISTS `banned`; CREATE TABLE IF NOT EXISTS `banned` ( @@ -16,7 +11,7 @@ CREATE TABLE IF NOT EXISTS `banned` ( `pic_url` tinytext NOT NULL, `ip` varchar(30) NOT NULL, `port` smallint(5) unsigned NOT NULL, - `version` smallint(3) unsigned NOT NULL, + `version` varchar(80) NOT NULL, `time` int(10) unsigned NOT NULL, `info` text NOT NULL, `oncount` int(11) unsigned NOT NULL DEFAULT '1', @@ -30,82 +25,7 @@ CREATE TABLE IF NOT EXISTS `banned` ( PRIMARY KEY (`id`), KEY `uid` (`uid`), KEY `online` (`online`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `servers` --- - -DROP TABLE IF EXISTS `servers`; -CREATE TABLE IF NOT EXISTS `servers` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `uid` mediumint(8) unsigned NOT NULL, - `uname` varchar(80) NOT NULL, - `online` tinyint(1) unsigned NOT NULL DEFAULT '1', - `name` tinytext NOT NULL, - `pic_url` tinytext NOT NULL, - `ip` varchar(30) NOT NULL, - `port` smallint(5) unsigned NOT NULL, - `version` smallint(3) unsigned NOT NULL, - `time` int(10) unsigned NOT NULL, - `info` text NOT NULL, - `oncount` int(11) unsigned NOT NULL DEFAULT '1', - `totalcount` int(11) unsigned NOT NULL DEFAULT '1', - `uptime` tinyint(3) unsigned NOT NULL DEFAULT '100', - `ipaddress` varchar(15) NOT NULL, - `sponsored` smallint(5) unsigned NOT NULL DEFAULT '0', - `rs_name` tinytext NOT NULL, - `rs_pass` tinytext NOT NULL, - `vote` int(11) NOT NULL DEFAULT '0', - `key` varchar(15) NOT NULL, - `verified` tinyint(1) unsigned NOT NULL DEFAULT '0', - `added` tinyint(1) unsigned NOT NULL DEFAULT '0', - `banned` tinyint(1) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `online` (`online`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `toadd` --- - -DROP TABLE IF EXISTS `toadd`; -CREATE TABLE IF NOT EXISTS `toadd` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `uid` mediumint(8) unsigned NOT NULL, - `uname` varchar(80) NOT NULL, - `online` tinyint(1) unsigned NOT NULL DEFAULT '1', - `name` tinytext NOT NULL, - `pic_url` tinytext NOT NULL, - `ip` varchar(30) NOT NULL, - `port` smallint(5) unsigned NOT NULL, - `version` smallint(3) unsigned NOT NULL, - `time` int(10) unsigned NOT NULL, - `info` text NOT NULL, - `oncount` int(11) unsigned NOT NULL DEFAULT '1', - `totalcount` int(11) unsigned NOT NULL DEFAULT '1', - `uptime` tinyint(3) unsigned NOT NULL DEFAULT '100', - `ipaddress` varchar(15) NOT NULL, - `sponsored` smallint(5) unsigned NOT NULL DEFAULT '0', - `rs_name` tinytext NOT NULL, - `rs_pass` tinytext NOT NULL, - `key` varchar(15) NOT NULL, - `verified` tinyint(1) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `uid` (`uid`), - KEY `online` (`online`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- Table structure for table `log_voted` --- +) ENGINE=MyISAM DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `log_voted`; CREATE TABLE IF NOT EXISTS `log_voted` ( @@ -118,4 +38,57 @@ CREATE TABLE IF NOT EXISTS `log_voted` ( `op` char(1) NOT NULL, PRIMARY KEY (`id`), KEY `uid` (`uid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `servers`; +CREATE TABLE IF NOT EXISTS `servers` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `uid` mediumint(8) unsigned NOT NULL, + `uname` varchar(80) NOT NULL, + `online` tinyint(1) unsigned NOT NULL DEFAULT '1', + `name` tinytext NOT NULL, + `pic_url` tinytext NOT NULL, + `ip` varchar(30) NOT NULL, + `port` smallint(5) unsigned NOT NULL, + `version` varchar(80) NOT NULL, + `time` int(10) unsigned NOT NULL, + `info` text NOT NULL, + `oncount` int(11) unsigned NOT NULL DEFAULT '1', + `totalcount` int(11) unsigned NOT NULL DEFAULT '1', + `uptime` tinyint(3) unsigned NOT NULL DEFAULT '100', + `ipaddress` varchar(15) NOT NULL, + `sponsored` smallint(5) unsigned NOT NULL DEFAULT '0', + `rs_name` tinytext NOT NULL, + `rs_pass` tinytext NOT NULL, + `vote` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `uid` (`uid`), + KEY `online` (`online`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +DROP TABLE IF EXISTS `toadd`; +CREATE TABLE IF NOT EXISTS `toadd` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `uid` mediumint(8) unsigned NOT NULL, + `uname` varchar(80) NOT NULL, + `online` tinyint(1) unsigned NOT NULL DEFAULT '1', + `name` tinytext NOT NULL, + `pic_url` tinytext NOT NULL, + `ip` varchar(30) NOT NULL, + `port` smallint(5) unsigned NOT NULL, + `version` varchar(80) NOT NULL, + `time` int(10) unsigned NOT NULL, + `info` text NOT NULL, + `oncount` int(11) unsigned NOT NULL DEFAULT '1', + `totalcount` int(11) unsigned NOT NULL DEFAULT '1', + `uptime` tinyint(3) unsigned NOT NULL DEFAULT '100', + `ipaddress` varchar(15) NOT NULL, + `sponsored` smallint(5) unsigned NOT NULL DEFAULT '0', + `rs_name` tinytext NOT NULL, + `rs_pass` tinytext NOT NULL, + `key` varchar(15) NOT NULL, + `verified` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `uid` (`uid`), + KEY `online` (`online`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;