-- phpMyAdmin SQL Dump
-- version 2.6.1
-- http://www.phpmyadmin.net
--
-- Хост: localhost
-- Время создания: Май 22 2010 г., 13:58
-- Версия сервера: 5.0.45
-- Версия PHP: 5.2.12
--
-- БД: `dcms`
--

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

--
-- Структура таблицы `comm_ban`
--

CREATE TABLE `comm_ban` (
  `id` int(11) NOT NULL auto_increment,
  `time` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `id_ban` int(11) NOT NULL,
  `prich` varchar(1024) NOT NULL,
  `id_comm` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id_user` (`id_user`,`id_ban`),
  KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_ban`
--


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

--
-- Структура таблицы `comm_forum_f`
--

CREATE TABLE `comm_forum_f` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(32) NOT NULL,
  `pos` int(11) NOT NULL,
  `opis` varchar(512) NOT NULL,
  `adm` set('0','1') NOT NULL default '0',
  `id_comm` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_forum_f`
--


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

--
-- Структура таблицы `comm_forum_files`
--

CREATE TABLE `comm_forum_files` (
  `id` int(11) NOT NULL auto_increment,
  `id_post` int(11) NOT NULL,
  `name` varchar(64) default NULL,
  `ras` varchar(32) NOT NULL,
  `size` int(11) NOT NULL,
  `type` varchar(32) NOT NULL,
  `count` int(11) NOT NULL default '0',
  `rating` int(11) NOT NULL default '0',
  `id_comm` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id_post` (`id_post`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_forum_files`
--


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

--
-- Структура таблицы `comm_forum_files_rating`
--

CREATE TABLE `comm_forum_files_rating` (
  `id_file` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `rating` int(11) default '0',
  `id_comm` int(11) NOT NULL,
  KEY `id_file` (`id_file`),
  KEY `id_user` (`id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `comm_forum_files_rating`
--


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

--
-- Структура таблицы `comm_forum_p`
--

CREATE TABLE `comm_forum_p` (
  `id` int(11) NOT NULL auto_increment,
  `id_forum` int(11) NOT NULL,
  `id_razdel` int(11) NOT NULL,
  `id_them` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `msg` varchar(10240) NOT NULL,
  `cit` int(11) default NULL,
  `id_comm` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id_forum` (`id_forum`,`id_razdel`,`id_them`),
  KEY `id_user` (`id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_forum_p`
--


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

--
-- Структура таблицы `comm_forum_r`
--

CREATE TABLE `comm_forum_r` (
  `id` int(11) NOT NULL auto_increment,
  `id_forum` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `time` int(11) NOT NULL,
  `id_comm` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id_forum` (`id_forum`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_forum_r`
--


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

--
-- Структура таблицы `comm_forum_t`
--

CREATE TABLE `comm_forum_t` (
  `id` int(11) NOT NULL auto_increment,
  `id_forum` int(11) NOT NULL,
  `id_razdel` int(11) default NULL,
  `name` varchar(32) NOT NULL,
  `id_user` int(11) default NULL,
  `time_create` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `up` set('0','1') NOT NULL default '0',
  `close` set('0','1') NOT NULL default '0',
  `id_comm` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id_forum` (`id_forum`,`id_razdel`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_forum_t`
--


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

--
-- Структура таблицы `comm_forum_zakl`
--

CREATE TABLE `comm_forum_zakl` (
  `id_user` int(11) NOT NULL,
  `id_them` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `time_obn` int(11) NOT NULL,
  `id_comm` int(11) NOT NULL,
  KEY `id_user` (`id_user`,`id_them`,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `comm_forum_zakl`
--


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

--
-- Структура таблицы `comm_obmen_dir`
--

CREATE TABLE `comm_obmen_dir` (
  `id` int(11) NOT NULL auto_increment,
  `id_comm` int(11) default '0',
  `num` int(11) default '0',
  `name` varchar(64) NOT NULL,
  `ras` varchar(128) NOT NULL,
  `maxfilesize` int(11) NOT NULL,
  `dir` varchar(512) NOT NULL default '/',
  `dir_osn` varchar(512) default '/',
  `upload` set('1','0') NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `num` (`num`),
  KEY `dir` (`dir`(333))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_obmen_dir`
--


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

--
-- Структура таблицы `comm_obmen_files`
--

CREATE TABLE `comm_obmen_files` (
  `id` int(11) NOT NULL auto_increment,
  `id_comm` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `id_dir` int(11) NOT NULL,
  `name` varchar(128) NOT NULL,
  `ras` varchar(36) NOT NULL,
  `type` varchar(64) NOT NULL,
  `time` int(11) NOT NULL,
  `time_last` int(11) NOT NULL,
  `size` int(11) NOT NULL,
  `k_loads` int(11) default '0',
  `opis` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_obmen_files`
--


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

--
-- Структура таблицы `comm_obmen_komm`
--

CREATE TABLE `comm_obmen_komm` (
  `id` int(11) NOT NULL auto_increment,
  `id_comm` int(11) NOT NULL,
  `id_file` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `msg` varchar(1024) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `id_file` (`id_file`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_obmen_komm`
--


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

--
-- Структура таблицы `comm_wall`
--

CREATE TABLE `comm_wall` (
  `id` int(6) NOT NULL auto_increment,
  `user_id` int(6) NOT NULL,
  `who` int(6) NOT NULL,
  `time` int(11) NOT NULL,
  `message` text NOT NULL,
  `id_comm` int(11) default NULL,
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `comm_wall`
--


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

--
-- Структура таблицы `community_board`
--

CREATE TABLE `community_board` (
  `id` int(11) NOT NULL auto_increment,
  `id_comm` int(11) NOT NULL,
  `user` int(11) NOT NULL default '0',
  `time` int(11) NOT NULL,
  `msg` varchar(512) collate utf8_unicode_ci default NULL,
  PRIMARY KEY  (`id`),
  KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `community_board`
--


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

--
-- Структура таблицы `community_comm`
--

CREATE TABLE `community_comm` (
  `id` int(11) NOT NULL auto_increment,
  `id_author` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `about` varchar(256) NOT NULL,
  `time_create` int(11) NOT NULL,
  `time_last_edit` int(11) NOT NULL,
  `slogan` varchar(100) NOT NULL,
  `rules` text,
  `status` set('1','2') default NULL,
  `id_razd` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `community_comm`
--


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

--
-- Структура таблицы `community_razd`
--

CREATE TABLE `community_razd` (
  `id` int(11) NOT NULL auto_increment,
  `id_comm` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `opis` varchar(256) NOT NULL,
  `sort` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `community_razd`
--


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

--
-- Структура таблицы `community_user_incomm`
--

CREATE TABLE `community_user_incomm` (
  `id` int(11) NOT NULL auto_increment,
  `uid` int(11) NOT NULL,
  `cid` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `priv` int(11) NOT NULL,
  `postov` int(111) default '0',
  `them` int(111) default '0',
  `files` int(111) default '0',
  `activate` int(1) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Дамп данных таблицы `community_user_incomm`
--

