CREATE TABLE ?_bt_bugs (
  `bug_id` int(11) NOT NULL AUTO_INCREMENT,
  `version_id` int(11) NOT NULL,
  `summary` tinytext NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '0',
  `author_id` int(11) NOT NULL,
  `last_update` int(10) unsigned DEFAULT NULL,
  `importance` tinyint(4) NOT NULL DEFAULT '10',
  `approver_id` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '20',
  `performer_id` int(11) NOT NULL,
  PRIMARY KEY (`bug_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE ?_bt_files (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `post_id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `type` varchar(10) NOT NULL,
  PRIMARY KEY (`file_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE ?_bt_posts (
  `post_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `bug_id` int(11) NOT NULL,
  `msg` text NOT NULL,
  `putdate` int(10) unsigned NOT NULL,
  `first` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE ?_bt_versions (
  `version_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(15) NOT NULL,
  `unsupported` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version_id`),
  UNIQUE KEY `version` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
