From 7d434a46d9f9bf725314030951ee5376856363b3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 14 Jan 2006 22:37:45 +0000 Subject: [PATCH] r709: Update schema file --- install/schema.php | 512 +++++++++++++++++++++++---------------------- 1 file changed, 257 insertions(+), 255 deletions(-) diff --git a/install/schema.php b/install/schema.php index 3c6dbd3..85e991c 100644 --- a/install/schema.php +++ b/install/schema.php @@ -11,311 +11,313 @@ \*=====================================================================*/ $query['attachment'] = " -CREATE TABLE `" . TABLE_PREFIX . "attachment` ( - `attachmentid` int(10) unsigned NOT NULL auto_increment, - `bugid` int(10) unsigned NOT NULL default '0', - `filename` varchar(255) NOT NULL default '', - `mimetype` varchar(255) NOT NULL default '', - `filesize` int(20) unsigned NOT NULL default '0', - `attachment` mediumblob NOT NULL, - `description` varchar(255) NOT NULL default '', - `dateline` int(20) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `obsolete` int(1) unsigned NOT NULL default '0', - PRIMARY KEY (`attachmentid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "attachment +( + attachmentid int(10) unsigned NOT NULL AUTO_INCREMENT, + bugid int(10) unsigned NOT NULL, + filename varchar(255) NOT NULL, + mimetype varchar(255) NOT NULL, + filesize int(20) unsigned NOT NULL, + attachment mediumblob NOT NULL, + description varchar(255) NOT NULL, + dateline int(20) unsigned NOT NULL, + userid int(10) unsigned NOT NULL, + obsolete int(1) unsigned NOT NULL, + PRIMARY KEY (attachmentid) +)"; $query['autoaction'] = " -CREATE TABLE `" . TABLE_PREFIX . "autoaction` ( - `actionid` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) NOT NULL default '', - `description` mediumtext NOT NULL, - `fieldchanges` mediumtext NOT NULL, - `comment` mediumtext NOT NULL, - PRIMARY KEY (`actionid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "autoaction +( + actionid int(10) unsigned NOT NULL AUTO_INCREMENT, + name varchar(255) NOT NULL, + description mediumtext NOT NULL, + fieldchanges mediumtext NOT NULL, + comment mediumtext NOT NULL, + PRIMARY KEY (actionid) +)"; $query['bug'] = " -CREATE TABLE `" . TABLE_PREFIX . "bug` ( - `bugid` int(10) unsigned NOT NULL auto_increment, - `userid` int(10) unsigned NOT NULL default '0', - `dateline` int(20) unsigned NOT NULL default '0', - `productid` int(10) unsigned NOT NULL default '0', - `componentid` int(10) unsigned NOT NULL default '0', - `versionid` int(10) unsigned NOT NULL default '0', - `summary` varchar(255) NOT NULL default '', - `priority` int(10) unsigned NOT NULL default '0', - `severity` int(10) unsigned NOT NULL default '0', - `status` int(10) unsigned NOT NULL default '0', - `resolution` int(10) unsigned NOT NULL default '0', - `assignedto` int(10) unsigned NOT NULL default '0', - `duplicateof` int(10) unsigned NOT NULL default '0', - `dependency` mediumtext NOT NULL, - `hidden` int(2) unsigned NOT NULL default '0', - `initialreport` int(10) unsigned NOT NULL default '0', - `lastposttime` int(20) unsigned NOT NULL default '0', - `lastpostby` int(10) unsigned NOT NULL default '0', - `hiddenlastposttime` int(10) unsigned NOT NULL default '0', - `hiddenlastpostby` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`bugid`), - FULLTEXT KEY `summary` (`summary`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "bug +( + bugid int(10) unsigned NOT NULL AUTO_INCREMENT, + userid int(10) unsigned NOT NULL, + dateline int(20) unsigned NOT NULL, + productid int(10) unsigned NOT NULL, + componentid int(10) unsigned NOT NULL, + versionid int(10) unsigned NOT NULL, + summary varchar(255) NOT NULL, + priority int(10) unsigned NOT NULL, + severity int(10) unsigned NOT NULL, + status int(10) unsigned NOT NULL, + resolution int(10) unsigned NOT NULL, + assignedto int(10) unsigned NOT NULL, + duplicateof int(10) unsigned NOT NULL, + dependency mediumtext NOT NULL, + hidden int(2) unsigned NOT NULL, + initialreport int(10) unsigned NOT NULL, + lastposttime int(20) unsigned NOT NULL, + lastpostby int(10) unsigned NOT NULL, + hiddenlastposttime int(10) unsigned NOT NULL, + hiddenlastpostby int(10) unsigned NOT NULL, + PRIMARY KEY (bugid), + FULLTEXT KEY summary (summary) +)"; $query['bugfield'] = " -CREATE TABLE `" . TABLE_PREFIX . "bugfield` ( - `fieldid` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) NOT NULL default '', - `description` mediumtext NOT NULL, - `type` varchar(50) NOT NULL default '', - `selects` mediumtext NOT NULL, - `required` int(2) NOT NULL default '0', - `cansearch` int(2) NOT NULL default '0', - `regexmatch` mediumtext NOT NULL, - `defaultvalue` mediumtext NOT NULL, - `usedefault` int(2) NOT NULL default '0', - `maxlength` int(5) unsigned NOT NULL default '0', - PRIMARY KEY (`fieldid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "bugfield +( + fieldid int(10) unsigned NOT NULL AUTO_INCREMENT, + name varchar(255) NOT NULL, + description mediumtext NOT NULL, + type varchar(50) NOT NULL, + selects mediumtext NOT NULL, + required int(2) NOT NULL, + cansearch int(2) NOT NULL, + regexmatch mediumtext NOT NULL, + defaultvalue mediumtext NOT NULL, + usedefault int(2) NOT NULL, + maxlength int(5) unsigned NOT NULL, + PRIMARY KEY (fieldid) +)"; $query['bugfieldpermission'] = " -CREATE TABLE `" . TABLE_PREFIX . "bugfieldpermission` ( - `usergroupid` int(10) unsigned NOT NULL default '0', - `fieldid` int(10) unsigned NOT NULL default '0', - `mask` int(5) unsigned NOT NULL default '0', - PRIMARY KEY (`usergroupid`,`fieldid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "bugfieldpermission +( + usergroupid int(10) unsigned NOT NULL, + fieldid int(10) unsigned NOT NULL, + mask int(5) unsigned NOT NULL, + PRIMARY KEY (usergroupid, fieldid) +)"; $query['bugvaluefill'] = " -CREATE TABLE `" . TABLE_PREFIX . "bugvaluefill` ( - `bugid` int(10) unsigned NOT NULL default '0', - `field2` mediumtext, - `field4` mediumtext, - `field5` mediumtext, - PRIMARY KEY (`bugid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "bugvaluefill +( + bugid int(10) unsigned NOT NULL, + PRIMARY KEY (bugid) +)"; $query['comment'] = " -CREATE TABLE `" . TABLE_PREFIX . "comment` ( - `commentid` int(10) unsigned NOT NULL auto_increment, - `bugid` int(10) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `dateline` int(20) unsigned NOT NULL default '0', - `comment` mediumtext NOT NULL, - `comment_parsed` mediumtext NOT NULL, - `hidden` int(2) unsigned NOT NULL default '0', - PRIMARY KEY (`commentid`), - FULLTEXT KEY `comment` (`comment`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "comment +( + commentid int(10) unsigned NOT NULL AUTO_INCREMENT, + bugid int(10) unsigned NOT NULL, + userid int(10) unsigned NOT NULL, + dateline int(20) unsigned NOT NULL, + comment mediumtext NOT NULL, + comment_parsed mediumtext NOT NULL, + hidden int(2) unsigned NOT NULL, + PRIMARY KEY (commentid), + FULLTEXT KEY comment (comment) +)"; $query['datastore'] = " -CREATE TABLE `" . TABLE_PREFIX . "datastore` ( - `title` varchar(255) NOT NULL default '', - `data` mediumtext NOT NULL, - PRIMARY KEY (`title`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "datastore +( + title varchar(255) NOT NULL, + data mediumtext NOT NULL, + PRIMARY KEY (title) +)"; $query['dependency'] = " -CREATE TABLE `" . TABLE_PREFIX . "dependency` ( - `dependencyid` int(10) unsigned NOT NULL auto_increment, - `bugid` int(10) unsigned NOT NULL default '0', - `dependson` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`dependencyid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "dependency +( + dependencyid int(10) unsigned NOT NULL AUTO_INCREMENT, + bugid int(10) unsigned NOT NULL, + dependson int(10) unsigned NOT NULL, + PRIMARY KEY (dependencyid) +)"; $query['favourite'] = " -CREATE TABLE `" . TABLE_PREFIX . "favourite` ( - `userid` int(10) unsigned NOT NULL default '0', - `bugid` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`userid`,`bugid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "favourite +( + userid int(10) unsigned NOT NULL, + bugid int(10) unsigned NOT NULL, + PRIMARY KEY (userid, bugid) +)"; + +$query['fieldhelp'] = " +CREATE TABLE " . TABLE_PREFIX . "fieldhelp +( + keystring varchar(255) NOT NULL, + title varchar(255) NOT NULL, + body mediumtext NOT NULL, + PRIMARY KEY (keystring) +)"; $query['history'] = " -CREATE TABLE `" . TABLE_PREFIX . "history` ( - `historyid` int(20) unsigned NOT NULL auto_increment, - `bugid` int(10) unsigned NOT NULL default '0', - `attachmentid` int(10) unsigned NOT NULL default '0', - `commentid` int(10) unsigned NOT NULL default '0', - `dateline` int(20) unsigned NOT NULL default '0', - `userid` int(10) unsigned NOT NULL default '0', - `field` varchar(255) NOT NULL default '', - `original` mediumtext NOT NULL, - `changed` mediumtext NOT NULL, - PRIMARY KEY (`historyid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "history +( + historyid int(20) unsigned NOT NULL AUTO_INCREMENT, + bugid int(10) unsigned NOT NULL, + attachmentid int(10) unsigned NOT NULL, + commentid int(10) unsigned NOT NULL, + dateline int(20) unsigned NOT NULL, + userid int(10) unsigned NOT NULL, + field varchar(255) NOT NULL, + original mediumtext NOT NULL, + changed mediumtext NOT NULL, + PRIMARY KEY (historyid) +)"; $query['language'] = " -CREATE TABLE `" . TABLE_PREFIX . "language` ( - `languageid` int(10) unsigned NOT NULL auto_increment, - `title` varchar(255) NOT NULL default '', - `languagecode` varchar(5) NOT NULL default '', - `charset` varchar(15) NOT NULL default '', - `direction` char(3) NOT NULL default '', - `filename` varchar(255) NOT NULL default '', - `default` int(2) unsigned NOT NULL default '0', - `userselect` int(2) unsigned NOT NULL default '0', - `debug` int(2) unsigned NOT NULL default '0', - PRIMARY KEY (`languageid`), - UNIQUE KEY `languagecode` (`languagecode`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "language +( + languageid int(10) unsigned NOT NULL AUTO_INCREMENT, + title varchar(255) NOT NULL, + languagecode varchar(5) NOT NULL, + charset varchar(15) NOT NULL, + direction char(3) NOT NULL, + filename varchar(255) NOT NULL, + userselect int(2) unsigned NOT NULL, + debug int(2) unsigned NOT NULL, + PRIMARY KEY (languageid), + UNIQUE KEY languagecode (languagecode) +)"; $query['localization'] = " -CREATE TABLE `" . TABLE_PREFIX . "localization` ( - `localid` int(10) unsigned NOT NULL auto_increment, - `localkey` mediumtext NOT NULL, - `localtext` mediumtext NOT NULL, - `languageid` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`localid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "localization +( + localid int(10) unsigned NOT NULL AUTO_INCREMENT, + localkey mediumtext NOT NULL, + localtext mediumtext NOT NULL, + languageid int(10) unsigned NOT NULL, + PRIMARY KEY (localid) +)"; $query['permission'] = " -CREATE TABLE `" . TABLE_PREFIX . "permission` ( - `usergroupid` int(10) unsigned NOT NULL default '0', - `productid` int(10) unsigned NOT NULL default '0', - `mask` int(5) NOT NULL default '0', - PRIMARY KEY (`usergroupid`,`productid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "permission +( + usergroupid int(10) unsigned NOT NULL, + productid int(10) unsigned NOT NULL, + mask int(5) NOT NULL, + PRIMARY KEY (usergroupid, productid) +)"; $query['priority'] = " -CREATE TABLE `" . TABLE_PREFIX . "priority` ( - `priorityid` int(10) unsigned NOT NULL auto_increment, - `priority` varchar(255) NOT NULL default '', - `displayorder` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`priorityid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "priority +( + priorityid int(10) unsigned NOT NULL AUTO_INCREMENT, + priority varchar(255) NOT NULL, + displayorder int(10) unsigned NOT NULL, + PRIMARY KEY (priorityid) +)"; $query['product'] = " -CREATE TABLE `" . TABLE_PREFIX . "product` ( - `productid` int(10) unsigned NOT NULL auto_increment, - `componentmother` int(10) unsigned NOT NULL default '0', - `shortname` varchar(255) NOT NULL default '', - `displayorder` int(10) unsigned NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `description` mediumtext NOT NULL, - PRIMARY KEY (`productid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "product +( + productid int(10) unsigned NOT NULL AUTO_INCREMENT, + componentmother int(10) unsigned NOT NULL, + displayorder int(10) unsigned NOT NULL, + title varchar(255) NOT NULL, + description mediumtext NOT NULL, + PRIMARY KEY (productid) +)"; $query['resolution'] = " -CREATE TABLE `" . TABLE_PREFIX . "resolution` ( - `resolutionid` int(10) unsigned NOT NULL auto_increment, - `resolution` varchar(255) NOT NULL default '', - `displayorder` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`resolutionid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "resolution +( + resolutionid int(10) unsigned NOT NULL AUTO_INCREMENT, + resolution varchar(255) NOT NULL, + displayorder int(10) unsigned NOT NULL, + PRIMARY KEY (resolutionid) +)"; $query['search'] = " -CREATE TABLE `" . TABLE_PREFIX . "search` ( - `userid` int(10) unsigned NOT NULL default '0', - `dateline` int(20) unsigned NOT NULL default '0', - `query` mediumtext NOT NULL, - `ids` mediumtext NOT NULL, - `orderby` mediumtext NOT NULL, - `hilight` varchar(255) NOT NULL default '', - PRIMARY KEY (`userid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "search +( + userid int(10) unsigned NOT NULL, + dateline int(20) unsigned NOT NULL, + query mediumtext NOT NULL, + ids mediumtext NOT NULL, + orderby mediumtext NOT NULL, + hilight varchar(255) NOT NULL, + PRIMARY KEY (userid) +)"; $query['setting'] = " -CREATE TABLE `" . TABLE_PREFIX . "setting` ( - `varname` varchar(255) NOT NULL default '', - `value` mediumtext NOT NULL, - PRIMARY KEY (`varname`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "setting +( + varname varchar(255) NOT NULL, + value mediumtext NOT NULL, + PRIMARY KEY (varname) +)"; $query['severity'] = " -CREATE TABLE `" . TABLE_PREFIX . "severity` ( - `severityid` int(10) unsigned NOT NULL auto_increment, - `severity` varchar(255) NOT NULL default '', - `displayorder` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`severityid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "severity +( + severityid int(10) unsigned NOT NULL AUTO_INCREMENT, + severity varchar(255) NOT NULL, + displayorder int(10) unsigned NOT NULL, + PRIMARY KEY (severityid) +)"; $query['status'] = " -CREATE TABLE `" . TABLE_PREFIX . "status` ( - `statusid` int(10) unsigned NOT NULL auto_increment, - `status` varchar(255) NOT NULL default '', - `displayorder` int(10) unsigned NOT NULL default '0', - `color` varchar(10) NOT NULL default '', - PRIMARY KEY (`statusid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "status +( + statusid int(10) unsigned NOT NULL AUTO_INCREMENT, + status varchar(255) NOT NULL, + displayorder int(10) unsigned NOT NULL, + color varchar(10) NOT NULL, + PRIMARY KEY (statusid) +)"; $query['user'] = " -CREATE TABLE `" . TABLE_PREFIX . "user` ( - `userid` int(10) unsigned NOT NULL auto_increment, - `email` varchar(255) NOT NULL default '', - `displayname` varchar(255) NOT NULL default '', - `usergroupid` int(10) unsigned NOT NULL default '0', - `password` varchar(32) NOT NULL default '', - `salt` varchar(15) NOT NULL default '', - `authkey` varchar(65) NOT NULL default '', - `showemail` int(2) unsigned NOT NULL default '0', - `showcolours` int(2) unsigned NOT NULL default '0', - `languageid` int(10) unsigned NOT NULL default '0', - `timezone` int(4) NOT NULL default '0', - PRIMARY KEY (`userid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "user +( + userid int(10) unsigned NOT NULL AUTO_INCREMENT, + email varchar(255) NOT NULL, + displayname varchar(255) NOT NULL, + usergroupid int(10) unsigned NOT NULL, + password varchar(32) NOT NULL, + salt varchar(15) NOT NULL, + authkey varchar(65) NOT NULL, + showemail int(2) unsigned NOT NULL, + showcolours int(2) unsigned NOT NULL, + languageid int(10) unsigned NOT NULL, + timezone int(4) NOT NULL, + PRIMARY KEY (userid) +)"; $query['useractivation'] = " -CREATE TABLE `" . TABLE_PREFIX . "useractivation` ( - `activator` varchar(25) NOT NULL default '', - `userid` int(10) unsigned NOT NULL default '0', - `dateline` int(10) unsigned NOT NULL default '0', - `usergroupid` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`activator`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "useractivation +( + activator varchar(25) NOT NULL, + userid int(10) unsigned NOT NULL, + dateline int(10) unsigned NOT NULL, + usergroupid int(10) unsigned NOT NULL, + PRIMARY KEY (activator) +)"; $query['usergroup'] = " -CREATE TABLE `" . TABLE_PREFIX . "usergroup` ( - `usergroupid` int(10) unsigned NOT NULL auto_increment, - `title` varchar(255) NOT NULL default '', - `displaytitle` varchar(255) NOT NULL default '', - `opentag` varchar(255) NOT NULL default '', - `closetag` varchar(255) NOT NULL default '', - `permissions` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`usergroupid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "usergroup +( + usergroupid int(10) unsigned NOT NULL AUTO_INCREMENT, + title varchar(255) NOT NULL, + displaytitle varchar(255) NOT NULL, + permissions int(10) unsigned NOT NULL, + PRIMARY KEY (usergroupid) +)"; $query['version'] = " -CREATE TABLE `" . TABLE_PREFIX . "version` ( - `versionid` int(10) unsigned NOT NULL auto_increment, - `productid` int(10) unsigned NOT NULL default '0', - `version` varchar(255) NOT NULL default '', - `displayorder` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`versionid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "version +( + versionid int(10) unsigned NOT NULL AUTO_INCREMENT, + productid int(10) unsigned NOT NULL, + version varchar(255) NOT NULL, + displayorder int(10) unsigned NOT NULL, + PRIMARY KEY (versionid) +)"; $query['vote'] = " -CREATE TABLE `" . TABLE_PREFIX . "vote` ( - `bugid` int(10) unsigned NOT NULL default '0', - `userids` mediumtext NOT NULL, - `votefor` int(10) unsigned NOT NULL default '0', - `voteagainst` int(10) unsigned NOT NULL default '0', - PRIMARY KEY (`bugid`) -) ENGINE=MyISAM; -"; +CREATE TABLE " . TABLE_PREFIX . "vote +( + bugid int(10) unsigned NOT NULL, + userids mediumtext NOT NULL, + votefor int(10) unsigned NOT NULL, + voteagainst int(10) unsigned NOT NULL, + PRIMARY KEY (bugid) +)"; /*=====================================================================*\ || ################################################################### -- 2.43.5