Выполнить вот этот запрос:
DROP TABLE IF EXISTS `cms_forums`;
CREATE TABLE `cms_forums` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) NOT NULL,
`title` varchar(250) NOT NULL,
`description` varchar(250) NOT NULL,
`auth_group` int(11) NOT NULL DEFAULT ’-1’,
`ordering` int(11) NOT NULL,
`published` int(11) NOT NULL DEFAULT ’1’,
`parent_id` int(11) NOT NULL,
`NSLeft` int(11) NOT NULL,
`NSRight` int(11) NOT NULL,
`NSDiffer` varchar(15) NOT NULL,
`NSIgnore` int(11) NOT NULL,
`NSLevel` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
INSERT INTO `cms_forums` (`id`, `category_id`, `title`, `description`, `auth_group`, `ordering`, `published`, `parent_id`, `NSLeft`, `NSRight`, `NSDiffer`, `NSIgnore`, `NSLevel`) VALUES
(1000, 0, ’-- Корень форумов --’, ’’, 0, 1, 0, 0, 1, 8, ’’, 0, 1),
(1, 1, ’ Общий форум’, ’’, 0, 2, 1, 1000, 2, 7, ’’, 0, 2),
(1002, 1, ’ Подфорум1’, ’’, 0, 3, 1, 1, 5, 6, ’’, 0, 3),
(1004, 1, ’ Подфорум2’, ’’, 0, 2, 1, 1, 3, 4, ’’, 0, 3);
DROP TABLE IF EXISTS `cms_forum_cats`;
CREATE TABLE `cms_forum_cats` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(250) NOT NULL,
`published` int(11) NOT NULL DEFAULT ’1’,
`auth_group` int(11) NOT NULL,
`ordering` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
INSERT INTO `cms_forum_cats` (`id`, `title`, `published`, `auth_group`, `ordering`) VALUES
(1, ’ Общие вопросы’, 1, 0, 1);
DROP TABLE IF EXISTS `cms_forum_files`;
CREATE TABLE `cms_forum_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`post_id` int(11) NOT NULL,
`filename` varchar(200) NOT NULL,
`filesize` int(11) NOT NULL,
`hits` int(11) NOT NULL,
`pubdate` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
DROP TABLE IF EXISTS `cms_forum_images`;
CREATE TABLE `cms_forum_images` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`post_id` int(11) NOT NULL,
`session_id` varchar(50) NOT NULL,
`fileurl` varchar(250) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
DROP TABLE IF EXISTS `cms_forum_polls`;
CREATE TABLE `cms_forum_polls` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`thread_id` int(11) NOT NULL,
`title` varchar(200) NOT NULL,
`description` text NOT NULL,
`answers` text NOT NULL,
`options` varchar(250) NOT NULL,
`enddate` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
DROP TABLE IF EXISTS `cms_forum_posts`;
CREATE TABLE `cms_forum_posts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`thread_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`pubdate` datetime NOT NULL,
`editdate` datetime NOT NULL,
`edittimes` int(11) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `content` (`content`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
INSERT INTO `cms_forum_posts` (`id`, `thread_id`, `user_id`, `pubdate`, `editdate`, `edittimes`, `content`) VALUES
(29, 12, 1, ’2009-04-04 18:54:53’, ’2009-06-19 11:46:32’, 1, ’ Геосинклиналь обогащает магматический монтмориллонит, что в общем свидетельствует о преобладании тектонических опусканий в это время. Углефикация характерна. Порода существенна. Тектогенез, разделенные узкими линейновытянутыми зонами выветрелых пород, переоткладывает морской авгит, образуя на границе с Западно-Карельским поднятием своеобразную систему грабенов. Ведущий экзогенный геологический процесс — субдукция ослабляет лакколит, так как совершенно однозначно указывает на существование и рост в период оформления палеогеновой поверхности выравнивания.’),
(37, 12, 27, ’2009-10-16 12:31:31’, ’2009-10-16 12:34:05’, 1, ’dthdj **** sdgjsfdgj’),
(38, 12, 27, ’2009-10-16 12:31:36’, ’2009-10-16 12:33:56’, 1, ’zdgjzdfgjdtj rtuhsrtjhst zfgjfgjfgj!!!!!!!!!!!’);
DROP TABLE IF EXISTS `cms_forum_threads`;
CREATE TABLE `cms_forum_threads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`forum_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`title` varchar(250) NOT NULL,
`description` varchar(250) NOT NULL,
`icon` varchar(100) NOT NULL,
`pubdate` datetime NOT NULL,
`hits` int(11) NOT NULL,
`closed` int(11) NOT NULL,
`pinned` int(11) NOT NULL,
`rel_to` varchar(15) NOT NULL,
`rel_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
INSERT INTO `cms_forum_threads` (`id`, `forum_id`, `user_id`, `title`, `description`, `icon`, `pubdate`, `hits`, `closed`, `pinned`, `rel_to`, `rel_id`) VALUES
(12, 1, 1, ’ Пример темы’, ’’, ’’, ’2009-10-16 12:31:36’, 61, 0, 0, ’’, 0);
DROP TABLE IF EXISTS `cms_forum_votes`;
CREATE TABLE `cms_forum_votes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`poll_id` int(11) NOT NULL,
`answer_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`pubdate` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;