CREATE TABLE ?_bt_bugs (
  `bug_id` int(11) NOT NULL auto_increment,
  `project_id` int(11) NOT NULL default '0',
  `version_id` int(11) NOT NULL default '0',
  `summary` tinytext,
  `type` tinyint(4) NOT NULL default '0',
  `author_id` int(11) NOT NULL default '0',
  `bug_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `importance` tinyint(4) NOT NULL default '10',
  `approver_id` int(11) NOT NULL default '0',
  `status` tinyint(4) NOT NULL default '20',
  `performer_id` int(11) NOT NULL default '0',
  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 default '0',
  `file_name` varchar(50) NOT NULL default '',
  `file_type` varchar(10) NOT NULL default '',
  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 default '0',
  `bug_id` int(11) NOT NULL default '0',
  `msg` text,
  `putdate` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE ?_bt_versions (
  `version_id` int(11) NOT NULL auto_increment,
  `version` varchar(15) NOT NULL default '',
  `project_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`version_id`),
  UNIQUE KEY `version` (`version`,`project_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
