Просмотр файла down/base.sql

Размер файла: 1.29Kb
CREATE TABLE IF NOT EXISTS `downloads_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_parent` int(11) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL,
  `name` varchar(55) NOT NULL,
  `upload` set('0','1') NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `id_parent` (`id_parent`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

INSERT INTO `downloads_category` (`id`, `id_parent`, `position`, `name`, `upload`) VALUES
(1, 0, 1, 'Картинки', '1'),
(2, 0, 2, 'Мелодии', '1'),
(3, 0, 3, 'Игры', '1'),
(4, 0, 4, 'Анимация', '1'),
(5, 0, 5, 'Видео', '1');

CREATE TABLE IF NOT EXISTS `downloads_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category` int(11) default '0',
  `title` varchar(55) NOT NULL,
  `date` int(11) NOT NULL,
  `author` varchar(20) NOT NULL,
  `path_to_file` varchar(100) NOT NULL,
  `file` varchar(255) NOT NULL,
  `screen` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `count_loads` int(11) NOT NULL DEFAULT '0',
  `size` float NOT NULL,
  `status` enum('active','moderate') NOT NULL DEFAULT 'active',
  PRIMARY KEY (`id`),
  KEY `category` (`category`),
  FULLTEXT KEY `title` (`title`),
  FULLTEXT KEY `title_2` (`title`,`description`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1000 ;