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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
|
# DO NOT EDIT THIS FILE, IT IS GENERATED
#
# To change the contents of this file, edit
# phpBB/develop/create_schema_files.php and
# run it.
# Table: 'phpbb_attachments'
CREATE TABLE phpbb_attachments (
attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
physical_filename varchar(255) DEFAULT '' NOT NULL,
real_filename varchar(255) DEFAULT '' NOT NULL,
download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
attach_comment text NOT NULL,
extension varchar(100) DEFAULT '' NOT NULL,
mimetype varchar(100) DEFAULT '' NOT NULL,
filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (attach_id),
KEY filetime (filetime),
KEY post_msg_id (post_msg_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id),
KEY is_orphan (is_orphan)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_groups'
CREATE TABLE phpbb_acl_groups (
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
KEY group_id (group_id),
KEY auth_opt_id (auth_option_id),
KEY auth_role_id (auth_role_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_options'
CREATE TABLE phpbb_acl_options (
auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
auth_option varchar(50) DEFAULT '' NOT NULL,
is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (auth_option_id),
UNIQUE auth_option (auth_option)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_roles'
CREATE TABLE phpbb_acl_roles (
role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
role_name varchar(255) DEFAULT '' NOT NULL,
role_description text NOT NULL,
role_type varchar(10) DEFAULT '' NOT NULL,
role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id),
KEY role_type (role_type),
KEY role_order (role_order)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_roles_data'
CREATE TABLE phpbb_acl_roles_data (
role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id, auth_option_id),
KEY ath_op_id (auth_option_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_users'
CREATE TABLE phpbb_acl_users (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
KEY user_id (user_id),
KEY auth_option_id (auth_option_id),
KEY auth_role_id (auth_role_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ban_ip varchar(40) DEFAULT '' NOT NULL,
ban_email varchar(100) DEFAULT '' NOT NULL,
ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
ban_reason varchar(255) DEFAULT '' NOT NULL,
ban_give_reason varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (ban_id),
KEY ban_end (ban_end),
KEY ban_user (ban_userid, ban_exclude),
KEY ban_email (ban_email, ban_exclude),
KEY ban_ip (ban_ip, ban_exclude)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes (
bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_match text NOT NULL,
bbcode_tpl mediumtext NOT NULL,
first_pass_match mediumtext NOT NULL,
first_pass_replace mediumtext NOT NULL,
second_pass_match mediumtext NOT NULL,
second_pass_replace mediumtext NOT NULL,
PRIMARY KEY (bbcode_id),
KEY display_on_post (display_on_posting)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_bookmarks'
CREATE TABLE phpbb_bookmarks (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (topic_id, user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_bots'
CREATE TABLE phpbb_bots (
bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
bot_name varchar(255) DEFAULT '' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
bot_agent varchar(255) DEFAULT '' NOT NULL,
bot_ip varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (bot_id),
KEY bot_active (bot_active)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_config'
CREATE TABLE phpbb_config (
config_name varchar(255) DEFAULT '' NOT NULL,
config_value varchar(255) DEFAULT '' NOT NULL,
is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (config_name),
KEY is_dynamic (is_dynamic)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_config_text'
CREATE TABLE phpbb_config_text (
config_name varchar(255) DEFAULT '' NOT NULL,
config_value mediumtext NOT NULL,
PRIMARY KEY (config_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_confirm'
CREATE TABLE phpbb_confirm (
confirm_id char(32) DEFAULT '' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
confirm_type tinyint(3) DEFAULT '0' NOT NULL,
code varchar(8) DEFAULT '' NOT NULL,
seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id, confirm_id),
KEY confirm_type (confirm_type)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_disallow'
CREATE TABLE phpbb_disallow (
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
disallow_username varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (disallow_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_drafts'
CREATE TABLE phpbb_drafts (
draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
draft_subject varchar(255) DEFAULT '' NOT NULL,
draft_message mediumtext NOT NULL,
PRIMARY KEY (draft_id),
KEY save_time (save_time)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_ext'
CREATE TABLE phpbb_ext (
ext_name varchar(255) DEFAULT '' NOT NULL,
ext_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
ext_state text NOT NULL,
UNIQUE ext_name (ext_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_extensions'
CREATE TABLE phpbb_extensions (
extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
extension varchar(100) DEFAULT '' NOT NULL,
PRIMARY KEY (extension_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_extension_groups'
CREATE TABLE phpbb_extension_groups (
group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_name varchar(255) DEFAULT '' NOT NULL,
cat_id tinyint(2) DEFAULT '0' NOT NULL,
allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
upload_icon varchar(255) DEFAULT '' NOT NULL,
max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
allowed_forums text NOT NULL,
allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (group_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums'
CREATE TABLE phpbb_forums (
forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_parents mediumtext NOT NULL,
forum_name varchar(255) DEFAULT '' NOT NULL,
forum_desc text NOT NULL,
forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
forum_password varchar(255) DEFAULT '' NOT NULL,
forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_image varchar(255) DEFAULT '' NOT NULL,
forum_rules text NOT NULL,
forum_rules_link varchar(255) DEFAULT '' NOT NULL,
forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
forum_type tinyint(4) DEFAULT '0' NOT NULL,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
forum_flags tinyint(4) DEFAULT '32' NOT NULL,
forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (forum_id),
KEY left_right_id (left_id, right_id),
KEY forum_lastpost_id (forum_last_post_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums_access'
CREATE TABLE phpbb_forums_access (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
PRIMARY KEY (forum_id, user_id, session_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums_track'
CREATE TABLE phpbb_forums_track (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums_watch'
CREATE TABLE phpbb_forums_watch (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
KEY forum_id (forum_id),
KEY user_id (user_id),
KEY notify_stat (notify_status)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_groups'
CREATE TABLE phpbb_groups (
group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_name varchar(255) DEFAULT '' NOT NULL,
group_desc text NOT NULL,
group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
group_desc_uid varchar(8) DEFAULT '' NOT NULL,
group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_avatar varchar(255) DEFAULT '' NOT NULL,
group_avatar_type varchar(255) DEFAULT '' NOT NULL,
group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_colour varchar(6) DEFAULT '' NOT NULL,
group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (group_id),
KEY group_legend_name (group_legend, group_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_icons'
CREATE TABLE phpbb_icons (
icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
icons_url varchar(255) DEFAULT '' NOT NULL,
icons_width tinyint(4) DEFAULT '0' NOT NULL,
icons_height tinyint(4) DEFAULT '0' NOT NULL,
icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (icons_id),
KEY display_on_posting (display_on_posting)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_lang'
CREATE TABLE phpbb_lang (
lang_id tinyint(4) NOT NULL auto_increment,
lang_iso varchar(30) DEFAULT '' NOT NULL,
lang_dir varchar(30) DEFAULT '' NOT NULL,
lang_english_name varchar(100) DEFAULT '' NOT NULL,
lang_local_name varchar(255) DEFAULT '' NOT NULL,
lang_author varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (lang_id),
KEY lang_iso (lang_iso)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_log'
CREATE TABLE phpbb_log (
log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
log_type tinyint(4) DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
log_ip varchar(40) DEFAULT '' NOT NULL,
log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
log_operation text NOT NULL,
log_data mediumtext NOT NULL,
PRIMARY KEY (log_id),
KEY log_type (log_type),
KEY log_time (log_time),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY reportee_id (reportee_id),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_login_attempts'
CREATE TABLE phpbb_login_attempts (
attempt_ip varchar(40) DEFAULT '' NOT NULL,
attempt_browser varchar(150) DEFAULT '' NOT NULL,
attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL,
attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '0' NOT NULL,
username_clean varchar(255) DEFAULT '0' NOT NULL,
KEY att_ip (attempt_ip, attempt_time),
KEY att_for (attempt_forwarded_for, attempt_time),
KEY att_time (attempt_time),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_moderator_cache'
CREATE TABLE phpbb_moderator_cache (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_name varchar(255) DEFAULT '' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
KEY disp_idx (display_on_index),
KEY forum_id (forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_migrations'
CREATE TABLE phpbb_migrations (
migration_name varchar(255) DEFAULT '' NOT NULL,
migration_depends_on text NOT NULL,
migration_schema_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
migration_data_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
migration_data_state text NOT NULL,
migration_start_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
migration_end_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (migration_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
module_basename varchar(255) DEFAULT '' NOT NULL,
module_class varchar(10) DEFAULT '' NOT NULL,
parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
module_langname varchar(255) DEFAULT '' NOT NULL,
module_mode varchar(255) DEFAULT '' NOT NULL,
module_auth varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (module_id),
KEY left_right_id (left_id, right_id),
KEY module_enabled (module_enabled),
KEY class_left_id (module_class, left_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_notification_types'
CREATE TABLE phpbb_notification_types (
notification_type_id smallint(4) UNSIGNED NOT NULL auto_increment,
notification_type_name varchar(255) DEFAULT '' NOT NULL,
notification_type_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (notification_type_id),
UNIQUE type (notification_type_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_notifications'
CREATE TABLE phpbb_notifications (
notification_id int(10) UNSIGNED NOT NULL auto_increment,
notification_type_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
item_parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
notification_read tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
notification_time int(11) UNSIGNED DEFAULT '1' NOT NULL,
notification_data text NOT NULL,
PRIMARY KEY (notification_id),
KEY item_ident (notification_type_id, item_id),
KEY user (user_id, notification_read)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_provider_id text NOT NULL,
PRIMARY KEY (user_id, provider)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_token mediumtext NOT NULL,
KEY user_id (user_id),
KEY provider (provider)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_text text NOT NULL,
poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY poll_opt_id (poll_option_id),
KEY topic_id (topic_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_poll_votes'
CREATE TABLE phpbb_poll_votes (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
vote_user_ip varchar(40) DEFAULT '' NOT NULL,
KEY topic_id (topic_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_posts'
CREATE TABLE phpbb_posts (
post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poster_ip varchar(40) DEFAULT '' NOT NULL,
post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_visibility tinyint(3) DEFAULT '0' NOT NULL,
post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_username varchar(255) DEFAULT '' NOT NULL,
post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
post_text mediumtext NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
bbcode_uid varchar(8) DEFAULT '' NOT NULL,
post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_reason varchar(255) DEFAULT '' NOT NULL,
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_delete_reason varchar(255) DEFAULT '' NOT NULL,
post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_ip (poster_ip),
KEY poster_id (poster_id),
KEY post_visibility (post_visibility),
KEY post_username (post_username),
KEY tid_post_time (topic_id, post_time)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs'
CREATE TABLE phpbb_privmsgs (
msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
author_ip varchar(40) DEFAULT '' NOT NULL,
message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
message_subject varchar(255) DEFAULT '' NOT NULL,
message_text mediumtext NOT NULL,
message_edit_reason varchar(255) DEFAULT '' NOT NULL,
message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
bbcode_uid varchar(8) DEFAULT '' NOT NULL,
message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
to_address text NOT NULL,
bcc_address text NOT NULL,
message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (msg_id),
KEY author_ip (author_ip),
KEY message_time (message_time),
KEY author_id (author_id),
KEY root_level (root_level)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs_folder'
CREATE TABLE phpbb_privmsgs_folder (
folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
folder_name varchar(255) DEFAULT '' NOT NULL,
pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (folder_id),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs_rules'
CREATE TABLE phpbb_privmsgs_rules (
rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_string varchar(255) DEFAULT '' NOT NULL,
rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_folder_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (rule_id),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs_to'
CREATE TABLE phpbb_privmsgs_to (
msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
folder_id int(11) DEFAULT '0' NOT NULL,
KEY msg_id (msg_id),
KEY author_id (author_id),
KEY usr_flder_id (user_id, folder_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_fields'
CREATE TABLE phpbb_profile_fields (
field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
field_name varchar(255) DEFAULT '' NOT NULL,
field_type varchar(100) DEFAULT '' NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
field_minlen varchar(255) DEFAULT '' NOT NULL,
field_maxlen varchar(255) DEFAULT '' NOT NULL,
field_novalue varchar(255) DEFAULT '' NOT NULL,
field_default_value varchar(255) DEFAULT '' NOT NULL,
field_validation varchar(20) DEFAULT '' NOT NULL,
field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (field_id),
KEY fld_type (field_type),
KEY fld_ordr (field_order)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
pf_phpbb_interests text NOT NULL,
pf_phpbb_occupation text NOT NULL,
PRIMARY KEY (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_fields_lang'
CREATE TABLE phpbb_profile_fields_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
field_type varchar(100) DEFAULT '' NOT NULL,
lang_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id, option_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_lang'
CREATE TABLE phpbb_profile_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_name varchar(255) DEFAULT '' NOT NULL,
lang_explain text NOT NULL,
lang_default_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
rank_title varchar(255) DEFAULT '' NOT NULL,
rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
rank_image varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (rank_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_reports'
CREATE TABLE phpbb_reports (
report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
report_text mediumtext NOT NULL,
reported_post_text mediumtext NOT NULL,
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (report_id),
KEY post_id (post_id),
KEY pm_id (pm_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_reports_reasons'
CREATE TABLE phpbb_reports_reasons (
reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
reason_title varchar(255) DEFAULT '' NOT NULL,
reason_description mediumtext NOT NULL,
reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (reason_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_search_results'
CREATE TABLE phpbb_search_results (
search_key varchar(32) DEFAULT '' NOT NULL,
search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
search_keywords mediumtext NOT NULL,
search_authors mediumtext NOT NULL,
PRIMARY KEY (search_key)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_search_wordlist'
CREATE TABLE phpbb_search_wordlist (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word_text varchar(255) DEFAULT '' NOT NULL,
word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (word_id),
UNIQUE wrd_txt (word_text),
KEY wrd_cnt (word_count)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_search_wordmatch'
CREATE TABLE phpbb_search_wordmatch (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
UNIQUE unq_mtch (word_id, post_id, title_match),
KEY word_id (word_id),
KEY post_id (post_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_sessions'
CREATE TABLE phpbb_sessions (
session_id char(32) DEFAULT '' NOT NULL,
session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_ip varchar(40) DEFAULT '' NOT NULL,
session_browser varchar(150) DEFAULT '' NOT NULL,
session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
session_page varchar(255) DEFAULT '' NOT NULL,
session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id),
KEY session_time (session_time),
KEY session_user_id (session_user_id),
KEY session_fid (session_forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_sessions_keys'
CREATE TABLE phpbb_sessions_keys (
key_id char(32) DEFAULT '' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
last_ip varchar(40) DEFAULT '' NOT NULL,
last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (key_id, user_id),
KEY last_login (last_login)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_sitelist'
CREATE TABLE phpbb_sitelist (
site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
site_ip varchar(40) DEFAULT '' NOT NULL,
site_hostname varchar(255) DEFAULT '' NOT NULL,
ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (site_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
code varchar(50) DEFAULT '' NOT NULL,
emotion varchar(50) DEFAULT '' NOT NULL,
smiley_url varchar(50) DEFAULT '' NOT NULL,
smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (smiley_id),
KEY display_on_post (display_on_posting)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
style_name varchar(255) DEFAULT '' NOT NULL,
style_copyright varchar(255) DEFAULT '' NOT NULL,
style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
style_path varchar(100) DEFAULT '' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
style_parent_tree text NOT NULL,
PRIMARY KEY (style_id),
UNIQUE style_name (style_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_teampage'
CREATE TABLE phpbb_teampage (
teampage_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
teampage_name varchar(255) DEFAULT '' NOT NULL,
teampage_position mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
teampage_parent mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (teampage_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics'
CREATE TABLE phpbb_topics (
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_visibility tinyint(3) DEFAULT '0' NOT NULL,
topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
topic_type tinyint(3) DEFAULT '0' NOT NULL,
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_title varchar(255) DEFAULT '' NOT NULL,
poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_delete_reason varchar(255) DEFAULT '' NOT NULL,
topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY forum_id_type (forum_id, topic_type),
KEY last_post_time (topic_last_post_time),
KEY topic_visibility (topic_visibility),
KEY forum_appr_last (forum_id, topic_visibility, topic_last_post_id),
KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics_track'
CREATE TABLE phpbb_topics_track (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id),
KEY topic_id (topic_id),
KEY forum_id (forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics_posted'
CREATE TABLE phpbb_topics_posted (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics_watch'
CREATE TABLE phpbb_topics_watch (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
KEY topic_id (topic_id),
KEY user_id (user_id),
KEY notify_stat (notify_status)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_user_notifications'
CREATE TABLE phpbb_user_notifications (
item_type varchar(255) DEFAULT '' NOT NULL,
item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
method varchar(255) DEFAULT '' NOT NULL,
notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
KEY group_id (group_id),
KEY user_id (user_id),
KEY group_leader (group_leader)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_users'
CREATE TABLE phpbb_users (
user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_type tinyint(2) DEFAULT '0' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
user_permissions mediumtext NOT NULL,
user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_ip varchar(40) DEFAULT '' NOT NULL,
user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '' NOT NULL,
username_clean varchar(255) DEFAULT '' NOT NULL,
user_password varchar(255) DEFAULT '' NOT NULL,
user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_email varchar(100) DEFAULT '' NOT NULL,
user_email_hash bigint(20) DEFAULT '0' NOT NULL,
user_birthday varchar(10) DEFAULT '' NOT NULL,
user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastpage varchar(200) DEFAULT '' NOT NULL,
user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_warnings tinyint(4) DEFAULT '0' NOT NULL,
user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone varchar(100) DEFAULT 'UTC' NOT NULL,
user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_colour varchar(6) DEFAULT '' NOT NULL,
user_new_privmsg int(4) DEFAULT '0' NOT NULL,
user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_full_folder int(11) DEFAULT '-3' NOT NULL,
user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
user_avatar varchar(255) DEFAULT '' NOT NULL,
user_avatar_type varchar(255) DEFAULT '' NOT NULL,
user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_sig mediumtext NOT NULL,
user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
user_from varchar(100) DEFAULT '' NOT NULL,
user_icq varchar(15) DEFAULT '' NOT NULL,
user_aim varchar(255) DEFAULT '' NOT NULL,
user_yim varchar(255) DEFAULT '' NOT NULL,
user_msnm varchar(255) DEFAULT '' NOT NULL,
user_jabber varchar(255) DEFAULT '' NOT NULL,
user_website varchar(200) DEFAULT '' NOT NULL,
user_actkey varchar(32) DEFAULT '' NOT NULL,
user_newpasswd varchar(255) DEFAULT '' NOT NULL,
user_form_salt varchar(32) DEFAULT '' NOT NULL,
user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_reminded tinyint(4) DEFAULT '0' NOT NULL,
user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id),
KEY user_birthday (user_birthday),
KEY user_email_hash (user_email_hash),
KEY user_type (user_type),
UNIQUE username_clean (username_clean)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_warnings'
CREATE TABLE phpbb_warnings (
warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (warning_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word varchar(255) DEFAULT '' NOT NULL,
replacement varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (word_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_zebra'
CREATE TABLE phpbb_zebra (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, zebra_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|