CREATE TABLE IF NOT EXISTS `newspaper_articles` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `cat_id` mediumint(8) unsigned NOT NULL,
  `newspaper_id` int(11) unsigned NOT NULL,
  `date` int(20) unsigned NOT NULL,
  `title` varchar(255) collate utf8_unicode_ci NOT NULL,
  `text` text collate utf8_unicode_ci NOT NULL,
  `reporter` int(11) NOT NULL,
  `editor` int(11) NOT NULL,
  `see` int(11) unsigned NOT NULL default '0',
  `plus` mediumint(11) unsigned NOT NULL default '0',
  `minus` mediumint(11) unsigned NOT NULL default '0',
  `count_balls` int(11) unsigned NOT NULL default '0',
  `moderation` enum('0','1') collate utf8_unicode_ci NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=59 ;

--
CREATE TABLE IF NOT EXISTS `newspaper_articles_votes` (
  `article` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `count_balls` int(11) NOT NULL default '0',
  KEY `article` (`article`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
CREATE TABLE IF NOT EXISTS `newspaper_buyers` (
  `newspaper` int(11) NOT NULL,
  `buyer` int(11) NOT NULL,
  KEY `newspaper` (`newspaper`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- Структура таблицы `newspaper_categories`
--

CREATE TABLE IF NOT EXISTS `newspaper_categories` (
  `id` smallint(8) unsigned NOT NULL auto_increment,
  `place` tinyint(2) NOT NULL,
  `title` varchar(128) collate utf8_unicode_ci NOT NULL,
  `description` varchar(255) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ;

--
CREATE TABLE IF NOT EXISTS `newspaper_comments` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `article` int(11) unsigned NOT NULL,
  `uid` int(11) unsigned NOT NULL,
  `date` int(20) unsigned NOT NULL,
  `text` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

--
CREATE TABLE IF NOT EXISTS `newspaper_output` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `date` int(11) unsigned NOT NULL,
  `description` varchar(255) collate utf8_unicode_ci NOT NULL,
  `editor` int(11) NOT NULL,
  `jobname` varchar(128) collate utf8_unicode_ci NOT NULL,
  `start` enum('0','1') collate utf8_unicode_ci NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;

--
CREATE TABLE IF NOT EXISTS `newspaper_reporters_top` (
  `reporter` int(20) unsigned NOT NULL,
  `vote` int(20) unsigned NOT NULL,
  UNIQUE KEY `reporter` (`reporter`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;



