
CREATE TABLE `{TableModPre}comment` (
  `id` int(11) NOT NULL auto_increment,
  `appid` varchar(20) NOT NULL,
  `fid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `account` varchar(20) NOT NULL,
  `state` int(11) NOT NULL,
  `rate` tinyint(4) NOT NULL,
  `event` tinyint(4) NOT NULL,
  `extra` tinyint(4) NOT NULL,
  `extrb` tinyint(4) NOT NULL,
  `extrc` tinyint(4) NOT NULL,
  `extrd` tinyint(4) NOT NULL,
  `price` smallint(6) NOT NULL,
  `tags` varchar(100) default NULL,
  `question` text NOT NULL,
  `site_answer` varchar(255) default NULL,
  `site_dateline` int(11) default NULL,
  `host_answer` varchar(255) default NULL,
  `host_dateline` int(11) default NULL,
  `dateline` int(11) NOT NULL,
  `modify` int(11) NOT NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `appid` (`appid`),
  KEY `fid` (`fid`),
  KEY `uid` (`uid`),
  KEY `tags` (`tags`),
  KEY `rate` (`rate`),
  KEY `event` (`event`),
  KEY `state` (`state`),
  KEY `modify` (`modify`)
) ENGINE=MyISAM;

CREATE TABLE `{TableModPre}category` (
  `id` int(11) NOT NULL auto_increment,
  `appid` varchar(30) NOT NULL,
  `name` varchar(100) NOT NULL,
  `mark` varchar(30) default NULL,
  `title` varchar(100) NOT NULL,
  `keywords` varchar(500) NOT NULL,
  `description` varchar(1000) NOT NULL,
  `config` text NOT NULL,
  `mode` tinyint(4) NOT NULL,
  `parent` int(11) NOT NULL default '0',
  `dateline` int(11) NOT NULL,
  `modify` int(11) default NULL,
  `bind` varchar(30) default NULL,
  `ping` text,
  `link` varchar(100) default NULL,
  `skin` varchar(20) NOT NULL,
  `sort` int(11) default NULL,
  `stat` int(11) default '0',
  `state` tinyint(4) NOT NULL default '0',
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `parent` (`parent`),
  KEY `name` (`name`),
  KEY `state` (`state`),
  KEY `appid` (`appid`)
) ENGINE=MyISAM;

ALTER TABLE `{TableModPre}special` ADD `description` TINYTEXT NOT NULL AFTER `content` ;

ALTER TABLE `{TableModPre}special` ADD `config` TINYTEXT NOT NULL AFTER `content` ;
