DROP TABLE IF EXISTS `site_plugin_comments`;
CREATE TABLE IF NOT EXISTS `site_plugin_comments` (
  `comment_id` int(11) NOT NULL AUTO_INCREMENT,
  `module_id` varchar(30) NOT NULL,
  `lang_id` int(3) NOT NULL,
  `comment_parent` int(11) NOT NULL,
  `comment_code` varchar(32) NOT NULL,
  `comment_url` varchar(500) NOT NULL,
  `comment_date` int(11) NOT NULL,
  `comment_author` varchar(50) NOT NULL,
  `comment_website` varchar(255) NOT NULL,
  `comment_email` varchar(50) NOT NULL,
  `comment_body` text NOT NULL,
  `comment_status` int(1) NOT NULL,
  `comment_user` int(11) NOT NULL,
  `comment_reserved` int(11) NOT NULL,
  `comment_avatar` varchar(255) NOT NULL,
  `comment_log_ip` varchar(30) NOT NULL,
  PRIMARY KEY (`comment_id`),
  KEY `comment_url` (`comment_url`(255)),
  KEY `comment_date` (`comment_date`),
  KEY `comment_status` (`comment_status`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;

DROP TABLE IF EXISTS `site_plugin_comments_types`;
CREATE TABLE IF NOT EXISTS `site_plugin_comments_types` (
  `type_id` int(11) NOT NULL AUTO_INCREMENT,
  `type_name` varchar(255) NOT NULL,
  PRIMARY KEY (`type_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

INSERT INTO `site_plugin_comments_types` (`type_id`, `type_name`) VALUES
(1, 'Local'),
(2, 'Facebook');

INSERT INTO `site_plugin_comments_types` (`type_id`, `type_name`) VALUES (3, 'Disqus');
