CREATE TABLE ?_forum_forums (
  `forum_id` int(11) NOT NULL auto_increment,
  `forum_name` varchar(255) NOT NULL default '',
  `descr` text,
  `forum_total_posts` int(11) NOT NULL default '0',
  `total_themes` int(11) NOT NULL default '0',
  `forum_last_post` datetime NOT NULL default '0000-00-00 00:00:00',
  `forum_last_user` varchar(20) default NULL,
  `forum_last_user_id` int(11) default NULL,
  `closed` tinyint(1) default NULL,
  PRIMARY KEY  (`forum_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE ?_forum_posts (
  `post_id` int(11) NOT NULL auto_increment,
  `theme_id` int(11) NOT NULL default '0',
  `user_id` int(11) default NULL,
  `user_name` varchar(20) default NULL,
  `msg` text,
  `email` varchar(50) default NULL,
  `putdate` datetime default '0000-00-00 00:00:00',
  `ip` bigint(20) default '0',
  `edited` varchar(20) default NULL,
  PRIMARY KEY  (`post_id`),
  FULLTEXT KEY `msg` (`msg`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE ?_forum_themes (
  `theme_id` int(11) NOT NULL auto_increment,
  `forum_id` int(11) default NULL,
  `author` varchar(20) default NULL,
  `author_id` int(11) default NULL,
  `subject` varchar(60) NOT NULL default '',
  `total_posts` int(11) NOT NULL default '0',
  `last_post` datetime default '0000-00-00 00:00:00',
  `last_user` varchar(20) default NULL,
  `last_user_id` int(11) default NULL,
  `pinup` tinyint(4) NOT NULL default '0',
  `hidden` int(11) default NULL,
  PRIMARY KEY  (`theme_id`),
  FULLTEXT KEY `subject` (`subject`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE ?_forum_hposts (
  `post_id` int(11) NOT NULL,
  `theme_id` int(11) NOT NULL default '0',
  `user_id` int(11) default NULL,
  `user_name` varchar(20) default NULL,
  `msg` text,
  `email` varchar(50) default NULL,
  `putdate` datetime default '0000-00-00 00:00:00',
  `ip` bigint(20) default '0',
  `edited` varchar(20) default NULL,
  PRIMARY KEY  (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE ?_forum_hthemes (
  `theme_id` int(11) NOT NULL,
  `forum_id` int(11) default NULL,
  `author` varchar(20) default NULL,
  `author_id` int(11) default NULL,
  `subject` varchar(60) NOT NULL default '',
  `total_posts` int(11) NOT NULL default '0',
  `last_post` datetime default '0000-00-00 00:00:00',
  `last_user` varchar(20) default NULL,
  `last_user_id` int(11) default NULL,
  `pinup` tinyint(4) NOT NULL default '0',
  `hidden` int(11) default NULL,
  PRIMARY KEY  (`theme_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;