CREATE TABLE IF NOT EXISTS `forum_favourites` ( `topic` int(11) NOT NULL, `user_id` int(11) NOT NULL, KEY `topic` (`topic`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_files` ( `file` int(11) NOT NULL AUTO_INCREMENT, `post` int(11) NOT NULL, `topic` int(11) NOT NULL, `time` int(11) NOT NULL, `user_id` int(11) NOT NULL, `filename` varchar(50) NOT NULL, `down` int(11) NOT NULL, `tempid` int(11) NOT NULL, PRIMARY KEY (`file`), KEY `post` (`post`), KEY `topic` (`topic`), KEY `user_id` (`user_id`), KEY `tempid` (`tempid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_forums` ( `forum` int(11) NOT NULL AUTO_INCREMENT, `sort` int(11) NOT NULL, `parent` int(11) NOT NULL, `type` int(1) NOT NULL DEFAULT '0', `forumname` varchar(100) NOT NULL, `desc` tinytext NOT NULL, `keyw` tinytext NOT NULL, `descw` text NOT NULL, `last_topic` varchar(250) NOT NULL, `count` int(11) NOT NULL, PRIMARY KEY (`forum`), KEY `sort` (`sort`), KEY `parent` (`parent`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_journal` ( `time` int(11) NOT NULL, `user_id` int(10) NOT NULL, `text` text NOT NULL, `readed` int(1) NOT NULL, PRIMARY KEY (`time`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_polled` ( `topic` int(11) NOT NULL, `poll` int(11) NOT NULL, `user_id` int(11) NOT NULL, KEY `topic` (`topic`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_polls` ( `id` int(11) NOT NULL AUTO_INCREMENT, `topic` int(11) NOT NULL, `variantname` varchar(150) NOT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `topic` (`topic`), KEY `count` (`count`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_posts` ( `post` int(11) NOT NULL AUTO_INCREMENT, `topic` int(11) NOT NULL, `time` int(11) NOT NULL, `user_id` int(11) NOT NULL, `user` varchar(40) NOT NULL, `text` text NOT NULL, `edit` varchar(150) NOT NULL DEFAULT '', `files` int(1) NOT NULL, `browser` varchar(250) NOT NULL, `ip` bigint(11) NOT NULL, `ip_via_proxy` bigint(11) NOT NULL, `rating` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`post`), KEY `topic` (`topic`), KEY `time` (`time`), KEY `user_id` (`user_id`), KEY `files` (`files`), FULLTEXT KEY `text` (`text`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_posts_rating` ( `post` int(11) NOT NULL, `user_id` int(11) NOT NULL, KEY `post` (`post`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_readed` ( `topic` int(11) NOT NULL, `user_id` int(11) NOT NULL, `time` int(11) NOT NULL, `lastpost` int(11) NOT NULL, PRIMARY KEY (`topic`,`user_id`), KEY `time` (`time`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `forum_topics` ( `topic` int(11) NOT NULL AUTO_INCREMENT, `forum` int(11) NOT NULL, `time` int(11) NOT NULL, `topicname` varchar(100) NOT NULL, `forumname` varchar(150) NOT NULL, `user_id` int(11) NOT NULL, `user` varchar(40) NOT NULL, `lastpost` varchar(250) NOT NULL, `count` int(11) NOT NULL, `close` tinyint(1) NOT NULL, `sticky` tinyint(1) NOT NULL, `clip` tinyint(1) NOT NULL, `poll_name` varchar(250) NOT NULL, `poll_set` text NOT NULL, `curator` int(11) NOT NULL, PRIMARY KEY (`topic`), KEY `topic` (`topic`), KEY `time` (`time`), KEY `user_id` (`user_id`), KEY `stycky` (`sticky`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;