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