"Fossies" - the Fresh Open Source Software Archive

Member "Upload/install/resources/mysql_db_tables.php" (8 Jun 2019, 44123 Bytes) of package /linux/www/mybb_1821.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mysql_db_tables.php" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1817_vs_1818.

    1 <?php
    2 /**
    3  * MyBB 1.8
    4  * Copyright 2014 MyBB Group, All Rights Reserved
    5  *
    6  * Website: http://www.mybb.com
    7  * License: http://www.mybb.com/about/license
    8  *
    9  */
   10 
   11 $tables[] = "CREATE TABLE mybb_adminlog (
   12   uid int unsigned NOT NULL default '0',
   13   ipaddress varbinary(16) NOT NULL default '',
   14   dateline int unsigned NOT NULL default '0',
   15   module varchar(50) NOT NULL default '',
   16   action varchar(50) NOT NULL default '',
   17   data text NOT NULL,
   18   KEY module (module, action),
   19   KEY uid (uid)
   20 ) ENGINE=MyISAM;";
   21 
   22 $tables[] = "CREATE TABLE mybb_adminoptions (
   23   uid int NOT NULL default '0',
   24   cpstyle varchar(50) NOT NULL default '',
   25   cplanguage varchar(50) NOT NULL default '',
   26   codepress tinyint(1) NOT NULL default '1',
   27   notes text NOT NULL,
   28   permissions text NOT NULL,
   29   defaultviews text NOT NULL,
   30   loginattempts smallint unsigned NOT NULL default '0',
   31   loginlockoutexpiry int unsigned NOT NULL default '0',
   32   authsecret varchar(16) NOT NULL default '',
   33   recovery_codes varchar(177) NOT NULL default '',
   34   PRIMARY KEY (uid)
   35 ) ENGINE=MyISAM;";
   36 
   37 $tables[] = "CREATE TABLE mybb_adminsessions (
   38   sid varchar(32) NOT NULL default '',
   39   uid int unsigned NOT NULL default '0',
   40   loginkey varchar(50) NOT NULL default '',
   41   ip varbinary(16) NOT NULL default '',
   42   dateline int unsigned NOT NULL default '0',
   43   lastactive int unsigned NOT NULL default '0',
   44   data TEXT NOT NULL,
   45   useragent varchar(200) NOT NULL default '',
   46   authenticated tinyint(1) NOT NULL default '0'
   47 ) ENGINE=MyISAM;";
   48 
   49 $tables[] = "CREATE TABLE mybb_adminviews (
   50     vid int unsigned NOT NULL auto_increment,
   51     uid int unsigned NOT NULL default '0',
   52     title varchar(100) NOT NULL default '',
   53     type varchar(6) NOT NULL default '',
   54     visibility tinyint(1) NOT NULL default '0',
   55     `fields` text NOT NULL,
   56     conditions text NOT NULL,
   57     custom_profile_fields text NOT NULL,
   58     sortby varchar(20) NOT NULL default '',
   59     sortorder varchar(4) NOT NULL default '',
   60     perpage smallint(4) unsigned NOT NULL default '0',
   61     view_type varchar(6) NOT NULL default '',
   62     PRIMARY KEY (vid)
   63 ) ENGINE=MyISAM;";
   64 
   65 $tables[] = "CREATE TABLE mybb_announcements (
   66   aid int unsigned NOT NULL auto_increment,
   67   fid int NOT NULL default '0',
   68   uid int unsigned NOT NULL default '0',
   69   subject varchar(120) NOT NULL default '',
   70   message text NOT NULL,
   71   startdate int unsigned NOT NULL default '0',
   72   enddate int unsigned NOT NULL default '0',
   73   allowhtml tinyint(1) NOT NULL default '0',
   74   allowmycode tinyint(1) NOT NULL default '0',
   75   allowsmilies tinyint(1) NOT NULL default '0',
   76   KEY fid (fid),
   77   PRIMARY KEY (aid)
   78 ) ENGINE=MyISAM;";
   79 
   80 $tables[] = "CREATE TABLE mybb_attachments (
   81   aid int unsigned NOT NULL auto_increment,
   82   pid int unsigned NOT NULL default '0',
   83   posthash varchar(50) NOT NULL default '',
   84   uid int unsigned NOT NULL default '0',
   85   filename varchar(120) NOT NULL default '',
   86   filetype varchar(120) NOT NULL default '',
   87   filesize int(10) unsigned NOT NULL default '0',
   88   attachname varchar(120) NOT NULL default '',
   89   downloads int unsigned NOT NULL default '0',
   90   dateuploaded int unsigned NOT NULL default '0',
   91   visible tinyint(1) NOT NULL default '0',
   92   thumbnail varchar(120) NOT NULL default '',
   93   KEY pid (pid, visible),
   94   KEY uid (uid),
   95   PRIMARY KEY (aid)
   96 ) ENGINE=MyISAM;";
   97 
   98 $tables[] = "CREATE TABLE mybb_attachtypes (
   99   atid int unsigned NOT NULL auto_increment,
  100   name varchar(120) NOT NULL default '',
  101   mimetype varchar(120) NOT NULL default '',
  102   extension varchar(10) NOT NULL default '',
  103   maxsize int(15) unsigned NOT NULL default '0',
  104   icon varchar(100) NOT NULL default '',
  105   enabled tinyint(1) NOT NULL default '1',
  106   `groups` TEXT NOT NULL,
  107   forums TEXT NOT NULL,
  108   avatarfile tinyint(1) NOT NULL default '0',
  109   PRIMARY KEY (atid)
  110 ) ENGINE=MyISAM;";
  111 
  112 $tables[] = "CREATE TABLE mybb_awaitingactivation (
  113   aid int unsigned NOT NULL auto_increment,
  114   uid int unsigned NOT NULL default '0',
  115   dateline int unsigned NOT NULL default '0',
  116   code varchar(100) NOT NULL default '',
  117   type char(1) NOT NULL default '',
  118   validated tinyint(1) NOT NULL default '0',
  119   misc varchar(255) NOT NULL default '',
  120   PRIMARY KEY (aid)
  121 ) ENGINE=MyISAM;";
  122 
  123 $tables[] = "CREATE TABLE mybb_badwords (
  124   bid int unsigned NOT NULL auto_increment,
  125   badword varchar(100) NOT NULL default '',
  126   regex tinyint(1) NOT NULL default '0',
  127   replacement varchar(100) NOT NULL default '',
  128   PRIMARY KEY (bid)
  129 ) ENGINE=MyISAM;";
  130 
  131 $tables[] = "CREATE TABLE mybb_banfilters (
  132   fid int unsigned NOT NULL auto_increment,
  133   filter varchar(200) NOT NULL default '',
  134   type tinyint(1) NOT NULL default '0',
  135   lastuse int unsigned NOT NULL default '0',
  136   dateline int unsigned NOT NULL default '0',
  137   KEY (type),
  138   PRIMARY KEY (fid)
  139 ) ENGINE=MyISAM;";
  140 
  141 $tables[] = "CREATE TABLE mybb_banned (
  142   uid int unsigned NOT NULL default '0',
  143   gid int unsigned NOT NULL default '0',
  144   oldgroup int unsigned NOT NULL default '0',
  145   oldadditionalgroups text NOT NULL,
  146   olddisplaygroup int unsigned NOT NULL default '0',
  147   admin int unsigned NOT NULL default '0',
  148   dateline int unsigned NOT NULL default '0',
  149   bantime varchar(50) NOT NULL default '',
  150   lifted int unsigned NOT NULL default '0',
  151   reason varchar(255) NOT NULL default '',
  152   KEY uid (uid),
  153   KEY dateline (dateline)
  154 ) ENGINE=MyISAM;";
  155 
  156 $tables[] = "CREATE TABLE mybb_buddyrequests (
  157   id int(10) unsigned NOT NULL auto_increment,
  158   uid int unsigned NOT NULL default '0',
  159   touid int unsigned NOT NULL default '0',
  160   date int unsigned NOT NULL default '0',
  161   KEY (uid),
  162   KEY (touid),
  163   PRIMARY KEY (id)
  164 ) ENGINE=MyISAM;";
  165 
  166 $tables[] = "CREATE TABLE mybb_calendars (
  167   cid int unsigned NOT NULL auto_increment,
  168   name varchar(100) NOT NULL default '',
  169   disporder smallint unsigned NOT NULL default '0',
  170   startofweek tinyint(1) NOT NULL default '0',
  171   showbirthdays tinyint(1) NOT NULL default '0',
  172   eventlimit smallint(3) unsigned NOT NULL default '0',
  173   moderation tinyint(1) NOT NULL default '0',
  174   allowhtml tinyint(1) NOT NULL default '0',
  175   allowmycode tinyint(1) NOT NULL default '0',
  176   allowimgcode tinyint(1) NOT NULL default '0',
  177   allowvideocode tinyint(1) NOT NULL default '0',
  178   allowsmilies tinyint(1) NOT NULL default '0',
  179   PRIMARY KEY (cid)
  180 ) ENGINE=MyISAM;";
  181 
  182 $tables[] = "CREATE TABLE mybb_calendarpermissions (
  183   cid int unsigned NOT NULL default '0',
  184   gid int unsigned NOT NULL default '0',
  185   canviewcalendar tinyint(1) NOT NULL default '0',
  186   canaddevents tinyint(1) NOT NULL default '0',
  187   canbypasseventmod tinyint(1) NOT NULL default '0',
  188   canmoderateevents tinyint(1) NOT NULL default '0'
  189 ) ENGINE=MyISAM;";
  190 
  191 $tables[] = "CREATE TABLE mybb_captcha (
  192   imagehash varchar(32) NOT NULL default '',
  193   imagestring varchar(8) NOT NULL default '',
  194   dateline int unsigned NOT NULL default '0',
  195   used tinyint(1) NOT NULL default '0',
  196   KEY imagehash (imagehash),
  197   KEY dateline (dateline)
  198 ) ENGINE=MyISAM;";
  199 
  200 $tables[] = "CREATE TABLE mybb_datacache (
  201   title varchar(50) NOT NULL default '',
  202   cache mediumtext NOT NULL,
  203   PRIMARY KEY (title)
  204 ) ENGINE=MyISAM;";
  205 
  206 $tables[] = "CREATE TABLE mybb_delayedmoderation (
  207   did int unsigned NOT NULL auto_increment,
  208   type varchar(30) NOT NULL default '',
  209   delaydateline int unsigned NOT NULL default '0',
  210   uid int(10) unsigned NOT NULL default '0',
  211   fid smallint(5) unsigned NOT NULL default '0',
  212   tids text NOT NULL,
  213   dateline int unsigned NOT NULL default '0',
  214   inputs text NOT NULL,
  215   PRIMARY KEY (did)
  216 ) ENGINE=MyISAM;";
  217 
  218 $tables[] = "CREATE TABLE mybb_events (
  219   eid int unsigned NOT NULL auto_increment,
  220   cid int unsigned NOT NULL default '0',
  221   uid int unsigned NOT NULL default '0',
  222   name varchar(120) NOT NULL default '',
  223   description text NOT NULL,
  224   visible tinyint(1) NOT NULL default '0',
  225   private tinyint(1) NOT NULL default '0',
  226   dateline int(10) unsigned NOT NULL default '0',
  227   starttime int(10) unsigned NOT NULL default '0',
  228   endtime int(10) unsigned NOT NULL default '0',
  229   timezone varchar(5) NOT NULL default '',
  230   ignoretimezone tinyint(1) NOT NULL default '0',
  231   usingtime tinyint(1) NOT NULL default '0',
  232   repeats text NOT NULL,
  233   KEY cid (cid),
  234   KEY daterange (starttime, endtime),
  235   KEY private (private),
  236   PRIMARY KEY  (eid)
  237 ) ENGINE=MyISAM;";
  238 
  239 $tables[] = "CREATE TABLE mybb_forumpermissions (
  240   pid int unsigned NOT NULL auto_increment,
  241   fid int unsigned NOT NULL default '0',
  242   gid int unsigned NOT NULL default '0',
  243   canview tinyint(1) NOT NULL default '0',
  244   canviewthreads tinyint(1) NOT NULL default '0',
  245   canonlyviewownthreads tinyint(1) NOT NULL default '0',
  246   candlattachments tinyint(1) NOT NULL default '0',
  247   canpostthreads tinyint(1) NOT NULL default '0',
  248   canpostreplys tinyint(1) NOT NULL default '0',
  249   canonlyreplyownthreads tinyint(1) NOT NULL default '0',
  250   canpostattachments tinyint(1) NOT NULL default '0',
  251   canratethreads tinyint(1) NOT NULL default '0',
  252   caneditposts tinyint(1) NOT NULL default '0',
  253   candeleteposts tinyint(1) NOT NULL default '0',
  254   candeletethreads tinyint(1) NOT NULL default '0',
  255   caneditattachments tinyint(1) NOT NULL default '0',
  256   canviewdeletionnotice tinyint(1) NOT NULL default '0',
  257   modposts tinyint(1) NOT NULL default '0',
  258   modthreads tinyint(1) NOT NULL default '0',
  259   mod_edit_posts tinyint(1) NOT NULL default '0',
  260   modattachments tinyint(1) NOT NULL default '0',
  261   canpostpolls tinyint(1) NOT NULL default '0',
  262   canvotepolls tinyint(1) NOT NULL default '0',
  263   cansearch tinyint(1) NOT NULL default '0',
  264   KEY fid (fid, gid),
  265   PRIMARY KEY (pid)
  266 ) ENGINE=MyISAM;";
  267 
  268 $tables[] = "CREATE TABLE mybb_forums (
  269   fid smallint unsigned NOT NULL auto_increment,
  270   name varchar(120) NOT NULL default '',
  271   description text NOT NULL,
  272   linkto varchar(180) NOT NULL default '',
  273   type char(1) NOT NULL default '',
  274   pid smallint unsigned NOT NULL default '0',
  275   parentlist text NOT NULL,
  276   disporder smallint unsigned NOT NULL default '0',
  277   active tinyint(1) NOT NULL default '0',
  278   open tinyint(1) NOT NULL default '0',
  279   threads int unsigned NOT NULL default '0',
  280   posts int unsigned NOT NULL default '0',
  281   lastpost int(10) unsigned NOT NULL default '0',
  282   lastposter varchar(120) NOT NULL default '',
  283   lastposteruid int(10) unsigned NOT NULL default '0',
  284   lastposttid int(10) unsigned NOT NULL default '0',
  285   lastpostsubject varchar(120) NOT NULL default '',
  286   allowhtml tinyint(1) NOT NULL default '0',
  287   allowmycode tinyint(1) NOT NULL default '0',
  288   allowsmilies tinyint(1) NOT NULL default '0',
  289   allowimgcode tinyint(1) NOT NULL default '0',
  290   allowvideocode tinyint(1) NOT NULL default '0',
  291   allowpicons tinyint(1) NOT NULL default '0',
  292   allowtratings tinyint(1) NOT NULL default '0',
  293   usepostcounts tinyint(1) NOT NULL default '0',
  294   usethreadcounts tinyint(1) NOT NULL default '0',
  295   requireprefix tinyint(1) NOT NULL default '0',
  296   password varchar(50) NOT NULL default '',
  297   showinjump tinyint(1) NOT NULL default '0',
  298   style smallint unsigned NOT NULL default '0',
  299   overridestyle tinyint(1) NOT NULL default '0',
  300   rulestype tinyint(1) NOT NULL default '0',
  301   rulestitle varchar(200) NOT NULL default '',
  302   rules text NOT NULL,
  303   unapprovedthreads int(10) unsigned NOT NULL default '0',
  304   unapprovedposts int(10) unsigned NOT NULL default '0',
  305   deletedthreads int(10) unsigned NOT NULL default '0',
  306   deletedposts int(10) unsigned NOT NULL default '0',
  307   defaultdatecut smallint(4) unsigned NOT NULL default '0',
  308   defaultsortby varchar(10) NOT NULL default '',
  309   defaultsortorder varchar(4) NOT NULL default '',
  310   PRIMARY KEY (fid)
  311 ) ENGINE=MyISAM;";
  312 
  313 $tables[] = "CREATE TABLE mybb_forumsread (
  314   fid int unsigned NOT NULL default '0',
  315   uid int unsigned NOT NULL default '0',
  316   dateline int unsigned NOT NULL default '0',
  317   KEY dateline (dateline),
  318   UNIQUE KEY fid (fid, uid)
  319 ) ENGINE=MyISAM;";
  320 
  321 $tables[] = "CREATE TABLE mybb_forumsubscriptions (
  322   fsid int unsigned NOT NULL auto_increment,
  323   fid smallint unsigned NOT NULL default '0',
  324   uid int unsigned NOT NULL default '0',
  325   KEY uid (uid),
  326   PRIMARY KEY (fsid)
  327 ) ENGINE=MyISAM;";
  328 
  329 $tables[] = "CREATE TABLE mybb_groupleaders (
  330   lid smallint unsigned NOT NULL auto_increment,
  331   gid smallint unsigned NOT NULL default '0',
  332   uid int unsigned NOT NULL default '0',
  333   canmanagemembers tinyint(1) NOT NULL default '0',
  334   canmanagerequests tinyint(1) NOT NULL default '0',
  335   caninvitemembers tinyint(1) NOT NULL default '0',
  336   PRIMARY KEY (lid)
  337 ) ENGINE=MyISAM;";
  338 
  339 $tables[] = "CREATE TABLE mybb_helpdocs (
  340   hid smallint unsigned NOT NULL auto_increment,
  341   sid smallint unsigned NOT NULL default '0',
  342   name varchar(120) NOT NULL default '',
  343   description text NOT NULL,
  344   document text NOT NULL,
  345   usetranslation tinyint(1) NOT NULL default '0',
  346   enabled tinyint(1) NOT NULL default '0',
  347   disporder smallint unsigned NOT NULL default '0',
  348   PRIMARY KEY (hid)
  349 ) ENGINE=MyISAM;";
  350 
  351 $tables[] = "CREATE TABLE mybb_helpsections (
  352   sid smallint unsigned NOT NULL auto_increment,
  353   name varchar(120) NOT NULL default '',
  354   description text NOT NULL,
  355   usetranslation tinyint(1) NOT NULL default '0',
  356   enabled tinyint(1) NOT NULL default '0',
  357   disporder smallint unsigned NOT NULL default '0',
  358   PRIMARY KEY (sid)
  359 ) ENGINE=MyISAM;";
  360 
  361 $tables[] = "CREATE TABLE mybb_icons (
  362   iid smallint unsigned NOT NULL auto_increment,
  363   name varchar(120) NOT NULL default '',
  364   path varchar(220) NOT NULL default '',
  365   PRIMARY KEY (iid)
  366 ) ENGINE=MyISAM;";
  367 
  368 $tables[] = "CREATE TABLE mybb_joinrequests (
  369   rid int unsigned NOT NULL auto_increment,
  370   uid int unsigned NOT NULL default '0',
  371   gid smallint unsigned NOT NULL default '0',
  372   reason varchar(250) NOT NULL default '',
  373   dateline int unsigned NOT NULL default '0',
  374   invite tinyint(1) NOT NULL default '0',
  375   PRIMARY KEY (rid)
  376 ) ENGINE=MyISAM;";
  377 
  378 $tables[] = "CREATE TABLE mybb_massemails (
  379     mid int unsigned NOT NULL auto_increment,
  380     uid int unsigned NOT NULL default '0',
  381     subject varchar(200) NOT NULL default '',
  382     message text NOT NULL,
  383     htmlmessage text NOT NULL,
  384     type tinyint(1) NOT NULL default '0',
  385     format tinyint(1) NOT NULL default '0',
  386     dateline int unsigned NOT NULL default '0',
  387     senddate int unsigned NOT NULL default '0',
  388     status tinyint(1) NOT NULL default '0',
  389     sentcount int unsigned NOT NULL default '0',
  390     totalcount int unsigned NOT NULL default '0',
  391     conditions text NOT NULL,
  392     perpage smallint(4) unsigned NOT NULL default '50',
  393     PRIMARY KEY (mid)
  394 ) ENGINE=MyISAM;";
  395 
  396 $tables[] = "CREATE TABLE mybb_mailerrors (
  397   eid int unsigned NOT NULL auto_increment,
  398   subject varchar(200) NOT NULL default '',
  399   message text NOT NULL,
  400   toaddress varchar(150) NOT NULL default '',
  401   fromaddress varchar(150) NOT NULL default '',
  402   dateline int unsigned NOT NULL default '0',
  403   error text NOT NULL,
  404   smtperror varchar(200) NOT NULL default '',
  405   smtpcode smallint(5) unsigned NOT NULL default '0',
  406   PRIMARY KEY (eid)
  407 ) ENGINE=MyISAM;";
  408 
  409 $tables[] = "CREATE TABLE mybb_maillogs (
  410     mid int unsigned NOT NULL auto_increment,
  411     subject varchar(200) not null default '',
  412     message text NOT NULL,
  413     dateline int unsigned NOT NULL default '0',
  414     fromuid int unsigned NOT NULL default '0',
  415     fromemail varchar(200) not null default '',
  416     touid int unsigned NOT NULL default '0',
  417     toemail varchar(200) NOT NULL default '',
  418     tid int unsigned NOT NULL default '0',
  419     ipaddress varbinary(16) NOT NULL default '',
  420     type tinyint(1) NOT NULL default '0',
  421     PRIMARY KEY (mid)
  422 ) ENGINE=MyISAM;";
  423 
  424 $tables[] = "CREATE TABLE mybb_mailqueue (
  425     mid int unsigned NOT NULL auto_increment,
  426     mailto varchar(200) NOT NULL,
  427     mailfrom varchar(200) NOT NULL,
  428     subject varchar(200) NOT NULL,
  429     message text NOT NULL,
  430     headers text NOT NULL,
  431     PRIMARY KEY (mid)
  432 ) ENGINE=MyISAM;";
  433 
  434 $tables[] = "CREATE TABLE mybb_moderatorlog (
  435   uid int unsigned NOT NULL default '0',
  436   dateline int unsigned NOT NULL default '0',
  437   fid smallint unsigned NOT NULL default '0',
  438   tid int unsigned NOT NULL default '0',
  439   pid int unsigned NOT NULL default '0',
  440   action text NOT NULL,
  441   data text NOT NULL,
  442   ipaddress varbinary(16) NOT NULL default '',
  443   KEY uid (uid),
  444   KEY fid (fid),
  445   KEY tid (tid)
  446 ) ENGINE=MyISAM;";
  447 
  448 $tables[] = "CREATE TABLE mybb_moderators (
  449   mid smallint unsigned NOT NULL auto_increment,
  450   fid smallint unsigned NOT NULL default '0',
  451   id int unsigned NOT NULL default '0',
  452   isgroup tinyint(1) unsigned NOT NULL default '0',
  453   caneditposts tinyint(1) NOT NULL default '0',
  454   cansoftdeleteposts tinyint(1) NOT NULL default '0',
  455   canrestoreposts tinyint(1) NOT NULL default '0',
  456   candeleteposts tinyint(1) NOT NULL default '0',
  457   cansoftdeletethreads tinyint(1) NOT NULL default '0',
  458   canrestorethreads tinyint(1) NOT NULL default '0',
  459   candeletethreads tinyint(1) NOT NULL default '0',
  460   canviewips tinyint(1) NOT NULL default '0',
  461   canviewunapprove tinyint(1) NOT NULL default '0',
  462   canviewdeleted tinyint(1) NOT NULL default '0',
  463   canopenclosethreads tinyint(1) NOT NULL default '0',
  464   canstickunstickthreads tinyint(1) NOT NULL default '0',
  465   canapproveunapprovethreads tinyint(1) NOT NULL default '0',
  466   canapproveunapproveposts tinyint(1) NOT NULL default '0',
  467   canapproveunapproveattachs tinyint(1) NOT NULL default '0',
  468   canmanagethreads tinyint(1) NOT NULL default '0',
  469   canmanagepolls tinyint(1) NOT NULL default '0',
  470   canpostclosedthreads tinyint(1) NOT NULL default '0',
  471   canmovetononmodforum tinyint(1) NOT NULL default '0',
  472   canusecustomtools tinyint(1) NOT NULL default '0',
  473   canmanageannouncements tinyint(1) NOT NULL default '0',
  474   canmanagereportedposts tinyint(1) NOT NULL default '0',
  475   canviewmodlog tinyint(1) NOT NULL default '0',
  476   KEY uid (id, fid),
  477   PRIMARY KEY (mid)
  478 ) ENGINE=MyISAM;";
  479 
  480 $tables[] = "CREATE TABLE mybb_modtools (
  481     tid smallint unsigned NOT NULL auto_increment,
  482     name varchar(200) NOT NULL,
  483     description text NOT NULL,
  484     forums text NOT NULL,
  485     `groups` text NOT NULL,
  486     type char(1) NOT NULL default '',
  487     postoptions text NOT NULL,
  488     threadoptions text NOT NULL,
  489     PRIMARY KEY (tid)
  490 ) ENGINE=MyISAM;";
  491 
  492 $tables[] = "CREATE TABLE mybb_mycode (
  493   cid int unsigned NOT NULL auto_increment,
  494   title varchar(100) NOT NULL default '',
  495   description text NOT NULL,
  496   regex text NOT NULL,
  497   replacement text NOT NULL,
  498   active tinyint(1) NOT NULL default '0',
  499   parseorder smallint unsigned NOT NULL default '0',
  500   PRIMARY KEY(cid)
  501 ) ENGINE=MyISAM;";
  502 
  503 $tables[] = "CREATE TABLE mybb_polls (
  504   pid int unsigned NOT NULL auto_increment,
  505   tid int unsigned NOT NULL default '0',
  506   question varchar(200) NOT NULL default '',
  507   dateline int unsigned NOT NULL default '0',
  508   options text NOT NULL,
  509   votes text NOT NULL,
  510   numoptions smallint unsigned NOT NULL default '0',
  511   numvotes int unsigned NOT NULL default '0',
  512   timeout int unsigned NOT NULL default '0',
  513   closed tinyint(1) NOT NULL default '0',
  514   multiple tinyint(1) NOT NULL default '0',
  515   public tinyint(1) NOT NULL default '0',
  516   maxoptions smallint unsigned NOT NULL default '0',
  517   KEY tid (tid),
  518   PRIMARY KEY (pid)
  519 ) ENGINE=MyISAM;";
  520 
  521 $tables[] = "CREATE TABLE mybb_pollvotes (
  522   vid int unsigned NOT NULL auto_increment,
  523   pid int unsigned NOT NULL default '0',
  524   uid int unsigned NOT NULL default '0',
  525   voteoption smallint unsigned NOT NULL default '0',
  526   dateline int unsigned NOT NULL default '0',
  527   ipaddress varbinary(16) NOT NULL default '',
  528   KEY pid (pid, uid),
  529   PRIMARY KEY (vid)
  530 ) ENGINE=MyISAM;";
  531 
  532 $tables[] = "CREATE TABLE mybb_posts (
  533   pid int unsigned NOT NULL auto_increment,
  534   tid int unsigned NOT NULL default '0',
  535   replyto int unsigned NOT NULL default '0',
  536   fid smallint unsigned NOT NULL default '0',
  537   subject varchar(120) NOT NULL default '',
  538   icon smallint unsigned NOT NULL default '0',
  539   uid int unsigned NOT NULL default '0',
  540   username varchar(80) NOT NULL default '',
  541   dateline int unsigned NOT NULL default '0',
  542   message text NOT NULL,
  543   ipaddress varbinary(16) NOT NULL default '',
  544   includesig tinyint(1) NOT NULL default '0',
  545   smilieoff tinyint(1) NOT NULL default '0',
  546   edituid int unsigned NOT NULL default '0',
  547   edittime int unsigned NOT NULL default '0',
  548   editreason varchar(150) NOT NULL default '',
  549   visible tinyint(1) NOT NULL default '0',
  550   KEY tid (tid, uid),
  551   KEY uid (uid),
  552   KEY visible (visible),
  553   KEY dateline (dateline),
  554   KEY ipaddress (ipaddress),
  555   KEY tiddate (tid, dateline),
  556   PRIMARY KEY (pid)
  557 ) ENGINE=MyISAM;";
  558 
  559 $tables[] = "CREATE TABLE mybb_privatemessages (
  560   pmid int unsigned NOT NULL auto_increment,
  561   uid int unsigned NOT NULL default '0',
  562   toid int unsigned NOT NULL default '0',
  563   fromid int unsigned NOT NULL default '0',
  564   recipients text NOT NULL,
  565   folder smallint unsigned NOT NULL default '1',
  566   subject varchar(120) NOT NULL default '',
  567   icon smallint unsigned NOT NULL default '0',
  568   message text NOT NULL,
  569   dateline int unsigned NOT NULL default '0',
  570   deletetime int unsigned NOT NULL default '0',
  571   status tinyint(1) NOT NULL default '0',
  572   statustime int unsigned NOT NULL default '0',
  573   includesig tinyint(1) NOT NULL default '0',
  574   smilieoff tinyint(1) NOT NULL default '0',
  575   receipt tinyint(1) NOT NULL default '0',
  576   readtime int unsigned NOT NULL default '0',
  577   ipaddress varbinary(16) NOT NULL default '',
  578   KEY uid (uid, folder),
  579   KEY toid (toid),
  580   PRIMARY KEY (pmid)
  581 ) ENGINE=MyISAM;";
  582 
  583 $tables[] = "CREATE TABLE mybb_profilefields (
  584   fid smallint unsigned NOT NULL auto_increment,
  585   name varchar(100) NOT NULL default '',
  586   description text NOT NULL,
  587   disporder smallint unsigned NOT NULL default '0',
  588   type text NOT NULL,
  589   regex text NOT NULL,
  590   length smallint unsigned NOT NULL default '0',
  591   maxlength smallint unsigned NOT NULL default '0',
  592   required tinyint(1) NOT NULL default '0',
  593   registration tinyint(1) NOT NULL default '0',
  594   profile tinyint(1) NOT NULL default '0',
  595   postbit tinyint(1) NOT NULL default '0',
  596   viewableby text NOT NULL,
  597   editableby text NOT NULL,
  598   postnum smallint unsigned NOT NULL default '0',
  599   allowhtml tinyint(1) NOT NULL default '0',
  600   allowmycode tinyint(1) NOT NULL default '0',
  601   allowsmilies tinyint(1) NOT NULL default '0',
  602   allowimgcode tinyint(1) NOT NULL default '0',
  603   allowvideocode tinyint(1) NOT NULL default '0',
  604   PRIMARY KEY (fid)
  605 ) ENGINE=MyISAM;";
  606 
  607 $tables[] = "CREATE TABLE mybb_promotions (
  608   pid int unsigned NOT NULL auto_increment,
  609   title varchar(120) NOT NULL default '',
  610   description text NOT NULL,
  611   enabled tinyint(1) NOT NULL default '1',
  612   logging tinyint(1) NOT NULL default '0',
  613   posts int unsigned NOT NULL default '0',
  614   posttype char(2) NOT NULL default '',
  615   threads int unsigned NOT NULL default '0',
  616   threadtype char(2) NOT NULL default '',
  617   registered int unsigned NOT NULL default '0',
  618   registeredtype varchar(20) NOT NULL default '',
  619   online int unsigned NOT NULL default '0',
  620   onlinetype varchar(20) NOT NULL default '',
  621   reputations int NOT NULL default '0',
  622   reputationtype char(2) NOT NULL default '',
  623   referrals int unsigned NOT NULL default '0',
  624   referralstype char(2) NOT NULL default '',
  625   warnings int unsigned NOT NULL default '0',
  626   warningstype char(2) NOT NULL default '',
  627   requirements varchar(200) NOT NULL default '',
  628   originalusergroup varchar(120) NOT NULL default '0',
  629   newusergroup smallint unsigned NOT NULL default '0',
  630   usergrouptype varchar(120) NOT NULL default '0',
  631   PRIMARY KEY (pid)
  632 ) ENGINE=MyISAM;";
  633 
  634 $tables[] = "CREATE TABLE mybb_promotionlogs (
  635   plid int unsigned NOT NULL auto_increment,
  636   pid int unsigned NOT NULL default '0',
  637   uid int unsigned NOT NULL default '0',
  638   oldusergroup varchar(200) NOT NULL default '0',
  639   newusergroup smallint NOT NULL default '0',
  640   dateline int unsigned NOT NULL default '0',
  641   type varchar(9) NOT NULL default 'primary',
  642   PRIMARY KEY (plid)
  643 ) ENGINE=MyISAM;";
  644 
  645 $tables[] = "CREATE TABLE mybb_questions (
  646   qid int unsigned NOT NULL auto_increment,
  647   question varchar(200) NOT NULL default '',
  648   answer varchar(150) NOT NULL default '',
  649   shown int unsigned NOT NULL default 0,
  650   correct int unsigned NOT NULL default 0,
  651   incorrect int unsigned NOT NULL default 0,
  652   active tinyint(1) NOT NULL default '0',
  653   PRIMARY KEY (qid)
  654 ) ENGINE=MyISAM;";
  655 
  656 $tables[] = "CREATE TABLE mybb_questionsessions (
  657   sid varchar(32) NOT NULL default '',
  658   qid int unsigned NOT NULL default '0',
  659   dateline int unsigned NOT NULL default '0',
  660   PRIMARY KEY (sid)
  661 ) ENGINE=MyISAM;";
  662 
  663 $tables[] = "CREATE TABLE mybb_reportedcontent (
  664   rid int unsigned NOT NULL auto_increment,
  665   id int unsigned NOT NULL default '0',
  666   id2 int unsigned NOT NULL default '0',
  667   id3 int unsigned NOT NULL default '0',
  668   uid int unsigned NOT NULL default '0',
  669   reportstatus tinyint(1) NOT NULL default '0',
  670   reasonid smallint unsigned NOT NULL default '0',
  671   reason varchar(250) NOT NULL default '',
  672   type varchar(50) NOT NULL default '',
  673   reports int unsigned NOT NULL default '0',
  674   reporters text NOT NULL,
  675   dateline int unsigned NOT NULL default '0',
  676   lastreport int unsigned NOT NULL default '0',
  677   KEY reportstatus (reportstatus),
  678   KEY lastreport (lastreport),
  679   PRIMARY KEY (rid)
  680 ) ENGINE=MyISAM;";
  681 
  682 $tables[] = "CREATE TABLE mybb_reportreasons (
  683   rid int unsigned NOT NULL auto_increment,
  684   title varchar(250) NOT NULL default '',
  685   appliesto varchar(250) NOT NULL default '',
  686   extra tinyint(1) NOT NULL default '0',
  687   disporder smallint unsigned NOT NULL default '0',
  688   PRIMARY KEY (rid)
  689 ) ENGINE=MyISAM;";
  690 
  691 $tables[] = "CREATE TABLE mybb_reputation (
  692   rid int unsigned NOT NULL auto_increment,
  693   uid int unsigned NOT NULL default '0',
  694   adduid int unsigned NOT NULL default '0',
  695   pid int unsigned NOT NULL default '0',
  696   reputation smallint NOT NULL default '0',
  697   dateline int unsigned NOT NULL default '0',
  698   comments text NOT NULL,
  699   KEY uid (uid),
  700   PRIMARY KEY (rid)
  701 ) ENGINE=MyISAM;";
  702 
  703 $tables[] = "CREATE TABLE mybb_searchlog (
  704   sid varchar(32) NOT NULL default '',
  705   uid int unsigned NOT NULL default '0',
  706   dateline int unsigned NOT NULL default '0',
  707   ipaddress varbinary(16) NOT NULL default '',
  708   threads longtext NOT NULL,
  709   posts longtext NOT NULL,
  710   resulttype varchar(10) NOT NULL default '',
  711   querycache text NOT NULL,
  712   keywords text NOT NULL,
  713   PRIMARY KEY (sid)
  714 ) ENGINE=MyISAM;";
  715 
  716 $tables[] = "CREATE TABLE mybb_sessions (
  717   sid varchar(32) NOT NULL default '',
  718   uid int unsigned NOT NULL default '0',
  719   ip varbinary(16) NOT NULL default '',
  720   time int unsigned NOT NULL default '0',
  721   location varchar(150) NOT NULL default '',
  722   useragent varchar(200) NOT NULL default '',
  723   anonymous tinyint(1) NOT NULL default '0',
  724   nopermission tinyint(1) NOT NULL default '0',
  725   location1 int(10) unsigned NOT NULL default '0',
  726   location2 int(10) unsigned NOT NULL default '0',
  727   PRIMARY KEY(sid),
  728   KEY location (location1, location2),
  729   KEY time (time),
  730   KEY uid (uid),
  731   KEY ip (ip)
  732 ) ENGINE=MyISAM;";
  733 
  734 $tables[] = "CREATE TABLE mybb_settinggroups (
  735   gid smallint unsigned NOT NULL auto_increment,
  736   name varchar(100) NOT NULL default '',
  737   title varchar(220) NOT NULL default '',
  738   description text NOT NULL,
  739   disporder smallint unsigned NOT NULL default '0',
  740   isdefault tinyint(1) NOT NULL default '0',
  741   PRIMARY KEY (gid)
  742 ) ENGINE=MyISAM;";
  743 
  744 $tables[] = "CREATE TABLE mybb_settings (
  745   sid smallint unsigned NOT NULL auto_increment,
  746   name varchar(120) NOT NULL default '',
  747   title varchar(120) NOT NULL default '',
  748   description text NOT NULL,
  749   optionscode text NOT NULL,
  750   value text NOT NULL,
  751   disporder smallint unsigned NOT NULL default '0',
  752   gid smallint unsigned NOT NULL default '0',
  753   isdefault tinyint(1) NOT NULL default '0',
  754   KEY gid (gid),
  755   PRIMARY KEY (sid)
  756 ) ENGINE=MyISAM;";
  757 
  758 $tables[] = "CREATE TABLE mybb_smilies (
  759   sid smallint unsigned NOT NULL auto_increment,
  760   name varchar(120) NOT NULL default '',
  761   find text NOT NULL,
  762   image varchar(220) NOT NULL default '',
  763   disporder smallint unsigned NOT NULL default '0',
  764   showclickable tinyint(1) NOT NULL default '0',
  765   PRIMARY KEY (sid)
  766 ) ENGINE=MyISAM;";
  767 
  768 $tables[] = "CREATE TABLE mybb_spamlog (
  769     sid int unsigned NOT NULL auto_increment,
  770     username varchar(120) NOT NULL DEFAULT '',
  771     email varchar(220) NOT NULL DEFAULT '',
  772     ipaddress varbinary(16) NOT NULL default '',
  773     dateline int unsigned NOT NULL default '0',
  774     data text NOT NULL,
  775     PRIMARY KEY (sid)
  776 ) ENGINE=MyISAM;";
  777 
  778 $tables[] = "CREATE TABLE mybb_spiders (
  779     sid int unsigned NOT NULL auto_increment,
  780     name varchar(100) NOT NULL default '',
  781     theme smallint unsigned NOT NULL default '0',
  782     language varchar(20) NOT NULL default '',
  783     usergroup smallint unsigned NOT NULL default '0',
  784     useragent varchar(200) NOT NULL default '',
  785     lastvisit int unsigned NOT NULL default '0',
  786     PRIMARY KEY (sid)
  787 ) ENGINE=MyISAM;";
  788 
  789 $tables[] = "CREATE TABLE mybb_stats (
  790     dateline int unsigned NOT NULL default '0',
  791     numusers int unsigned NOT NULL default '0',
  792     numthreads int unsigned NOT NULL default '0',
  793     numposts int unsigned NOT NULL default '0',
  794     PRIMARY KEY (dateline)
  795 ) ENGINE=MyISAM;";
  796 
  797 $tables[] = "CREATE TABLE mybb_tasks (
  798     tid int unsigned NOT NULL auto_increment,
  799     title varchar(120) NOT NULL default '',
  800     description text NOT NULL,
  801     file varchar(30) NOT NULL default '',
  802     minute varchar(200) NOT NULL default '',
  803     hour varchar(200) NOT NULL default '',
  804     day varchar(100) NOT NULL default '',
  805     month varchar(30) NOT NULL default '',
  806     weekday varchar(15) NOT NULL default '',
  807     nextrun int unsigned NOT NULL default '0',
  808     lastrun int unsigned NOT NULL default '0',
  809     enabled tinyint(1) NOT NULL default '1',
  810     logging tinyint(1) NOT NULL default '0',
  811     locked int unsigned NOT NULL default '0',
  812     PRIMARY KEY (tid)
  813 ) ENGINE=MyISAM;";
  814 
  815 $tables[] = "CREATE TABLE mybb_tasklog (
  816     lid int unsigned NOT NULL auto_increment,
  817     tid int unsigned NOT NULL default '0',
  818     dateline int unsigned NOT NULL default '0',
  819     data text NOT NULL,
  820     PRIMARY KEY (lid)
  821 ) ENGINE=MyISAM;";
  822 
  823 $tables[] = "CREATE TABLE mybb_templategroups (
  824   gid int unsigned NOT NULL auto_increment,
  825   prefix varchar(50) NOT NULL default '',
  826   title varchar(100) NOT NULL default '',
  827   isdefault tinyint(1) NOT NULL default '0',
  828   PRIMARY KEY (gid)
  829 ) ENGINE=MyISAM;";
  830 
  831 $tables[] = "CREATE TABLE mybb_templates (
  832   tid int unsigned NOT NULL auto_increment,
  833   title varchar(120) NOT NULL default '',
  834   template text NOT NULL,
  835   sid smallint NOT NULL default '0',
  836   version varchar(20) NOT NULL default '0',
  837   status varchar(10) NOT NULL default '',
  838   dateline int unsigned NOT NULL default '0',
  839   KEY sid (sid, title),
  840   PRIMARY KEY (tid)
  841 ) ENGINE=MyISAM;";
  842 
  843 $tables[] = "CREATE TABLE mybb_templatesets (
  844   sid smallint unsigned NOT NULL auto_increment,
  845   title varchar(120) NOT NULL default '',
  846   PRIMARY KEY (sid)
  847 ) ENGINE=MyISAM;";
  848 
  849 $tables[] = "CREATE TABLE mybb_themes (
  850   tid smallint unsigned NOT NULL auto_increment,
  851   name varchar(100) NOT NULL default '',
  852   pid smallint unsigned NOT NULL default '0',
  853   def tinyint(1) NOT NULL default '0',
  854   properties text NOT NULL,
  855   stylesheets text NOT NULL,
  856   allowedgroups text NOT NULL,
  857   PRIMARY KEY (tid)
  858 ) ENGINE=MyISAM;";
  859 
  860 $tables[] = "CREATE TABLE mybb_themestylesheets (
  861     sid int unsigned NOT NULL auto_increment,
  862     name varchar(30) NOT NULL default '',
  863     tid smallint unsigned NOT NULL default '0',
  864     attachedto text NOT NULL,
  865     stylesheet longtext NOT NULL,
  866     cachefile varchar(100) NOT NULL default '',
  867     lastmodified int unsigned NOT NULL default '0',
  868     KEY tid (tid),
  869     PRIMARY KEY (sid)
  870 ) ENGINE=MyISAM;";
  871 
  872 $tables[] = "CREATE TABLE mybb_threadprefixes (
  873     pid int unsigned NOT NULL auto_increment,
  874     prefix varchar(120) NOT NULL default '',
  875     displaystyle varchar(200) NOT NULL default '',
  876     forums text NOT NULL,
  877     `groups` text NOT NULL,
  878     PRIMARY KEY (pid)
  879 ) ENGINE=MyISAM;";
  880 
  881 $tables[] = "CREATE TABLE mybb_threadratings (
  882   rid int unsigned NOT NULL auto_increment,
  883   tid int unsigned NOT NULL default '0',
  884   uid int unsigned NOT NULL default '0',
  885   rating tinyint(1) unsigned NOT NULL default '0',
  886   ipaddress varbinary(16) NOT NULL default '',
  887   KEY tid (tid, uid),
  888   PRIMARY KEY (rid)
  889 ) ENGINE=MyISAM;";
  890 
  891 $tables[] = "CREATE TABLE mybb_threadviews (
  892     tid int unsigned NOT NULL default '0',
  893     KEY (tid)
  894 ) ENGINE=MyISAM;";
  895 
  896 $tables[] = "CREATE TABLE mybb_threads (
  897   tid int unsigned NOT NULL auto_increment,
  898   fid smallint unsigned NOT NULL default '0',
  899   subject varchar(120) NOT NULL default '',
  900   prefix smallint unsigned NOT NULL default '0',
  901   icon smallint unsigned NOT NULL default '0',
  902   poll int unsigned NOT NULL default '0',
  903   uid int unsigned NOT NULL default '0',
  904   username varchar(80) NOT NULL default '',
  905   dateline int unsigned NOT NULL default '0',
  906   firstpost int unsigned NOT NULL default '0',
  907   lastpost int unsigned NOT NULL default '0',
  908   lastposter varchar(120) NOT NULL default '',
  909   lastposteruid int unsigned NOT NULL default '0',
  910   views int(100) unsigned NOT NULL default '0',
  911   replies int(100) unsigned NOT NULL default '0',
  912   closed varchar(30) NOT NULL default '',
  913   sticky tinyint(1) NOT NULL default '0',
  914   numratings smallint unsigned NOT NULL default '0',
  915   totalratings smallint unsigned NOT NULL default '0',
  916   notes text NOT NULL,
  917   visible tinyint(1) NOT NULL default '0',
  918   unapprovedposts int(10) unsigned NOT NULL default '0',
  919   deletedposts int(10) unsigned NOT NULL default '0',
  920   attachmentcount int(10) unsigned NOT NULL default '0',
  921   deletetime int(10) unsigned NOT NULL default '0',
  922   KEY fid (fid, visible, sticky),
  923   KEY dateline (dateline),
  924   KEY lastpost (lastpost, fid),
  925   KEY firstpost (firstpost),
  926   KEY uid (uid),
  927   PRIMARY KEY (tid)
  928 ) ENGINE=MyISAM;";
  929 
  930 $tables[] = "CREATE TABLE mybb_threadsread (
  931   tid int unsigned NOT NULL default '0',
  932   uid int unsigned NOT NULL default '0',
  933   dateline int unsigned NOT NULL default '0',
  934   KEY dateline (dateline),
  935   UNIQUE KEY tid (tid, uid)
  936 ) ENGINE=MyISAM;";
  937 
  938 $tables[] = "CREATE TABLE mybb_threadsubscriptions (
  939   sid int unsigned NOT NULL auto_increment,
  940   uid int unsigned NOT NULL default '0',
  941   tid int unsigned NOT NULL default '0',
  942   notification tinyint(1) NOT NULL default '0',
  943   dateline int unsigned NOT NULL default '0',
  944   KEY uid (uid),
  945   KEY tid (tid, notification),
  946   PRIMARY KEY (sid)
  947 ) ENGINE=MyISAM;";
  948 
  949 $tables[] = "CREATE TABLE mybb_userfields (
  950   ufid int unsigned NOT NULL default '0',
  951   fid1 text NOT NULL,
  952   fid2 text NOT NULL,
  953   fid3 text NOT NULL,
  954   PRIMARY KEY (ufid)
  955 ) ENGINE=MyISAM;";
  956 
  957 $tables[] = "CREATE TABLE mybb_usergroups (
  958   gid smallint unsigned NOT NULL auto_increment,
  959   type tinyint(1) unsigned NOT NULL default '2',
  960   title varchar(120) NOT NULL default '',
  961   description text NOT NULL,
  962   namestyle varchar(200) NOT NULL default '{username}',
  963   usertitle varchar(120) NOT NULL default '',
  964   stars smallint(4) unsigned NOT NULL default '0',
  965   starimage varchar(120) NOT NULL default '',
  966   image varchar(120) NOT NULL default '',
  967   disporder smallint(6) unsigned NOT NULL,
  968   isbannedgroup tinyint(1) NOT NULL default '0',
  969   canview tinyint(1) NOT NULL default '0',
  970   canviewthreads tinyint(1) NOT NULL default '0',
  971   canviewprofiles tinyint(1) NOT NULL default '0',
  972   candlattachments tinyint(1) NOT NULL default '0',
  973   canviewboardclosed tinyint(1) NOT NULL default '0',
  974   canpostthreads tinyint(1) NOT NULL default '0',
  975   canpostreplys tinyint(1) NOT NULL default '0',
  976   canpostattachments tinyint(1) NOT NULL default '0',
  977   canratethreads tinyint(1) NOT NULL default '0',
  978   modposts tinyint(1) NOT NULL default '0',
  979   modthreads tinyint(1) NOT NULL default '0',
  980   mod_edit_posts tinyint(1) NOT NULL default '0',
  981   modattachments tinyint(1) NOT NULL default '0',
  982   caneditposts tinyint(1) NOT NULL default '0',
  983   candeleteposts tinyint(1) NOT NULL default '0',
  984   candeletethreads tinyint(1) NOT NULL default '0',
  985   caneditattachments tinyint(1) NOT NULL default '0',
  986   canviewdeletionnotice tinyint(1) NOT NULL default '0',
  987   canpostpolls tinyint(1) NOT NULL default '0',
  988   canvotepolls tinyint(1) NOT NULL default '0',
  989   canundovotes tinyint(1) NOT NULL default '0',
  990   canusepms tinyint(1) NOT NULL default '0',
  991   cansendpms tinyint(1) NOT NULL default '0',
  992   cantrackpms tinyint(1) NOT NULL default '0',
  993   candenypmreceipts tinyint(1) NOT NULL default '0',
  994   pmquota int(3) unsigned NOT NULL default '0',
  995   maxpmrecipients int(4) unsigned NOT NULL default '5',
  996   cansendemail tinyint(1) NOT NULL default '0',
  997   cansendemailoverride tinyint(1) NOT NULL default '0',
  998   maxemails int(3) unsigned NOT NULL default '5',
  999   emailfloodtime int(3) unsigned NOT NULL default '5',
 1000   canviewmemberlist tinyint(1) NOT NULL default '0',
 1001   canviewcalendar tinyint(1) NOT NULL default '0',
 1002   canaddevents tinyint(1) NOT NULL default '0',
 1003   canbypasseventmod tinyint(1) NOT NULL default '0',
 1004   canmoderateevents tinyint(1) NOT NULL default '0',
 1005   canviewonline tinyint(1) NOT NULL default '0',
 1006   canviewwolinvis tinyint(1) NOT NULL default '0',
 1007   canviewonlineips tinyint(1) NOT NULL default '0',
 1008   cancp tinyint(1) NOT NULL default '0',
 1009   issupermod tinyint(1) NOT NULL default '0',
 1010   cansearch tinyint(1) NOT NULL default '0',
 1011   canusercp tinyint(1) NOT NULL default '0',
 1012   canuploadavatars tinyint(1) NOT NULL default '0',
 1013   canratemembers tinyint(1) NOT NULL default '0',
 1014   canchangename tinyint(1) NOT NULL default '0',
 1015   canbereported tinyint(1) NOT NULL default '0',
 1016   canchangewebsite tinyint(1) NOT NULL default '1',
 1017   showforumteam tinyint(1) NOT NULL default '0',
 1018   usereputationsystem tinyint(1) NOT NULL default '0',
 1019   cangivereputations tinyint(1) NOT NULL default '0',
 1020   candeletereputations tinyint(1) NOT NULL default '0',
 1021   reputationpower int unsigned NOT NULL default '0',
 1022   maxreputationsday int unsigned NOT NULL default '0',
 1023   maxreputationsperuser int unsigned NOT NULL default '0',
 1024   maxreputationsperthread int unsigned NOT NULL default '0',
 1025   candisplaygroup tinyint(1) NOT NULL default '0',
 1026   attachquota int unsigned NOT NULL default '0',
 1027   cancustomtitle tinyint(1) NOT NULL default '0',
 1028   canwarnusers tinyint(1) NOT NULL default '0',
 1029   canreceivewarnings tinyint(1) NOT NULL default '0',
 1030   maxwarningsday int(3) unsigned NOT NULL default '3',
 1031   canmodcp tinyint(1) NOT NULL default '0',
 1032   showinbirthdaylist tinyint(1) NOT NULL default '0',
 1033   canoverridepm tinyint(1) NOT NULL default '0',
 1034   canusesig tinyint(1) NOT NULL default '0',
 1035   canusesigxposts smallint unsigned NOT NULL default '0',
 1036   signofollow tinyint(1) NOT NULL default '0',
 1037   edittimelimit int(4) unsigned NOT NULL default '0',
 1038   maxposts int(4) unsigned NOT NULL default '0',
 1039   showmemberlist tinyint(1) NOT NULL default '1',
 1040   canmanageannounce tinyint(1) NOT NULL default '0',
 1041   canmanagemodqueue tinyint(1) NOT NULL default '0',
 1042   canmanagereportedcontent tinyint(1) NOT NULL default '0',
 1043   canviewmodlogs tinyint(1) NOT NULL default '0',
 1044   caneditprofiles tinyint(1) NOT NULL default '0',
 1045   canbanusers tinyint(1) NOT NULL default '0',
 1046   canviewwarnlogs tinyint(1) NOT NULL default '0',
 1047   canuseipsearch tinyint(1) NOT NULL default '0',
 1048   PRIMARY KEY (gid)
 1049 ) ENGINE=MyISAM;";
 1050 
 1051 $tables[] = "CREATE TABLE mybb_users (
 1052   uid int unsigned NOT NULL auto_increment,
 1053   username varchar(120) NOT NULL default '',
 1054   password varchar(120) NOT NULL default '',
 1055   salt varchar(10) NOT NULL default '',
 1056   loginkey varchar(50) NOT NULL default '',
 1057   email varchar(220) NOT NULL default '',
 1058   postnum int(10) unsigned NOT NULL default '0',
 1059   threadnum int(10) unsigned NOT NULL default '0',
 1060   avatar varchar(200) NOT NULL default '',
 1061   avatardimensions varchar(10) NOT NULL default '',
 1062   avatartype varchar(10) NOT NULL default '0',
 1063   usergroup smallint unsigned NOT NULL default '0',
 1064   additionalgroups varchar(200) NOT NULL default '',
 1065   displaygroup smallint unsigned NOT NULL default '0',
 1066   usertitle varchar(250) NOT NULL default '',
 1067   regdate int unsigned NOT NULL default '0',
 1068   lastactive int unsigned NOT NULL default '0',
 1069   lastvisit int unsigned NOT NULL default '0',
 1070   lastpost int unsigned NOT NULL default '0',
 1071   website varchar(200) NOT NULL default '',
 1072   icq varchar(10) NOT NULL default '',
 1073   yahoo varchar(50) NOT NULL default '',
 1074   skype varchar(75) NOT NULL default '',
 1075   google varchar(75) NOT NULL default '',
 1076   birthday varchar(15) NOT NULL default '',
 1077   birthdayprivacy varchar(4) NOT NULL default 'all',
 1078   signature text NOT NULL,
 1079   allownotices tinyint(1) NOT NULL default '0',
 1080   hideemail tinyint(1) NOT NULL default '0',
 1081   subscriptionmethod tinyint(1) NOT NULL default '0',
 1082   invisible tinyint(1) NOT NULL default '0',
 1083   receivepms tinyint(1) NOT NULL default '0',
 1084   receivefrombuddy tinyint(1) NOT NULL default '0',
 1085   pmnotice tinyint(1) NOT NULL default '0',
 1086   pmnotify tinyint(1) NOT NULL default '0',
 1087   buddyrequestspm tinyint(1) NOT NULL default '1',
 1088   buddyrequestsauto tinyint(1) NOT NULL default '0',
 1089   threadmode varchar(8) NOT NULL default '',
 1090   showimages tinyint(1) NOT NULL default '0',
 1091   showvideos tinyint(1) NOT NULL default '0',
 1092   showsigs tinyint(1) NOT NULL default '0',
 1093   showavatars tinyint(1) NOT NULL default '0',
 1094   showquickreply tinyint(1) NOT NULL default '0',
 1095   showredirect tinyint(1) NOT NULL default '0',
 1096   ppp smallint(6) unsigned NOT NULL default '0',
 1097   tpp smallint(6) unsigned NOT NULL default '0',
 1098   daysprune smallint(6) unsigned NOT NULL default '0',
 1099   dateformat varchar(4) NOT NULL default '',
 1100   timeformat varchar(4) NOT NULL default '',
 1101   timezone varchar(5) NOT NULL default '',
 1102   dst tinyint(1) NOT NULL default '0',
 1103   dstcorrection tinyint(1) NOT NULL default '0',
 1104   buddylist text NOT NULL,
 1105   ignorelist text NOT NULL,
 1106   style smallint unsigned NOT NULL default '0',
 1107   away tinyint(1) NOT NULL default '0',
 1108   awaydate int(10) unsigned NOT NULL default '0',
 1109   returndate varchar(15) NOT NULL default '',
 1110   awayreason varchar(200) NOT NULL default '',
 1111   pmfolders text NOT NULL,
 1112   notepad text NOT NULL,
 1113   referrer int unsigned NOT NULL default '0',
 1114   referrals int unsigned NOT NULL default '0',
 1115   reputation int NOT NULL default '0',
 1116   regip varbinary(16) NOT NULL default '',
 1117   lastip varbinary(16) NOT NULL default '',
 1118   language varchar(50) NOT NULL default '',
 1119   timeonline int unsigned NOT NULL default '0',
 1120   showcodebuttons tinyint(1) NOT NULL default '1',
 1121   totalpms int(10) unsigned NOT NULL default '0',
 1122   unreadpms int(10) unsigned NOT NULL default '0',
 1123   warningpoints int(3) unsigned NOT NULL default '0',
 1124   moderateposts tinyint(1) NOT NULL default '0',
 1125   moderationtime int unsigned NOT NULL default '0',
 1126   suspendposting tinyint(1) NOT NULL default '0',
 1127   suspensiontime int unsigned NOT NULL default '0',
 1128   suspendsignature tinyint(1) NOT NULL default '0',
 1129   suspendsigtime int unsigned NOT NULL default '0',
 1130   coppauser tinyint(1) NOT NULL default '0',
 1131   classicpostbit tinyint(1) NOT NULL default '0',
 1132   loginattempts smallint(2) unsigned NOT NULL default '0',
 1133   loginlockoutexpiry int unsigned NOT NULL default '0',
 1134   usernotes text NOT NULL,
 1135   sourceeditor tinyint(1) NOT NULL default '0',
 1136   UNIQUE KEY username (username),
 1137   KEY usergroup (usergroup),
 1138   KEY regip (regip),
 1139   KEY lastip (lastip),
 1140   PRIMARY KEY (uid)
 1141 ) ENGINE=MyISAM;";
 1142 
 1143 $tables[] = "CREATE TABLE mybb_usertitles (
 1144   utid smallint unsigned NOT NULL auto_increment,
 1145   posts int unsigned NOT NULL default '0',
 1146   title varchar(250) NOT NULL default '',
 1147   stars smallint(4) unsigned NOT NULL default '0',
 1148   starimage varchar(120) NOT NULL default '',
 1149   PRIMARY KEY (utid)
 1150 ) ENGINE=MyISAM;";
 1151 
 1152 $tables[] = "CREATE TABLE mybb_warninglevels (
 1153     lid int unsigned NOT NULL auto_increment,
 1154     percentage smallint(3) unsigned NOT NULL default '0',
 1155     action text NOT NULL,
 1156     PRIMARY KEY (lid)
 1157 ) ENGINE=MyISAM;";
 1158 
 1159 $tables[] = "CREATE TABLE mybb_warningtypes (
 1160     tid int unsigned NOT NULL auto_increment,
 1161     title varchar(120) NOT NULL default '',
 1162     points smallint unsigned NOT NULL default '0',
 1163     expirationtime int unsigned NOT NULL default '0',
 1164     PRIMARY KEY (tid)
 1165 ) ENGINE=MyISAM;";
 1166 
 1167 $tables[] = "CREATE TABLE mybb_warnings (
 1168     wid int unsigned NOT NULL auto_increment,
 1169     uid int unsigned NOT NULL default '0',
 1170     tid int unsigned NOT NULL default '0',
 1171     pid int unsigned NOT NULL default '0',
 1172     title varchar(120) NOT NULL default '',
 1173     points smallint unsigned NOT NULL default '0',
 1174     dateline int unsigned NOT NULL default '0',
 1175     issuedby int unsigned NOT NULL default '0',
 1176     expires int unsigned NOT NULL default '0',
 1177     expired tinyint(1) NOT NULL default '0',
 1178     daterevoked int unsigned NOT NULL default '0',
 1179     revokedby int unsigned NOT NULL default '0',
 1180     revokereason text NOT NULL,
 1181     notes text NOT NULL,
 1182     KEY uid (uid),
 1183     PRIMARY KEY (wid)
 1184 ) ENGINE=MyISAM;";
 1185 
 1186