aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/schemas/db2_schema.sql
blob: 247551ceb7e999bb49cb924dd9403c0c8b61f2b3 (plain)
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
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
/*

 $Id$

*/

/*
	Table: 'phpbb_attachments'
*/
CREATE TABLE phpbb_attachments (
	attach_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	post_msg_id integer NOT NULL DEFAULT 0,
	topic_id integer NOT NULL DEFAULT 0,
	in_message smallint NOT NULL DEFAULT 0,
	poster_id integer NOT NULL DEFAULT 0,
	is_orphan smallint NOT NULL DEFAULT 1,
	physical_filename varchar(255) NOT NULL DEFAULT '',
	real_filename varchar(255) NOT NULL DEFAULT '',
	download_count integer NOT NULL DEFAULT 0,
	attach_comment clob(65K) NOT NULL DEFAULT '',
	extension varchar(100) NOT NULL DEFAULT '',
	mimetype varchar(100) NOT NULL DEFAULT '',
	filesize integer NOT NULL DEFAULT 0,
	filetime integer NOT NULL DEFAULT 0,
	thumbnail smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (attach_id)
);

CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_acl_groups'
*/
CREATE TABLE phpbb_acl_groups (
	group_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	auth_option_id integer NOT NULL DEFAULT 0,
	auth_role_id integer NOT NULL DEFAULT 0,
	auth_setting smallint NOT NULL DEFAULT 0
);

CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_acl_options'
*/
CREATE TABLE phpbb_acl_options (
	auth_option_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	auth_option varchar(50) NOT NULL DEFAULT '',
	is_global smallint NOT NULL DEFAULT 0,
	is_local smallint NOT NULL DEFAULT 0,
	founder_only smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (auth_option_id)
);

CREATE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_acl_roles'
*/
CREATE TABLE phpbb_acl_roles (
	role_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	role_name varchar(255) NOT NULL DEFAULT '',
	role_description clob(65K) NOT NULL DEFAULT '',
	role_type varchar(10) NOT NULL DEFAULT '',
	role_order smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (role_id)
);

CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_acl_roles_data'
*/
CREATE TABLE phpbb_acl_roles_data (
	role_id integer NOT NULL DEFAULT 0,
	auth_option_id integer NOT NULL DEFAULT 0,
	auth_setting smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (role_id, auth_option_id)
);

CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_acl_users'
*/
CREATE TABLE phpbb_acl_users (
	user_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	auth_option_id integer NOT NULL DEFAULT 0,
	auth_role_id integer NOT NULL DEFAULT 0,
	auth_setting smallint NOT NULL DEFAULT 0
);

CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_banlist'
*/
CREATE TABLE phpbb_banlist (
	ban_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	ban_userid integer NOT NULL DEFAULT 0,
	ban_ip varchar(40) NOT NULL DEFAULT '',
	ban_email varchar(100) NOT NULL DEFAULT '',
	ban_start integer NOT NULL DEFAULT 0,
	ban_end integer NOT NULL DEFAULT 0,
	ban_exclude smallint NOT NULL DEFAULT 0,
	ban_reason varchar(255) NOT NULL DEFAULT '',
	ban_give_reason varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (ban_id)
);

CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_bbcodes'
*/
CREATE TABLE phpbb_bbcodes (
	bbcode_id smallint NOT NULL DEFAULT 0,
	bbcode_tag varchar(16) NOT NULL DEFAULT '',
	bbcode_helpline varchar(255) NOT NULL DEFAULT '',
	display_on_posting smallint NOT NULL DEFAULT 0,
	bbcode_match clob(65K) NOT NULL DEFAULT '',
	bbcode_tpl clob(16M) NOT NULL DEFAULT '',
	first_pass_match clob(16M) NOT NULL DEFAULT '',
	first_pass_replace clob(16M) NOT NULL DEFAULT '',
	second_pass_match clob(16M) NOT NULL DEFAULT '',
	second_pass_replace clob(16M) NOT NULL DEFAULT '',
	PRIMARY KEY (bbcode_id)
);

CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_bookmarks'
*/
CREATE TABLE phpbb_bookmarks (
	topic_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	PRIMARY KEY (topic_id, user_id)
);


/*
	Table: 'phpbb_bots'
*/
CREATE TABLE phpbb_bots (
	bot_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	bot_active smallint NOT NULL DEFAULT 1,
	bot_name varchar(255) NOT NULL DEFAULT '',
	user_id integer NOT NULL DEFAULT 0,
	bot_agent varchar(255) NOT NULL DEFAULT '',
	bot_ip varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (bot_id)
);

CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_config'
*/
CREATE TABLE phpbb_config (
	config_name varchar(255) NOT NULL DEFAULT '',
	config_value varchar(255) NOT NULL DEFAULT '',
	is_dynamic smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (config_name)
);

CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_config_config_name ON phpbb_config (config_name) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_confirm'
*/
CREATE TABLE phpbb_confirm (
	confirm_id char(32) NOT NULL DEFAULT '',
	session_id char(32) NOT NULL DEFAULT '',
	confirm_type smallint NOT NULL DEFAULT 0,
	code varchar(8) NOT NULL DEFAULT '',
	seed integer NOT NULL DEFAULT 0,
	PRIMARY KEY (session_id, confirm_id)
);

CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_disallow'
*/
CREATE TABLE phpbb_disallow (
	disallow_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	disallow_username varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (disallow_id)
);


/*
	Table: 'phpbb_drafts'
*/
CREATE TABLE phpbb_drafts (
	draft_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	user_id integer NOT NULL DEFAULT 0,
	topic_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	save_time integer NOT NULL DEFAULT 0,
	draft_subject varchar(100) NOT NULL DEFAULT '',
	draft_message clob(16M) NOT NULL DEFAULT '',
	PRIMARY KEY (draft_id)
);

CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_extensions'
*/
CREATE TABLE phpbb_extensions (
	extension_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	group_id integer NOT NULL DEFAULT 0,
	extension varchar(100) NOT NULL DEFAULT '',
	PRIMARY KEY (extension_id)
);


/*
	Table: 'phpbb_extension_groups'
*/
CREATE TABLE phpbb_extension_groups (
	group_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	group_name varchar(255) NOT NULL DEFAULT '',
	cat_id smallint NOT NULL DEFAULT 0,
	allow_group smallint NOT NULL DEFAULT 0,
	download_mode smallint NOT NULL DEFAULT 1,
	upload_icon varchar(255) NOT NULL DEFAULT '',
	max_filesize integer NOT NULL DEFAULT 0,
	allowed_forums clob(65K) NOT NULL DEFAULT '',
	allow_in_pm smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (group_id)
);


/*
	Table: 'phpbb_forums'
*/
CREATE TABLE phpbb_forums (
	forum_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	parent_id integer NOT NULL DEFAULT 0,
	left_id integer NOT NULL DEFAULT 0,
	right_id integer NOT NULL DEFAULT 0,
	forum_parents clob(16M) NOT NULL DEFAULT '',
	forum_name varchar(255) NOT NULL DEFAULT '',
	forum_desc clob(65K) NOT NULL DEFAULT '',
	forum_desc_bitfield varchar(255) NOT NULL DEFAULT '',
	forum_desc_options integer NOT NULL DEFAULT 7,
	forum_desc_uid varchar(8) NOT NULL DEFAULT '',
	forum_link varchar(255) NOT NULL DEFAULT '',
	forum_password varchar(40) NOT NULL DEFAULT '',
	forum_style smallint NOT NULL DEFAULT 0,
	forum_image varchar(255) NOT NULL DEFAULT '',
	forum_rules clob(65K) NOT NULL DEFAULT '',
	forum_rules_link varchar(255) NOT NULL DEFAULT '',
	forum_rules_bitfield varchar(255) NOT NULL DEFAULT '',
	forum_rules_options integer NOT NULL DEFAULT 7,
	forum_rules_uid varchar(8) NOT NULL DEFAULT '',
	forum_topics_per_page smallint NOT NULL DEFAULT 0,
	forum_type smallint NOT NULL DEFAULT 0,
	forum_status smallint NOT NULL DEFAULT 0,
	forum_posts integer NOT NULL DEFAULT 0,
	forum_topics integer NOT NULL DEFAULT 0,
	forum_topics_real integer NOT NULL DEFAULT 0,
	forum_last_post_id integer NOT NULL DEFAULT 0,
	forum_last_poster_id integer NOT NULL DEFAULT 0,
	forum_last_post_subject varchar(100) NOT NULL DEFAULT '',
	forum_last_post_time integer NOT NULL DEFAULT 0,
	forum_last_poster_name varchar(255) NOT NULL DEFAULT '',
	forum_last_poster_colour varchar(6) NOT NULL DEFAULT '',
	forum_flags smallint NOT NULL DEFAULT 32,
	display_on_index smallint NOT NULL DEFAULT 1,
	enable_indexing smallint NOT NULL DEFAULT 1,
	enable_icons smallint NOT NULL DEFAULT 1,
	enable_prune smallint NOT NULL DEFAULT 0,
	prune_next integer NOT NULL DEFAULT 0,
	prune_days integer NOT NULL DEFAULT 0,
	prune_viewed integer NOT NULL DEFAULT 0,
	prune_freq integer NOT NULL DEFAULT 0,
	PRIMARY KEY (forum_id)
);

CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_forums_access'
*/
CREATE TABLE phpbb_forums_access (
	forum_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	session_id char(32) NOT NULL DEFAULT '',
	PRIMARY KEY (forum_id, user_id, session_id)
);


/*
	Table: 'phpbb_forums_track'
*/
CREATE TABLE phpbb_forums_track (
	user_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	mark_time integer NOT NULL DEFAULT 0,
	PRIMARY KEY (user_id, forum_id)
);


/*
	Table: 'phpbb_forums_watch'
*/
CREATE TABLE phpbb_forums_watch (
	forum_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	notify_status smallint NOT NULL DEFAULT 0
);

CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_groups'
*/
CREATE TABLE phpbb_groups (
	group_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	group_type smallint NOT NULL DEFAULT 1,
	group_founder_manage smallint NOT NULL DEFAULT 0,
	group_name varchar(255) NOT NULL DEFAULT '',
	group_name_clean varchar(255) NOT NULL DEFAULT '',
	group_desc clob(65K) NOT NULL DEFAULT '',
	group_desc_bitfield varchar(255) NOT NULL DEFAULT '',
	group_desc_options integer NOT NULL DEFAULT 7,
	group_desc_uid varchar(8) NOT NULL DEFAULT '',
	group_display smallint NOT NULL DEFAULT 0,
	group_avatar varchar(255) NOT NULL DEFAULT '',
	group_avatar_type smallint NOT NULL DEFAULT 0,
	group_avatar_width smallint NOT NULL DEFAULT 0,
	group_avatar_height smallint NOT NULL DEFAULT 0,
	group_rank integer NOT NULL DEFAULT 0,
	group_colour varchar(6) NOT NULL DEFAULT '',
	group_sig_chars integer NOT NULL DEFAULT 0,
	group_receive_pm smallint NOT NULL DEFAULT 0,
	group_message_limit integer NOT NULL DEFAULT 0,
	group_legend smallint NOT NULL DEFAULT 1,
	PRIMARY KEY (group_id)
);

CREATE INDEX phpbb_groups_group_legend ON phpbb_groups (group_legend) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_icons'
*/
CREATE TABLE phpbb_icons (
	icons_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	icons_url varchar(255) NOT NULL DEFAULT '',
	icons_width smallint NOT NULL DEFAULT 0,
	icons_height smallint NOT NULL DEFAULT 0,
	icons_order integer NOT NULL DEFAULT 0,
	display_on_posting smallint NOT NULL DEFAULT 1,
	PRIMARY KEY (icons_id)
);

CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_lang'
*/
CREATE TABLE phpbb_lang (
	lang_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	lang_iso varchar(30) NOT NULL DEFAULT '',
	lang_dir varchar(30) NOT NULL DEFAULT '',
	lang_english_name varchar(100) NOT NULL DEFAULT '',
	lang_local_name varchar(255) NOT NULL DEFAULT '',
	lang_author varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (lang_id)
);

CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_log'
*/
CREATE TABLE phpbb_log (
	log_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	log_type smallint NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	topic_id integer NOT NULL DEFAULT 0,
	reportee_id integer NOT NULL DEFAULT 0,
	log_ip varchar(40) NOT NULL DEFAULT '',
	log_time integer NOT NULL DEFAULT 0,
	log_operation clob(65K) NOT NULL DEFAULT '',
	log_data clob(16M) NOT NULL DEFAULT '',
	PRIMARY KEY (log_id)
);

CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_moderator_cache'
*/
CREATE TABLE phpbb_moderator_cache (
	forum_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	username varchar(255) NOT NULL DEFAULT '',
	group_id integer NOT NULL DEFAULT 0,
	group_name varchar(255) NOT NULL DEFAULT '',
	display_on_index smallint NOT NULL DEFAULT 1
);

CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_modules'
*/
CREATE TABLE phpbb_modules (
	module_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	module_enabled smallint NOT NULL DEFAULT 1,
	module_display smallint NOT NULL DEFAULT 1,
	module_basename varchar(255) NOT NULL DEFAULT '',
	module_class varchar(10) NOT NULL DEFAULT '',
	parent_id integer NOT NULL DEFAULT 0,
	left_id integer NOT NULL DEFAULT 0,
	right_id integer NOT NULL DEFAULT 0,
	module_langname varchar(255) NOT NULL DEFAULT '',
	module_mode varchar(255) NOT NULL DEFAULT '',
	module_auth varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (module_id)
);

CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_poll_options'
*/
CREATE TABLE phpbb_poll_options (
	poll_option_id smallint NOT NULL DEFAULT 0,
	topic_id integer NOT NULL DEFAULT 0,
	poll_option_text clob(65K) NOT NULL DEFAULT '',
	poll_option_total integer NOT NULL DEFAULT 0
);

CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_poll_votes'
*/
CREATE TABLE phpbb_poll_votes (
	topic_id integer NOT NULL DEFAULT 0,
	poll_option_id smallint NOT NULL DEFAULT 0,
	vote_user_id integer NOT NULL DEFAULT 0,
	vote_user_ip varchar(40) NOT NULL DEFAULT ''
);

CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_posts'
*/
CREATE TABLE phpbb_posts (
	post_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	topic_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	poster_id integer NOT NULL DEFAULT 0,
	icon_id integer NOT NULL DEFAULT 0,
	poster_ip varchar(40) NOT NULL DEFAULT '',
	post_time integer NOT NULL DEFAULT 0,
	post_approved smallint NOT NULL DEFAULT 1,
	post_reported smallint NOT NULL DEFAULT 0,
	enable_bbcode smallint NOT NULL DEFAULT 1,
	enable_smilies smallint NOT NULL DEFAULT 1,
	enable_magic_url smallint NOT NULL DEFAULT 1,
	enable_sig smallint NOT NULL DEFAULT 1,
	post_username varchar(255) NOT NULL DEFAULT '',
	post_subject varchar(100) NOT NULL DEFAULT '',
	post_text clob(16M) NOT NULL DEFAULT '',
	post_checksum varchar(32) NOT NULL DEFAULT '',
	post_attachment smallint NOT NULL DEFAULT 0,
	bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
	bbcode_uid varchar(8) NOT NULL DEFAULT '',
	post_postcount smallint NOT NULL DEFAULT 1,
	post_edit_time integer NOT NULL DEFAULT 0,
	post_edit_reason varchar(255) NOT NULL DEFAULT '',
	post_edit_user integer NOT NULL DEFAULT 0,
	post_edit_count smallint NOT NULL DEFAULT 0,
	post_edit_locked smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (post_id)
);

CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_privmsgs'
*/
CREATE TABLE phpbb_privmsgs (
	msg_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	root_level integer NOT NULL DEFAULT 0,
	author_id integer NOT NULL DEFAULT 0,
	icon_id integer NOT NULL DEFAULT 0,
	author_ip varchar(40) NOT NULL DEFAULT '',
	message_time integer NOT NULL DEFAULT 0,
	enable_bbcode smallint NOT NULL DEFAULT 1,
	enable_smilies smallint NOT NULL DEFAULT 1,
	enable_magic_url smallint NOT NULL DEFAULT 1,
	enable_sig smallint NOT NULL DEFAULT 1,
	message_subject varchar(100) NOT NULL DEFAULT '',
	message_text clob(16M) NOT NULL DEFAULT '',
	message_edit_reason varchar(255) NOT NULL DEFAULT '',
	message_edit_user integer NOT NULL DEFAULT 0,
	message_attachment smallint NOT NULL DEFAULT 0,
	bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
	bbcode_uid varchar(8) NOT NULL DEFAULT '',
	message_edit_time integer NOT NULL DEFAULT 0,
	message_edit_count smallint NOT NULL DEFAULT 0,
	to_address clob(65K) NOT NULL DEFAULT '',
	bcc_address clob(65K) NOT NULL DEFAULT '',
	PRIMARY KEY (msg_id)
);

CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_privmsgs_folder'
*/
CREATE TABLE phpbb_privmsgs_folder (
	folder_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	user_id integer NOT NULL DEFAULT 0,
	folder_name varchar(255) NOT NULL DEFAULT '',
	pm_count integer NOT NULL DEFAULT 0,
	PRIMARY KEY (folder_id)
);

CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_privmsgs_rules'
*/
CREATE TABLE phpbb_privmsgs_rules (
	rule_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	user_id integer NOT NULL DEFAULT 0,
	rule_check integer NOT NULL DEFAULT 0,
	rule_connection integer NOT NULL DEFAULT 0,
	rule_string varchar(255) NOT NULL DEFAULT '',
	rule_user_id integer NOT NULL DEFAULT 0,
	rule_group_id integer NOT NULL DEFAULT 0,
	rule_action integer NOT NULL DEFAULT 0,
	rule_folder_id integer NOT NULL DEFAULT 0,
	PRIMARY KEY (rule_id)
);

CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_privmsgs_to'
*/
CREATE TABLE phpbb_privmsgs_to (
	msg_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	author_id integer NOT NULL DEFAULT 0,
	pm_deleted smallint NOT NULL DEFAULT 0,
	pm_new smallint NOT NULL DEFAULT 1,
	pm_unread smallint NOT NULL DEFAULT 1,
	pm_replied smallint NOT NULL DEFAULT 0,
	pm_marked smallint NOT NULL DEFAULT 0,
	pm_forwarded smallint NOT NULL DEFAULT 0,
	folder_id integer NOT NULL DEFAULT 0
);

CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_profile_fields'
*/
CREATE TABLE phpbb_profile_fields (
	field_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	field_name varchar(255) NOT NULL DEFAULT '',
	field_type smallint NOT NULL DEFAULT 0,
	field_ident varchar(20) NOT NULL DEFAULT '',
	field_length varchar(20) NOT NULL DEFAULT '',
	field_minlen varchar(255) NOT NULL DEFAULT '',
	field_maxlen varchar(255) NOT NULL DEFAULT '',
	field_novalue varchar(255) NOT NULL DEFAULT '',
	field_default_value varchar(255) NOT NULL DEFAULT '',
	field_validation varchar(20) NOT NULL DEFAULT '',
	field_required smallint NOT NULL DEFAULT 0,
	field_show_on_reg smallint NOT NULL DEFAULT 0,
	field_hide smallint NOT NULL DEFAULT 0,
	field_no_view smallint NOT NULL DEFAULT 0,
	field_active smallint NOT NULL DEFAULT 0,
	field_order integer NOT NULL DEFAULT 0,
	PRIMARY KEY (field_id)
);

CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_profile_fields_data'
*/
CREATE TABLE phpbb_profile_fields_data (
	user_id integer NOT NULL DEFAULT 0,
	PRIMARY KEY (user_id)
);


/*
	Table: 'phpbb_profile_fields_lang'
*/
CREATE TABLE phpbb_profile_fields_lang (
	field_id integer NOT NULL DEFAULT 0,
	lang_id integer NOT NULL DEFAULT 0,
	option_id integer NOT NULL DEFAULT 0,
	field_type smallint NOT NULL DEFAULT 0,
	lang_value varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (field_id, lang_id, option_id)
);


/*
	Table: 'phpbb_profile_lang'
*/
CREATE TABLE phpbb_profile_lang (
	field_id integer NOT NULL DEFAULT 0,
	lang_id integer NOT NULL DEFAULT 0,
	lang_name varchar(255) NOT NULL DEFAULT '',
	lang_explain clob(65K) NOT NULL DEFAULT '',
	lang_default_value varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (field_id, lang_id)
);


/*
	Table: 'phpbb_ranks'
*/
CREATE TABLE phpbb_ranks (
	rank_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	rank_title varchar(255) NOT NULL DEFAULT '',
	rank_min integer NOT NULL DEFAULT 0,
	rank_special smallint NOT NULL DEFAULT 0,
	rank_image varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (rank_id)
);


/*
	Table: 'phpbb_reports'
*/
CREATE TABLE phpbb_reports (
	report_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	reason_id smallint NOT NULL DEFAULT 0,
	post_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	user_notify smallint NOT NULL DEFAULT 0,
	report_closed smallint NOT NULL DEFAULT 0,
	report_time integer NOT NULL DEFAULT 0,
	report_text clob(16M) NOT NULL DEFAULT '',
	PRIMARY KEY (report_id)
);


/*
	Table: 'phpbb_reports_reasons'
*/
CREATE TABLE phpbb_reports_reasons (
	reason_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	reason_title varchar(255) NOT NULL DEFAULT '',
	reason_description clob(16M) NOT NULL DEFAULT '',
	reason_order smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (reason_id)
);


/*
	Table: 'phpbb_search_results'
*/
CREATE TABLE phpbb_search_results (
	search_key varchar(32) NOT NULL DEFAULT '',
	search_time integer NOT NULL DEFAULT 0,
	search_keywords clob(16M) NOT NULL DEFAULT '',
	search_authors clob(16M) NOT NULL DEFAULT '',
	PRIMARY KEY (search_key)
);


/*
	Table: 'phpbb_search_wordlist'
*/
CREATE TABLE phpbb_search_wordlist (
	word_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	word_text varchar(255) NOT NULL DEFAULT '',
	word_common smallint NOT NULL DEFAULT 0,
	word_count integer NOT NULL DEFAULT 0,
	PRIMARY KEY (word_id)
);

CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_search_wordmatch'
*/
CREATE TABLE phpbb_search_wordmatch (
	post_id integer NOT NULL DEFAULT 0,
	word_id integer NOT NULL DEFAULT 0,
	title_match smallint NOT NULL DEFAULT 0
);

CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_sessions'
*/
CREATE TABLE phpbb_sessions (
	session_id char(32) NOT NULL DEFAULT '',
	session_user_id integer NOT NULL DEFAULT 0,
	session_last_visit integer NOT NULL DEFAULT 0,
	session_start integer NOT NULL DEFAULT 0,
	session_time integer NOT NULL DEFAULT 0,
	session_ip varchar(40) NOT NULL DEFAULT '',
	session_browser varchar(150) NOT NULL DEFAULT '',
	session_forwarded_for varchar(255) NOT NULL DEFAULT '',
	session_page varchar(255) NOT NULL DEFAULT '',
	session_viewonline smallint NOT NULL DEFAULT 1,
	session_autologin smallint NOT NULL DEFAULT 0,
	session_admin smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (session_id)
);

CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_sessions_keys'
*/
CREATE TABLE phpbb_sessions_keys (
	key_id char(32) NOT NULL DEFAULT '',
	user_id integer NOT NULL DEFAULT 0,
	last_ip varchar(40) NOT NULL DEFAULT '',
	last_login integer NOT NULL DEFAULT 0,
	PRIMARY KEY (key_id, user_id)
);

CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_sitelist'
*/
CREATE TABLE phpbb_sitelist (
	site_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	site_ip varchar(40) NOT NULL DEFAULT '',
	site_hostname varchar(255) NOT NULL DEFAULT '',
	ip_exclude smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (site_id)
);


/*
	Table: 'phpbb_smilies'
*/
CREATE TABLE phpbb_smilies (
	smiley_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	code varchar(50) NOT NULL DEFAULT '',
	emotion varchar(50) NOT NULL DEFAULT '',
	smiley_url varchar(50) NOT NULL DEFAULT '',
	smiley_width smallint NOT NULL DEFAULT 0,
	smiley_height smallint NOT NULL DEFAULT 0,
	smiley_order integer NOT NULL DEFAULT 0,
	display_on_posting smallint NOT NULL DEFAULT 1,
	PRIMARY KEY (smiley_id)
);

CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_styles'
*/
CREATE TABLE phpbb_styles (
	style_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	style_name varchar(255) NOT NULL DEFAULT '',
	style_copyright varchar(255) NOT NULL DEFAULT '',
	style_active smallint NOT NULL DEFAULT 1,
	template_id smallint NOT NULL DEFAULT 0,
	theme_id smallint NOT NULL DEFAULT 0,
	imageset_id smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (style_id)
);

CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_styles_template'
*/
CREATE TABLE phpbb_styles_template (
	template_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	template_name varchar(255) NOT NULL DEFAULT '',
	template_copyright varchar(255) NOT NULL DEFAULT '',
	template_path varchar(100) NOT NULL DEFAULT '',
	bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
	template_storedb smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (template_id)
);

CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_styles_template_data'
*/
CREATE TABLE phpbb_styles_template_data (
	template_id smallint NOT NULL DEFAULT 0,
	template_filename varchar(100) NOT NULL DEFAULT '',
	template_included clob(65K) NOT NULL DEFAULT '',
	template_mtime integer NOT NULL DEFAULT 0,
	template_data clob(16M) NOT NULL DEFAULT ''
);

CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_styles_theme'
*/
CREATE TABLE phpbb_styles_theme (
	theme_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	theme_name varchar(255) NOT NULL DEFAULT '',
	theme_copyright varchar(255) NOT NULL DEFAULT '',
	theme_path varchar(100) NOT NULL DEFAULT '',
	theme_storedb smallint NOT NULL DEFAULT 0,
	theme_mtime integer NOT NULL DEFAULT 0,
	theme_data clob(16M) NOT NULL DEFAULT '',
	PRIMARY KEY (theme_id)
);

CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_styles_imageset'
*/
CREATE TABLE phpbb_styles_imageset (
	imageset_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	imageset_name varchar(255) NOT NULL DEFAULT '',
	imageset_copyright varchar(255) NOT NULL DEFAULT '',
	imageset_path varchar(100) NOT NULL DEFAULT '',
	PRIMARY KEY (imageset_id)
);

CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_styles_imageset_data'
*/
CREATE TABLE phpbb_styles_imageset_data (
	image_id smallint NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	image_name varchar(200) NOT NULL DEFAULT '',
	image_filename varchar(200) NOT NULL DEFAULT '',
	image_lang varchar(30) NOT NULL DEFAULT '',
	image_height smallint NOT NULL DEFAULT 0,
	image_width smallint NOT NULL DEFAULT 0,
	imageset_id smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (image_id)
);

CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_topics'
*/
CREATE TABLE phpbb_topics (
	topic_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	forum_id integer NOT NULL DEFAULT 0,
	icon_id integer NOT NULL DEFAULT 0,
	topic_attachment smallint NOT NULL DEFAULT 0,
	topic_approved smallint NOT NULL DEFAULT 1,
	topic_reported smallint NOT NULL DEFAULT 0,
	topic_title varchar(100) NOT NULL DEFAULT '',
	topic_poster integer NOT NULL DEFAULT 0,
	topic_time integer NOT NULL DEFAULT 0,
	topic_time_limit integer NOT NULL DEFAULT 0,
	topic_views integer NOT NULL DEFAULT 0,
	topic_replies integer NOT NULL DEFAULT 0,
	topic_replies_real integer NOT NULL DEFAULT 0,
	topic_status smallint NOT NULL DEFAULT 0,
	topic_type smallint NOT NULL DEFAULT 0,
	topic_first_post_id integer NOT NULL DEFAULT 0,
	topic_first_poster_name varchar(255) NOT NULL DEFAULT '',
	topic_first_poster_colour varchar(6) NOT NULL DEFAULT '',
	topic_last_post_id integer NOT NULL DEFAULT 0,
	topic_last_poster_id integer NOT NULL DEFAULT 0,
	topic_last_poster_name varchar(255) NOT NULL DEFAULT '',
	topic_last_poster_colour varchar(6) NOT NULL DEFAULT '',
	topic_last_post_subject varchar(100) NOT NULL DEFAULT '',
	topic_last_post_time integer NOT NULL DEFAULT 0,
	topic_last_view_time integer NOT NULL DEFAULT 0,
	topic_moved_id integer NOT NULL DEFAULT 0,
	topic_bumped smallint NOT NULL DEFAULT 0,
	topic_bumper integer NOT NULL DEFAULT 0,
	poll_title varchar(255) NOT NULL DEFAULT '',
	poll_start integer NOT NULL DEFAULT 0,
	poll_length integer NOT NULL DEFAULT 0,
	poll_max_options smallint NOT NULL DEFAULT 1,
	poll_last_vote integer NOT NULL DEFAULT 0,
	poll_vote_change smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (topic_id)
);

CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_topics_track'
*/
CREATE TABLE phpbb_topics_track (
	user_id integer NOT NULL DEFAULT 0,
	topic_id integer NOT NULL DEFAULT 0,
	forum_id integer NOT NULL DEFAULT 0,
	mark_time integer NOT NULL DEFAULT 0,
	PRIMARY KEY (user_id, topic_id)
);

CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_topics_posted'
*/
CREATE TABLE phpbb_topics_posted (
	user_id integer NOT NULL DEFAULT 0,
	topic_id integer NOT NULL DEFAULT 0,
	topic_posted smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (user_id, topic_id)
);


/*
	Table: 'phpbb_topics_watch'
*/
CREATE TABLE phpbb_topics_watch (
	topic_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	notify_status smallint NOT NULL DEFAULT 0
);

CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_user_group'
*/
CREATE TABLE phpbb_user_group (
	group_id integer NOT NULL DEFAULT 0,
	user_id integer NOT NULL DEFAULT 0,
	group_leader smallint NOT NULL DEFAULT 0,
	user_pending smallint NOT NULL DEFAULT 1
);

CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_users'
*/
CREATE TABLE phpbb_users (
	user_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	user_type smallint NOT NULL DEFAULT 0,
	group_id integer NOT NULL DEFAULT 3,
	user_permissions clob(16M) NOT NULL DEFAULT '',
	user_perm_from integer NOT NULL DEFAULT 0,
	user_ip varchar(40) NOT NULL DEFAULT '',
	user_regdate integer NOT NULL DEFAULT 0,
	username varchar(255) NOT NULL DEFAULT '',
	username_clean varchar(255) NOT NULL DEFAULT '',
	user_password varchar(40) NOT NULL DEFAULT '',
	user_passchg integer NOT NULL DEFAULT 0,
	user_pass_convert smallint NOT NULL DEFAULT 0,
	user_email varchar(100) NOT NULL DEFAULT '',
	user_email_hash float NOT NULL DEFAULT 0,
	user_birthday varchar(10) NOT NULL DEFAULT '',
	user_lastvisit integer NOT NULL DEFAULT 0,
	user_lastmark integer NOT NULL DEFAULT 0,
	user_lastpost_time integer NOT NULL DEFAULT 0,
	user_lastpage varchar(200) NOT NULL DEFAULT '',
	user_last_confirm_key varchar(10) NOT NULL DEFAULT '',
	user_last_search integer NOT NULL DEFAULT 0,
	user_warnings smallint NOT NULL DEFAULT 0,
	user_last_warning integer NOT NULL DEFAULT 0,
	user_login_attempts smallint NOT NULL DEFAULT 0,
	user_inactive_reason smallint NOT NULL DEFAULT 0,
	user_inactive_time integer NOT NULL DEFAULT 0,
	user_posts integer NOT NULL DEFAULT 0,
	user_lang varchar(30) NOT NULL DEFAULT '',
	user_timezone float NOT NULL DEFAULT 0,
	user_dst smallint NOT NULL DEFAULT 0,
	user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i',
	user_style smallint NOT NULL DEFAULT 0,
	user_rank integer NOT NULL DEFAULT 0,
	user_colour varchar(6) NOT NULL DEFAULT '',
	user_new_privmsg integer NOT NULL DEFAULT 0,
	user_unread_privmsg integer NOT NULL DEFAULT 0,
	user_last_privmsg integer NOT NULL DEFAULT 0,
	user_message_rules smallint NOT NULL DEFAULT 0,
	user_full_folder integer NOT NULL DEFAULT -3,
	user_emailtime integer NOT NULL DEFAULT 0,
	user_topic_show_days smallint NOT NULL DEFAULT 0,
	user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't',
	user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd',
	user_post_show_days smallint NOT NULL DEFAULT 0,
	user_post_sortby_type varchar(1) NOT NULL DEFAULT 't',
	user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a',
	user_notify smallint NOT NULL DEFAULT 0,
	user_notify_pm smallint NOT NULL DEFAULT 1,
	user_notify_type smallint NOT NULL DEFAULT 0,
	user_allow_pm smallint NOT NULL DEFAULT 1,
	user_allow_viewonline smallint NOT NULL DEFAULT 1,
	user_allow_viewemail smallint NOT NULL DEFAULT 1,
	user_allow_massemail smallint NOT NULL DEFAULT 1,
	user_options integer NOT NULL DEFAULT 895,
	user_avatar varchar(255) NOT NULL DEFAULT '',
	user_avatar_type smallint NOT NULL DEFAULT 0,
	user_avatar_width smallint NOT NULL DEFAULT 0,
	user_avatar_height smallint NOT NULL DEFAULT 0,
	user_sig clob(16M) NOT NULL DEFAULT '',
	user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '',
	user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
	user_from varchar(100) NOT NULL DEFAULT '',
	user_icq varchar(15) NOT NULL DEFAULT '',
	user_aim varchar(255) NOT NULL DEFAULT '',
	user_yim varchar(255) NOT NULL DEFAULT '',
	user_msnm varchar(255) NOT NULL DEFAULT '',
	user_jabber varchar(255) NOT NULL DEFAULT '',
	user_website varchar(200) NOT NULL DEFAULT '',
	user_occ clob(65K) NOT NULL DEFAULT '',
	user_interests clob(65K) NOT NULL DEFAULT '',
	user_actkey varchar(32) NOT NULL DEFAULT '',
	user_newpasswd varchar(40) NOT NULL DEFAULT '',
	user_form_salt varchar(32) NOT NULL DEFAULT '',
	PRIMARY KEY (user_id)
);

CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;
CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;

/*
	Table: 'phpbb_warnings'
*/
CREATE TABLE phpbb_warnings (
	warning_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	user_id integer NOT NULL DEFAULT 0,
	post_id integer NOT NULL DEFAULT 0,
	log_id integer NOT NULL DEFAULT 0,
	warning_time integer NOT NULL DEFAULT 0,
	PRIMARY KEY (warning_id)
);


/*
	Table: 'phpbb_words'
*/
CREATE TABLE phpbb_words (
	word_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
	word varchar(255) NOT NULL DEFAULT '',
	replacement varchar(255) NOT NULL DEFAULT '',
	PRIMARY KEY (word_id)
);


/*
	Table: 'phpbb_zebra'
*/
CREATE TABLE phpbb_zebra (
	user_id integer NOT NULL DEFAULT 0,
	zebra_id integer NOT NULL DEFAULT 0,
	friend smallint NOT NULL DEFAULT 0,
	foe smallint NOT NULL DEFAULT 0,
	PRIMARY KEY (user_id, zebra_id)
);

CREATE INDEX phpbb_zebra_zebra_user ON phpbb_zebra (zebra_id, user_id) PCTFREE 10 MINPCTUSED 10 ALLOW REVERSE SCANS  PAGE SPLIT SYMMETRIC COLLECT  SAMPLED DETAILED  STATISTICS;