From 2bb36f45785f66a384ae0535deb4515cff038ad6 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 1 Aug 2006 00:14:26 +0000 Subject: [PATCH] r986: Updating the installer schema --- install/schema.php | 296 +++++++++++++++++++++++---------------------- 1 file changed, 153 insertions(+), 143 deletions(-) diff --git a/install/schema.php b/install/schema.php index 821ac3c..f340801 100644 --- a/install/schema.php +++ b/install/schema.php @@ -22,311 +22,321 @@ $query['attachment'] = " CREATE TABLE " . TABLE_PREFIX . "attachment ( - attachmentid int(10) unsigned NOT NULL AUTO_INCREMENT, - bugid int(10) unsigned NOT NULL, + attachmentid int unsigned NOT NULL AUTO_INCREMENT, + bugid int unsigned NOT NULL, filename varchar(255) NOT NULL, mimetype varchar(255) NOT NULL, - filesize int(20) unsigned NOT NULL, - attachment mediumblob NOT NULL, + filesize bigint unsigned NOT NULL, + attachment blob 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, + dateline bigint unsigned NOT NULL, + userid int unsigned NOT NULL, + obsolete bool unsigned NOT NULL, PRIMARY KEY (attachmentid) -)"; +);"; $query['autoaction'] = " CREATE TABLE " . TABLE_PREFIX . "autoaction ( - actionid int(10) unsigned NOT NULL AUTO_INCREMENT, + actionid int unsigned NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, - description mediumtext NOT NULL, - fieldchanges mediumtext NOT NULL, - comment mediumtext NOT NULL, + description text NOT NULL, + fieldchanges text NOT NULL, + comment text 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, - dateline int(20) unsigned NOT NULL, - productid int(10) unsigned NOT NULL, - componentid int(10) unsigned NOT NULL, - versionid int(10) unsigned NOT NULL, + bugid int unsigned NOT NULL AUTO_INCREMENT, + userid int unsigned NOT NULL, + dateline bigint unsigned NOT NULL, + product int unsigned NOT NULL, + component int unsigned NOT NULL, + version int 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, + priority int unsigned NOT NULL, + severity int unsigned NOT NULL, + status int unsigned NOT NULL, + resolution int unsigned NOT NULL, + assignedto int unsigned NOT NULL, + duplicateof int unsigned NOT NULL, + dependency text NOT NULL, + hidden smallint unsigned NOT NULL, + initialreport int unsigned NOT NULL, + lastposttime bigint unsigned NOT NULL, + lastpostby int unsigned NOT NULL, + hiddenlastposttime int unsigned NOT NULL, + hiddenlastpostby int unsigned NOT NULL, + username varchar(255) NOT NULL, + lastpostbyname varchar(255) NOT NULL, + hiddenlastpostbyname varchar(255) NOT NULL, PRIMARY KEY (bugid), FULLTEXT KEY summary (summary) -)"; +);"; $query['bugfield'] = " CREATE TABLE " . TABLE_PREFIX . "bugfield ( - fieldid int(10) unsigned NOT NULL AUTO_INCREMENT, + fieldid int unsigned NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, - description mediumtext NOT NULL, + description text 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, + selects text NOT NULL, + required smallint NOT NULL, + cansearch smallint NOT NULL, + regexmatch text NOT NULL, + defaultvalue text NOT NULL, + usedefault smallint NOT NULL, + maxlength smallint unsigned NOT NULL, PRIMARY KEY (fieldid) -)"; +);"; $query['bugfieldpermission'] = " CREATE TABLE " . TABLE_PREFIX . "bugfieldpermission ( - usergroupid int(10) unsigned NOT NULL, - fieldid int(10) unsigned NOT NULL, - mask int(5) unsigned NOT NULL, + usergroupid int unsigned NOT NULL, + fieldid int unsigned NOT NULL, + mask smallint unsigned NOT NULL, PRIMARY KEY (usergroupid, fieldid) -)"; +);"; $query['bugvaluefill'] = " CREATE TABLE " . TABLE_PREFIX . "bugvaluefill ( - bugid int(10) unsigned NOT NULL, + bugid int unsigned NOT NULL, + field2 text NULL, + field4 text NULL, + field5 text 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, - 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, + commentid int unsigned NOT NULL AUTO_INCREMENT, + bugid int unsigned NOT NULL, + userid int unsigned NOT NULL, + dateline bigint unsigned NOT NULL, + comment text NOT NULL, + comment_parsed text NOT NULL, + hidden smallint unsigned NOT NULL, PRIMARY KEY (commentid), FULLTEXT KEY comment (comment) -)"; +);"; $query['datastore'] = " CREATE TABLE " . TABLE_PREFIX . "datastore ( title varchar(255) NOT NULL, - data mediumtext NOT NULL, + data text 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, - dependson int(10) unsigned NOT NULL, - PRIMARY KEY (dependencyid) -)"; +);"; $query['favourite'] = " CREATE TABLE " . TABLE_PREFIX . "favourite ( - userid int(10) unsigned NOT NULL, - bugid int(10) unsigned NOT NULL, + userid int unsigned NOT NULL, + bugid int 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, + body text 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, - attachmentid int(10) unsigned NOT NULL, - commentid int(10) unsigned NOT NULL, - dateline int(20) unsigned NOT NULL, - userid int(10) unsigned NOT NULL, + historyid bigint unsigned NOT NULL AUTO_INCREMENT, + bugid int unsigned NOT NULL, + attachmentid int unsigned NOT NULL, + commentid int unsigned NOT NULL, + dateline bigint unsigned NOT NULL, + userid int unsigned NOT NULL, field varchar(255) NOT NULL, - original mediumtext NOT NULL, - changed mediumtext NOT NULL, + original text NOT NULL, + changed text NOT NULL, PRIMARY KEY (historyid) -)"; +);"; $query['language'] = " CREATE TABLE " . TABLE_PREFIX . "language ( - languageid int(10) unsigned NOT NULL AUTO_INCREMENT, + languageid int 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, + userselect smallint unsigned NOT NULL, + debug smallint 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, + localid int unsigned NOT NULL AUTO_INCREMENT, + localkey text NOT NULL, + localtext text NOT NULL, + languageid int unsigned NOT NULL, PRIMARY KEY (localid) -)"; +);"; $query['permission'] = " CREATE TABLE " . TABLE_PREFIX . "permission ( - usergroupid int(10) unsigned NOT NULL, - productid int(10) unsigned NOT NULL, - mask int(5) NOT NULL, + usergroupid int unsigned NOT NULL, + productid int unsigned NOT NULL, + mask smallint NOT NULL, PRIMARY KEY (usergroupid, productid) -)"; +);"; $query['priority'] = " CREATE TABLE " . TABLE_PREFIX . "priority ( - priorityid int(10) unsigned NOT NULL AUTO_INCREMENT, + priorityid int unsigned NOT NULL AUTO_INCREMENT, priority varchar(255) NOT NULL, - displayorder int(10) unsigned NOT NULL, + displayorder int 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, - displayorder int(10) unsigned NOT NULL, + productid int unsigned NOT NULL AUTO_INCREMENT, + componentmother int unsigned NOT NULL, + displayorder int unsigned NOT NULL, title varchar(255) NOT NULL, - description mediumtext NOT NULL, + description text NOT NULL, PRIMARY KEY (productid) -)"; +);"; $query['resolution'] = " CREATE TABLE " . TABLE_PREFIX . "resolution ( - resolutionid int(10) unsigned NOT NULL AUTO_INCREMENT, + resolutionid int unsigned NOT NULL AUTO_INCREMENT, resolution varchar(255) NOT NULL, - displayorder int(10) unsigned NOT NULL, + displayorder int unsigned NOT NULL, PRIMARY KEY (resolutionid) -)"; +);"; $query['search'] = " 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, + userid int unsigned NOT NULL, + dateline bigint unsigned NOT NULL, + query text NOT NULL, + ids text NOT NULL, + orderby text NOT NULL, hilight varchar(255) NOT NULL, + resultcount int NULL, PRIMARY KEY (userid) -)"; +);"; $query['setting'] = " CREATE TABLE " . TABLE_PREFIX . "setting ( varname varchar(255) NOT NULL, - value mediumtext NOT NULL, + value text NOT NULL, PRIMARY KEY (varname) -)"; +);"; $query['severity'] = " CREATE TABLE " . TABLE_PREFIX . "severity ( - severityid int(10) unsigned NOT NULL AUTO_INCREMENT, + severityid int unsigned NOT NULL AUTO_INCREMENT, severity varchar(255) NOT NULL, - displayorder int(10) unsigned NOT NULL, + displayorder int unsigned NOT NULL, PRIMARY KEY (severityid) -)"; +);"; $query['status'] = " CREATE TABLE " . TABLE_PREFIX . "status ( - statusid int(10) unsigned NOT NULL AUTO_INCREMENT, + statusid int unsigned NOT NULL AUTO_INCREMENT, status varchar(255) NOT NULL, - displayorder int(10) unsigned NOT NULL, + displayorder int 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, + userid int unsigned NOT NULL AUTO_INCREMENT, email varchar(255) NOT NULL, displayname varchar(255) NOT NULL, - usergroupid int(10) unsigned NOT NULL, + usergroupid int 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, + showemail smallint unsigned NOT NULL, + showcolours smallint unsigned NOT NULL, + languageid int unsigned NOT NULL, + timezone smallint NOT NULL, + usedst bool NOT NULL, + hidestatuses text NOT NULL, + defaultsortkey varchar(50) NULL, + defaultsortas varchar(10) NULL, PRIMARY KEY (userid) -)"; +);"; $query['useractivation'] = " 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, + userid int unsigned NOT NULL, + dateline int unsigned NOT NULL, + usergroupid int unsigned NOT NULL, PRIMARY KEY (activator) -)"; +);"; + +$query['useremail'] = " +CREATE TABLE " . TABLE_PREFIX . "useremail +( + userid int unsigned NOT NULL, + mask int unsigned NOT NULL, + relation int unsigned NOT NULL +);"; $query['usergroup'] = " CREATE TABLE " . TABLE_PREFIX . "usergroup ( - usergroupid int(10) unsigned NOT NULL AUTO_INCREMENT, + usergroupid int unsigned NOT NULL AUTO_INCREMENT, title varchar(255) NOT NULL, displaytitle varchar(255) NOT NULL, - permissions int(10) unsigned NOT NULL, + permissions int 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, + versionid int unsigned NOT NULL AUTO_INCREMENT, + productid int unsigned NOT NULL, version varchar(255) NOT NULL, - displayorder int(10) unsigned NOT NULL, + displayorder int unsigned NOT NULL, PRIMARY KEY (versionid) -)"; +);"; $query['vote'] = " 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, + bugid int unsigned NOT NULL, + userids text NOT NULL, + votefor int unsigned NOT NULL, + voteagainst int unsigned NOT NULL, PRIMARY KEY (bugid) -)"; +);"; /*=====================================================================*\ || ################################################################### -- 2.22.5