SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

CREATE TABLE IF NOT EXISTS `download_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` int(11) NOT NULL,
  `ref` int(11) NOT NULL,
  `name` varchar(15) NOT NULL,
  `text` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `download_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `size` bigint(20) NOT NULL,
  `path` varchar(255) NOT NULL,
  `infolder` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `dateupload` int(11) NOT NULL,
  `load` int(11) NOT NULL,
  `rate` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `count_files` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `download_news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `text` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `download_news_comment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ref` int(11) NOT NULL,
  `date` int(11) NOT NULL,
  `name` varchar(15) NOT NULL,
  `text` text NOT NULL,
  `answer` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `download_settings` (
  `id` int(1) NOT NULL AUTO_INCREMENT,
  `path` varchar(255) NOT NULL,
  `screen` varchar(255) NOT NULL,
  `about` varchar(255) NOT NULL,
  `size` varchar(10) NOT NULL,
  `symbol` int(11) NOT NULL,
  `stat` enum('0','1') NOT NULL,
  `search` enum('0','1') NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=2 ;

INSERT INTO `download_settings` (`id`, `path`, `screen`, `about`, `size`, `symbol`, `stat`, `search`) VALUES
(1, 'files', 'screen', 'about', '45x55', 100, '1', '1');