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

--
-- Table structure for table `abuse_blog`
--

DROP TABLE IF EXISTS `abuse_blog`;
CREATE TABLE `abuse_blog` (
  `abuse_id` bigint(20) NOT NULL auto_increment,
  `blog_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 `blog_id` (`blog_id`,`reported_by`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Table structure for table `blog_category`
--

DROP TABLE IF EXISTS `blog_category`;
CREATE TABLE `blog_category` (
  `blog_category_id` bigint(20) NOT NULL auto_increment,
  `blog_category_name` varchar(200) collate latin1_general_ci default NULL,
  `blog_category_description` text collate latin1_general_ci NOT NULL,
  `blog_category_status` enum('Yes','No') collate latin1_general_ci default 'Yes',
  `date_added` datetime default NULL,
  PRIMARY KEY  (`blog_category_id`),
  KEY `ind_catstatus_catid` (`blog_category_status`,`blog_category_id`),
  KEY `ind_catstatus_catname` (`blog_category_status`,`blog_category_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Table structure for table `blog_comment`
--

DROP TABLE IF EXISTS `blog_comment`;
CREATE TABLE `blog_comment` (
  `comment_id` int(10) unsigned NOT NULL auto_increment,
  `main_comment_id` int(11) default '0',
  `blog_id` int(11) NOT NULL default '0',
  `user_id` int(11) NOT NULL default '0',
  `comment` text collate latin1_general_ci,
  `status` enum('Active','ToActivate') collate latin1_general_ci NOT NULL default 'Active',
  `date_added` datetime NOT NULL default '0000-00-00 00:00:00',
  `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  (`comment_id`),
  KEY `blog_id` (`blog_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Table structure for table `blogs`
--

DROP TABLE IF EXISTS `blogs`;
CREATE TABLE `blogs` (
  `blog_id` int(10) unsigned NOT NULL auto_increment,
  `subject` varchar(100) collate latin1_general_ci default NULL,
  `seo_title` varchar(255) collate latin1_general_ci NOT NULL,
  `message` text collate latin1_general_ci,
  `accept_comments` enum('Yes','No') collate latin1_general_ci NOT NULL default 'Yes',
  `user_id` bigint(11) NOT NULL default '0',
  `total_comments` int(11) NOT NULL default '0',
  `total_views` int(11) NOT NULL default '0',
  `total_stars` float(5,2) NOT NULL default '0.00',
  `status` enum('Toactivate','Active','Inactive') collate latin1_general_ci NOT NULL default 'Active',
  `publish_comments` enum('Yes','No') collate latin1_general_ci NOT NULL default 'Yes',
  `blog_category_id` bigint(20) NOT NULL default '0',
  `abuse_count` bigint(20) NOT NULL default '0',
  `date_added` datetime NOT NULL default '0000-00-00 00:00:00',
  `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  (`blog_id`),
  KEY `user_blog_id` (`user_id`,`blog_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

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

--
-- Table structure for table `users_stared_blogs`
--

DROP TABLE IF EXISTS `users_stared_blogs`;
CREATE TABLE `users_stared_blogs` (
  `star_id` bigint(20) NOT NULL auto_increment,
  `user_id` bigint(20) NOT NULL,
  `blog_id` bigint(20) NOT NULL,
  `rating` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`star_id`),
  KEY `user_id` (`user_id`,`blog_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Dumping data for table `blog_category`
--

INSERT INTO `blog_category` SET `blog_category_name`='Arts and Humanities', `date_added`=NOW();
INSERT INTO `blog_category` SET `blog_category_name`='Beauty and Style', `date_added`=NOW();
INSERT INTO `blog_category` SET `blog_category_name`='Cars and Transportation', `date_added`=NOW();
INSERT INTO `blog_category` SET `blog_category_name`='Entertainment and Music', `date_added`=NOW();
INSERT INTO `blog_category` SET `blog_category_name`='Sports', `date_added`=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', 'blogs');
