-- --------------------------------------------------------

--
-- Table structure for table `abuse_forum`
--

DROP TABLE IF EXISTS `abuse_forum`;
CREATE TABLE `abuse_forum` (
  `abuse_id` bigint(20) NOT NULL auto_increment,
  `topic_id` bigint(20) NOT NULL,
  `reported_by` bigint(20) NOT NULL,
  `reason` varchar(250) collate latin1_general_ci NOT NULL,
  `date_abused` datetime NOT NULL,
  PRIMARY KEY  (`abuse_id`),
  KEY `topic_id` (`topic_id`,`reported_by`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `forum_response`
--

DROP TABLE IF EXISTS `forum_response`;
CREATE TABLE `forum_response` (
  `response_id` bigint(20) NOT NULL auto_increment,
  `topic_id` bigint(20) default NULL,
  `forum_response` text collate latin1_general_ci,
  `response_user_id` bigint(20) default NULL,
  `response_status` enum('No','Yes','ToActivate') collate latin1_general_ci NOT NULL default 'Yes',
  `email_sent` enum('Yes','No') collate latin1_general_ci NOT NULL default 'No',
  `date_added` datetime default NULL,
  `video_id` bigint(20) NOT NULL,
  `audio_id` bigint(20) NOT NULL,
  `external_video_id` bigint(20) NOT NULL,
  `external_audio_id` bigint(20) NOT NULL,
  PRIMARY KEY  (`response_id`),
  KEY `ind_staus_date` (`response_status`,`date_added`),
  KEY `response_user_id` (`response_user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `forum_topics`
--

DROP TABLE IF EXISTS `forum_topics`;
CREATE TABLE `forum_topics` (
  `topic_id` bigint(20) NOT NULL auto_increment,
  `forum_id` bigint(20) default NULL,
  `forum_topic` varchar(200) collate latin1_general_ci default NULL,
  `seo_title` varchar(255) collate latin1_general_ci NOT NULL,
  `user_id` bigint(20) default NULL,
  `total_response` bigint(20) default NULL,
  `total_views` bigint(20) default NULL,
  `last_post_user_id` bigint(20) default NULL,
  `last_post_date` datetime default NULL,
  `rating_total` bigint(20) default '0',
  `rating_count` bigint(20) default '0',
  `topic_status` enum('Yes','No','ToActivate') collate latin1_general_ci default 'Yes',
  `publish_status` enum('Yes','No') collate latin1_general_ci NOT NULL default 'Yes',
  `abuse_count` bigint(20) NOT NULL default '0',
  `date_added` datetime default NULL,
  PRIMARY KEY  (`topic_id`),
  KEY `ind_status_forumid` (`topic_status`,`forum_id`),
  KEY `user_id` (`user_id`),
  KEY `last_post_user_id` (`last_post_user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `forums`
--

DROP TABLE IF EXISTS `forums`;
CREATE TABLE `forums` (
  `forum_id` bigint(20) NOT NULL auto_increment,
  `forum_title` varchar(200) collate latin1_general_ci default NULL,
  `seo_title` varchar(255) collate latin1_general_ci NOT NULL,
  `forum_description` text collate latin1_general_ci,
  `forum_userid` bigint(20) NOT NULL,
  `total_topics` bigint(20) default '0',
  `total_response` bigint(20) default '0',
  `last_post_user_id` bigint(20) default NULL,
  `last_post_date` datetime default NULL,
  `forum_status` enum('Yes','No','ToActivate') collate latin1_general_ci default 'Yes',
  `publish_status` enum('Yes','No') collate latin1_general_ci NOT NULL default 'Yes',
  `date_added` datetime default NULL,
  PRIMARY KEY  (`forum_id`),
  KEY `ind_status_title` (`forum_status`,`forum_title`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `forums`
--

INSERT INTO `forums` ( `forum_id` , `forum_title`, `seo_title` , `forum_description` , `total_topics` , `total_response` , `last_post_user_id` , `last_post_date` , `forum_status` , `date_added` ) VALUES ( '', 'General Discussion', 'General_Discussion', 'General Discussion', '0', '0', NULL , NULL , 'Yes', NOW( ) );

--
-- Dumping data for table `cron_master`
--

INSERT INTO `cron_master` (`upto_id`, `total`, `start_time`, `tot_finished_crons`, `status`, `cron_for`) VALUES (0, 0, NOW(), 0, 'Started', 'forums');
