[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/install/resources/ -> mysql_db_tables.php (source)

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


2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref