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
|
#
# phpbb - Firebird schema
#
# $Id$
#
# Table: phpbb_attachments
CREATE TABLE phpbb_attachments (
attach_id INTEGER DEFAULT 0 NOT NULL,
post_id INTEGER DEFAULT 0 NOT NULL,
privmsgs_id INTEGER DEFAULT 0 NOT NULL,
user_id_from INTEGER NOT NULL,
user_id_to INTEGER NOT NULL
);
CREATE INDEX phpbb_attachments_attach_id ON phpbb_attachments (attach_id);
CREATE INDEX phpbb_attachments_privmsgs_id ON phpbb_attachments (privmsgs_id);
# Table: phpbb_attach_desc
CREATE TABLE phpbb_attach_desc (
attach_id INTEGER NOT NULL,
physical_filename VARCHAR(255) NOT NULL,
real_filename VARCHAR(255) NOT NULL,
download_count INTEGER DEFAULT 0 NOT NULL,
comment VARCHAR(255) DEFAULT '',
extension VARCHAR(100),
mimetype VARCHAR(100),
filesize INTEGER NOT NULL,
filetime INTEGER DEFAULT 0 NOT NULL,
thumbnail SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY (attach_id)
);
CREATE GENERATOR phpbb_attach_desc_gen;
SET GENERATOR phpbb_attach_desc_gen TO 0;
CREATE INDEX phpbb_attach_desc_filetime ON phpbb_attach_desc (filetime);
CREATE INDEX phpbb_attach_desc_filesize ON phpbb_attach_desc (filesize);
CREATE TRIGGER phpbb_attach_desc_trig
FOR phpbb_attach_desc BEFORE INSERT
AS BEGIN
IF (NEW.attach_id IS NULL) THEN
NEW.attach_id = GEN_ID(phpbb_attach_desc_gen, 1)|
END;
# Table: phpbb_auth_groups
CREATE TABLE phpbb_auth_groups (
group_id INTEGER DEFAULT 0 NOT NULL,
forum_id INTEGER DEFAULT 0 NOT NULL,
auth_option_id SMALLINT DEFAULT 0 NOT NULL,
auth_setting SMALLINT DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_auth_groups_group_id ON phpbb_auth_groups (group_id);
CREATE INDEX phpbb_auth_groups_option_id ON phpbb_auth_groups (auth_option_id);
# Table: phpbb_auth_options
CREATE TABLE phpbb_auth_options (
auth_option_id SMALLINT NOT NULL,
auth_option CHAR(20) NOT NULL,
is_global SMALLINT DEFAULT 0 NOT NULL,
is_local SMALLINT DEFAULT 0 NOT NULL,
founder_only SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY (auth_option_id)
);
CREATE GENERATOR phpbb_auth_options_gen;
SET GENERATOR phpbb_auth_options_gen TO 0;
CREATE INDEX phpbb_auth_options_auth_option ON phpbb_auth_options (auth_option);
CREATE TRIGGER phpbb_auth_options_trig
FOR phpbb_auth_options BEFORE INSERT
AS BEGIN
IF (NEW.auth_option_id IS NULL) THEN
NEW.auth_option_id = GEN_ID(phpbb_auth_options_gen, 1)|
END;
# Table: phpbb_auth_presets
CREATE TABLE phpbb_auth_presets (
preset_id SMALLINT NOT NULL,
preset_name VARCHAR(50) NOT NULL,
preset_user_id INTEGER NOT NULL,
preset_type VARCHAR(2) NOT NULL,
preset_data BLOB SUB_TYPE 1,
PRIMARY KEY (preset_id)
);
CREATE GENERATOR phpbb_auth_presets_gen;
SET GENERATOR phpbb_auth_presets_gen TO 0;
CREATE INDEX phpbb_auth_presets_type ON phpbb_auth_presets (preset_type);
CREATE TRIGGER phpbb_auth_presets_trig
FOR phpbb_auth_presets BEFORE INSERT
AS BEGIN
IF (NEW.preset_id IS NULL) THEN
NEW.preset_id = GEN_ID(phpbb_auth_presets_gen, 1)|
END;
# Table: phpbb_auth_users
CREATE TABLE phpbb_auth_users (
user_id INTEGER DEFAULT 0 NOT NULL,
forum_id INTEGER DEFAULT 0 NOT NULL,
auth_option_id SMALLINT DEFAULT 0 NOT NULL,
auth_setting SMALLINT DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_auth_users_user_id ON phpbb_auth_users (user_id);
CREATE INDEX phpbb_auth_users_option_id ON phpbb_auth_users (auth_option_id);
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id INTEGER NOT NULL,
ban_userid INTEGER DEFAULT 0 NOT NULL,
ban_ip VARCHAR(40) DEFAULT '' NOT NULL,
ban_email VARCHAR(50) DEFAULT '' NOT NULL,
ban_start INTEGER DEFAULT 0 NOT NULL,
ban_end INTEGER DEFAULT 0 NOT NULL,
ban_exclude SMALLINT DEFAULT 0 NOT NULL,
ban_reason VARCHAR(255),
ban_give_reason VARCHAR(255) DEFAULT '' NOT NULL,
PRIMARY KEY (ban_id)
);
CREATE GENERATOR phpbb_banlist_gen;
SET GENERATOR phpbb_banlist_gen TO 0;
CREATE TRIGGER phpbb_banlist_trig
FOR phpbb_banlist BEFORE INSERT
AS BEGIN
IF (NEW.ban_id IS NULL) THEN
NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1)|
END;
# Table: 'phpbb_config'
CREATE TABLE phpbb_config (
config_name VARCHAR(50) NOT NULL,
config_value VARCHAR(255) NOT NULL,
is_dynamic SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY (config_name)
);
CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
# Table: 'phpbb_confirm'
CREATE TABLE phpbb_confirm (
confirm_id CHAR(32) DEFAULT '' NOT NULL,
session_id CHAR(32) DEFAULT '' NOT NULL,
code CHAR(6) DEFAULT '' NOT NULL,
PRIMARY KEY (session_id, confirm_id)
);
# Table: 'phpbb_disallow'
CREATE TABLE phpbb_disallow (
disallow_id INTEGER NOT NULL,
disallow_username VARCHAR(30),
PRIMARY KEY (disallow_id)
);
CREATE GENERATOR phpbb_disallow_gen;
SET GENERATOR phpbb_disallow_gen TO 0;
CREATE TRIGGER phpbb_disallow_trig
FOR phpbb_disallow BEFORE INSERT
AS BEGIN
IF (NEW.disallow_id IS NULL) THEN
NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1)|
END;
# Table: 'phpbb_extensions'
CREATE TABLE phpbb_extensions (
extension_id INTEGER NOT NULL,
group_id INTEGER DEFAULT 0 NOT NULL,
extension VARCHAR(100) DEFAULT '' NOT NULL,
comment VARCHAR(100) DEFAULT '' NOT NULL,
PRIMARY KEY (extension_id)
);
CREATE GENERATOR phpbb_extensions_gen;
SET GENERATOR phpbb_extensions_gen TO 0;
CREATE TRIGGER phpbb_extensions_trig
FOR phpbb_extensions BEFORE INSERT
AS BEGIN
IF (NEW.extension_id IS NULL) THEN
NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1)|
END;
# Table: 'phpbb_extension_groups'
CREATE TABLE phpbb_extension_groups (
group_id INTEGER NOT NULL,
group_name VARCHAR(20) DEFAULT '' NOT NULL,
cat_id SMALLINT DEFAULT 0 NOT NULL,
allow_group SMALLINT DEFAULT 0 NOT NULL,
download_mode SMALLINT DEFAULT 1 NOT NULL,
upload_icon VARCHAR(100) DEFAULT '' NOT NULL,
max_filesize INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY (group_id)
);
CREATE GENERATOR phpbb_extension_groups_gen;
SET GENERATOR phpbb_extension_groups_gen TO 0;
CREATE TRIGGER phpbb_extension_groups_trig
FOR phpbb_extension_groups BEFORE INSERT
AS BEGIN
IF (NEW.group_id IS NULL) THEN
NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1)|
END;
# Table: 'phpbb_forbidden_extensions'
CREATE TABLE phpbb_forbidden_extensions (
extension_id INTEGER NOT NULL,
extension VARCHAR(100) NOT NULL,
PRIMARY KEY (extension_id)
);
CREATE GENERATOR phpbb_forbidden_extensions_gen;
SET GENERATOR phpbb_forbidden_extensions_gen TO 0;
CREATE TRIGGER phpbb_forbidden_extensions_trig
FOR phpbb_forbidden_extensions BEFORE INSERT
AS BEGIN
IF (NEW.extension_id IS NULL) THEN
NEW.extension_id = GEN_ID(phpbb_forbidden_extensions_gen, 1)|
END;
# Table: 'phpbb_forums'
CREATE TABLE phpbb_forums (
forum_id SMALLINT NOT NULL,
parent_id SMALLINT NOT NULL,
left_id SMALLINT NOT NULL,
right_id SMALLINT NOT NULL,
forum_parents BLOB SUB_TYPE 1,
forum_name VARCHAR(150) NOT NULL,
forum_desc BLOB SUB_TYPE 1,
forum_link VARCHAR(200) DEFAULT '' NOT NULL,
forum_password VARCHAR(32) DEFAULT '' NOT NULL,
forum_style SMALLINT DEFAULT 0 NOT NULL,
forum_image VARCHAR(50) DEFAULT '' NOT NULL,
forum_topics_per_page SMALLINT DEFAULT 0 NOT NULL,
forum_type SMALLINT DEFAULT 0 NOT NULL,
forum_status SMALLINT DEFAULT 0 NOT NULL,
forum_posts INTEGER DEFAULT 0 NOT NULL,
forum_topics INTEGER DEFAULT 0 NOT NULL,
forum_topics_real INTEGER DEFAULT 0 NOT NULL,
forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
forum_last_poster_name VARCHAR(30) DEFAULT '' NOT NULL,
forum_flags SMALLINT DEFAULT 0 NOT NULL,
display_on_index SMALLINT DEFAULT 1 NOT NULL,
enable_icons SMALLINT DEFAULT 1 NOT NULL,
enable_prune SMALLINT DEFAULT 0 NOT NULL,
prune_next INTEGER DEFAULT 0 NOT NULL,
prune_days SMALLINT DEFAULT 0 NOT NULL,
prune_freq SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY (forum_id)
);
CREATE GENERATOR phpbb_forums_gen;
SET GENERATOR phpbb_forums_gen TO 0;
CREATE INDEX phpbb_forums_left_id ON phpbb_forums (left_id);
CREATE INDEX phpbb_forums_last_post_id ON phpbb_forums (forum_last_post_id);
CREATE TRIGGER phpbb_forums_trig
FOR phpbb_forums BEFORE INSERT
AS BEGIN
IF (NEW.forum_id IS NULL) THEN
NEW.forum_id = GEN_ID(phpbb_forums_gen, 1)|
END;
# Table: phpbb_forum_access
CREATE TABLE phpbb_forum_access (
forum_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
session_id CHAR(32) DEFAULT '' NOT NULL,
PRIMARY KEY (forum_id,user_id,session_id)
);
# Table: 'phpbb_forums_marking'
CREATE TABLE phpbb_forums_marking (
user_id INTEGER DEFAULT 0 NOT NULL,
forum_id INTEGER DEFAULT 0 NOT NULL,
mark_time INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY (user_id, forum_id)
);
# Table: 'phpbb_forums_watch'
CREATE TABLE phpbb_forums_watch (
forum_id SMALLINT DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
notify_status SMALLINT DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
CREATE INDEX phpbb_forums_watch_status ON phpbb_forums_watch (notify_status);
# Table: 'phpbb_groups'
CREATE TABLE phpbb_groups (
group_id INTEGER NOT NULL,
group_type SMALLINT DEFAULT 1 NOT NULL,
group_name VARCHAR(40) DEFAULT '' NOT NULL,
group_display SMALLINT DEFAULT 0 NOT NULL,
group_avatar VARCHAR(100) DEFAULT '' NOT NULL,
group_avatar_type SMALLINT DEFAULT 0 NOT NULL,
group_rank INTEGER DEFAULT 0 NOT NULL,
group_colour VARCHAR(6) DEFAULT '' NOT NULL,
group_description VARCHAR(255) DEFAULT '' NOT NULL,
PRIMARY KEY (group_id)
);
CREATE GENERATOR phpbb_groups_gen;
SET GENERATOR phpbb_groups_gen TO 0;
CREATE TRIGGER phpbb_groups_trig
FOR phpbb_groups BEFORE INSERT
AS BEGIN
IF (NEW.group_id IS NULL) THEN
NEW.group_id = GEN_ID(phpbb_groups_gen, 1)|
END;
# Table: 'phpbb_groups_moderator'
CREATE TABLE phpbb_groups_moderator (
group_id INTEGER NOT NULL,
user_id INTEGER NOT NULL
);
# Table: 'phpbb_icons'
CREATE TABLE phpbb_icons (
icons_id SMALLINT NOT NULL,
icons_url VARCHAR(50),
icons_width SMALLINT NOT NULL,
icons_height SMALLINT NOT NULL,
icons_order SMALLINT NOT NULL,
display_on_posting SMALLINT DEFAULT 1 NOT NULL,
PRIMARY KEY (icons_id)
);
CREATE GENERATOR phpbb_icons_gen;
SET GENERATOR phpbb_icons_gen TO 0;
CREATE TRIGGER phpbb_icons_trig
FOR phpbb_icons BEFORE INSERT
AS BEGIN
IF (NEW.icons_id IS NULL) THEN
NEW.icons_id = GEN_ID(phpbb_icons_gen, 1)|
END;
# Table: 'phpbb_lang'
CREATE TABLE phpbb_lang (
lang_id SMALLINT NOT NULL,
lang_iso VARCHAR(5) NOT NULL,
lang_dir VARCHAR(30) NOT NULL,
lang_english_name VARCHAR(30),
lang_local_name VARCHAR(100),
lang_author VARCHAR(100),
PRIMARY KEY (lang_id)
);
CREATE GENERATOR phpbb_lang_gen;
SET GENERATOR phpbb_lang_gen TO 0;
CREATE TRIGGER phpbb_lang_trig
FOR phpbb_lang BEFORE INSERT
AS BEGIN
IF (NEW.lang_id IS NULL) THEN
NEW.lang_id = GEN_ID(phpbb_lang_gen, 1)|
END;
# Table: 'phpbb_log_moderator'
CREATE TABLE phpbb_log_moderator (
log_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
forum_id INTEGER DEFAULT 0 NOT NULL,
topic_id INTEGER DEFAULT 0 NOT NULL,
log_ip VARCHAR(40) NOT NULL,
log_time INTEGER NOT NULL,
log_operation BLOB SUB_TYPE 1,
log_data BLOB SUB_TYPE 1,
PRIMARY KEY (log_id)
);
CREATE GENERATOR phpbb_log_moderator_gen;
SET GENERATOR phpbb_log_moderator_gen TO 0;
CREATE INDEX phpbb_log_moderator_forum ON phpbb_log_moderator (forum_id);
CREATE INDEX phpbb_log_moderator_topic ON phpbb_log_moderator (topic_id);
CREATE INDEX phpbb_log_moderator_user ON phpbb_log_moderator (user_id);
CREATE TRIGGER phpbb_log_moderator_trig
FOR phpbb_log_moderator BEFORE INSERT
AS BEGIN
IF (NEW.log_id IS NULL) THEN
NEW.log_id = GEN_ID(phpbb_log_moderator_gen, 1)|
END;
# Table: 'phpbb_log_admin'
CREATE TABLE phpbb_log_admin (
log_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
log_ip VARCHAR(40) NOT NULL,
log_time INTEGER NOT NULL,
log_operation BLOB SUB_TYPE 1,
log_data BLOB SUB_TYPE 1,
PRIMARY KEY (log_id)
);
CREATE GENERATOR phpbb_log_admin_gen;
SET GENERATOR phpbb_log_admin_gen TO 0;
CREATE INDEX phpbb_log_admin_user_id ON phpbb_log_admin (user_id);
CREATE TRIGGER phpbb_log_admin_trig
FOR phpbb_log_admin BEFORE INSERT
AS BEGIN
IF (NEW.log_id IS NULL) THEN
NEW.log_id = GEN_ID(phpbb_log_admin_gen, 1)|
END;
# Table: 'phpbb_moderator_cache'
CREATE TABLE phpbb_moderator_cache (
forum_id INTEGER NOT NULL,
user_id INTEGER,
username CHAR(30),
group_id INTEGER,
groupname CHAR(30),
display_on_index SMALLINT DEFAULT 1 NOT NULL
);
CREATE INDEX phpbb_mod_cache_disp ON phpbb_moderator_cache (display_on_index);
CREATE INDEX phpbb_mod_cache_forum ON phpbb_moderator_cache (forum_id);
# Table: 'phpbb_vote_results'
CREATE TABLE phpbb_poll_results (
poll_option_id SMALLINT DEFAULT 0 NOT NULL,
topic_id INTEGER DEFAULT 0 NOT NULL,
poll_option_text VARCHAR(255) DEFAULT '' NOT NULL,
poll_option_total INTEGER DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_poll_results_id ON phpbb_poll_results (poll_option_id);
CREATE INDEX phpbb_poll_results_topic_id ON phpbb_poll_results (topic_id);
# Table: 'phpbb_vote_voters'
CREATE TABLE phpbb_poll_voters (
topic_id INTEGER DEFAULT 0 NOT NULL,
poll_option_id SMALLINT DEFAULT 0 NOT NULL,
vote_user_id INTEGER DEFAULT 0 NOT NULL,
vote_user_ip VARCHAR(40) DEFAULT '' NOT NULL
);
CREATE INDEX phpbb_poll_voters_topic ON phpbb_poll_voters (topic_id);
CREATE INDEX phpbb_poll_voters_vote_user ON phpbb_poll_voters (vote_user_id);
CREATE INDEX phpbb_poll_voters_vote_ip ON phpbb_poll_voters (vote_user_ip);
# Table: 'phpbb_posts'
CREATE TABLE phpbb_posts (
post_id INTEGER NOT NULL,
topic_id INTEGER DEFAULT 0 NOT NULL,
forum_id SMALLINT DEFAULT 0 NOT NULL,
poster_id INTEGER DEFAULT 0 NOT NULL,
icon_id SMALLINT DEFAULT 1 NOT NULL,
poster_ip VARCHAR(40) DEFAULT '' NOT NULL,
post_time INTEGER DEFAULT 0 NOT NULL,
post_approved SMALLINT DEFAULT 1 NOT NULL,
post_reported SMALLINT DEFAULT 0 NOT NULL,
enable_bbcode SMALLINT DEFAULT 1 NOT NULL,
enable_html SMALLINT DEFAULT 0 NOT NULL,
enable_smilies SMALLINT DEFAULT 1 NOT NULL,
enable_magic_url SMALLINT DEFAULT 1 NOT NULL,
enable_sig SMALLINT DEFAULT 1 NOT NULL,
post_username VARCHAR(30) DEFAULT '',
post_subject VARCHAR(60) DEFAULT '',
post_text BLOB SUB_TYPE 1 DEFAULT '' NOT NULL,
post_checksum VARCHAR(32) DEFAULT '' NOT NULL,
post_encoding VARCHAR(11) DEFAULT 'iso-8859-15' NOT NULL,
post_attachment SMALLINT DEFAULT 0 NOT NULL,
bbcode_bitfield INTEGER DEFAULT 0 NOT NULL,
bbcode_uid VARCHAR(10) DEFAULT '' NOT NULL,
post_edit_time INTEGER DEFAULT 0 NOT NULL,
post_edit_count SMALLINT DEFAULT 0 NOT NULL,
post_edit_locked SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY (post_id)
);
CREATE GENERATOR phpbb_posts_gen;
SET GENERATOR phpbb_posts_gen TO 0;
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
CREATE INDEX phpbb_posts_post_apv ON phpbb_posts (post_approved);
CREATE TRIGGER phpbb_posts_trig
FOR phpbb_posts BEFORE INSERT
AS BEGIN
IF (NEW.post_id IS NULL) THEN
NEW.post_id = GEN_ID(phpbb_posts_gen, 1)|
END;
# Table: 'phpbb_privmsgs'
CREATE TABLE phpbb_privmsgs (
privmsgs_id INTEGER NOT NULL,
privmsgs_attachment SMALLINT DEFAULT 0 NOT NULL,
privmsgs_type SMALLINT DEFAULT 0 NOT NULL,
privmsgs_subject VARCHAR(60) DEFAULT 0 NOT NULL,
privmsgs_from_userid INTEGER DEFAULT 0 NOT NULL,
privmsgs_to_userid INTEGER DEFAULT 0 NOT NULL,
privmsgs_date INTEGER DEFAULT 0 NOT NULL,
privmsgs_ip VARCHAR(40) NOT NULL,
privmsgs_enable_bbcode SMALLINT DEFAULT 1 NOT NULL,
privmsgs_enable_html SMALLINT DEFAULT 0 NOT NULL,
privmsgs_enable_smilies SMALLINT DEFAULT 1 NOT NULL,
privmsgs_attach_sig SMALLINT DEFAULT 1 NOT NULL,
privmsgs_text BLOB SUB_TYPE 1,
privmsgs_bbcode_uid VARCHAR(10) DEFAULT 0 NOT NULL,
PRIMARY KEY (privmsgs_id)
);
CREATE GENERATOR phpbb_privmsgs_gen;
SET GENERATOR phpbb_privmsgs_gen TO 0;
CREATE INDEX phpbb_privmsgs_from_userid ON phpbb_privmsgs (privmsgs_from_userid);
CREATE INDEX phpbb_privmsgs_to_userid ON phpbb_privmsgs (privmsgs_to_userid);
CREATE TRIGGER phpbb_privmsgs_trig
FOR phpbb_privmsgs BEFORE INSERT
AS BEGIN
IF (NEW.privmsgs_id IS NULL) THEN
NEW.privmsgs_id = GEN_ID(phpbb_privmsgs_gen, 1)|
END;
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
rank_id SMALLINT NOT NULL,
rank_title VARCHAR(50) NOT NULL,
rank_min INTEGER DEFAULT 0 NOT NULL,
rank_special SMALLINT DEFAULT 0,
rank_image VARCHAR(100),
PRIMARY KEY (rank_id)
);
CREATE GENERATOR phpbb_ranks_gen;
SET GENERATOR phpbb_ranks_gen TO 0;
CREATE TRIGGER phpbb_ranks_trig
FOR phpbb_ranks BEFORE INSERT
AS BEGIN
IF (NEW.rank_id IS NULL) THEN
NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1)|
END;
# Table: 'phpbb_ratings'
CREATE TABLE phpbb_ratings (
post_id INTEGER DEFAULT 0 NOT NULL,
user_id SMALLINT DEFAULT 0 NOT NULL,
rating SMALLINT DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_ratings_post_id ON phpbb_ratings (post_id);
CREATE INDEX phpbb_ratings_user_id ON phpbb_ratings (user_id);
# Table: 'phpbb_reports_reasons'
CREATE TABLE phpbb_reports_reasons (
reason_id INTEGER NOT NULL,
reason_priority SMALLINT DEFAULT 0 NOT NULL,
reason_name VARCHAR(255) DEFAULT '' NOT NULL,
reason_description BLOB SUB_TYPE 1 NOT NULL,
PRIMARY KEY (reason_id)
);
CREATE GENERATOR phpbb_reports_reasons_gen;
SET GENERATOR phpbb_reports_reasons_gen TO 0;
CREATE TRIGGER phpbb_reports_reasons_trig
FOR phpbb_reports_reasons BEFORE INSERT
AS BEGIN
IF (NEW.reason_id IS NULL) THEN
NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1)|
END;
# Table: 'phpbb_reports'
CREATE TABLE phpbb_reports (
report_id SMALLINT NOT NULL,
reason_id SMALLINT DEFAULT 0 NOT NULL,
post_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
user_notify SMALLINT DEFAULT 0 NOT NULL,
report_time INTEGER DEFAULT 0 NOT NULL,
report_text BLOB SUB_TYPE 1 NOT NULL,
PRIMARY KEY (report_id)
);
CREATE GENERATOR phpbb_reports_gen;
SET GENERATOR phpbb_reports_gen TO 0;
CREATE TRIGGER phpbb_reports_trig
FOR phpbb_reports BEFORE INSERT
AS BEGIN
IF (NEW.report_id IS NULL) THEN
NEW.report_id = GEN_ID(phpbb_reports_gen, 1)|
END;
# Table: phpbb_search_results
CREATE TABLE phpbb_search_results (
search_id INTEGER DEFAULT 0 NOT NULL,
session_id VARCHAR(32) DEFAULT '' NOT NULL,
search_array BLOB SUB_TYPE 1 NOT NULL,
PRIMARY KEY (search_id)
);
CREATE INDEX phpbb_search_results_session_id ON phpbb_search_results (session_id);
# Table: phpbb_search_wordlist
CREATE TABLE phpbb_search_wordlist (
word_id INTEGER NOT NULL,
word_text VARCHAR(50) DEFAULT '' NOT NULL,
word_common SMALLINT DEFAULT 0 NOT NULL,
PRIMARY KEY (word_id)
);
CREATE INDEX phpbb_search_wordlist_text ON phpbb_search_wordlist (word_text);
CREATE INDEX phpbb_search_wordlist_common ON phpbb_search_wordlist (word_common);
# Table: phpbb_search_wordmatch
CREATE TABLE phpbb_search_wordmatch (
post_id INTEGER DEFAULT 0 NOT NULL,
word_id INTEGER DEFAULT 0 NOT NULL,
title_match SMALLINT DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_search_wordmatch_post ON phpbb_search_wordmatch (post_id);
CREATE INDEX phpbb_search_wordmatch_word ON phpbb_search_wordmatch (word_id);
# Table: 'phpbb_sessions'
CREATE TABLE phpbb_sessions (
session_id VARCHAR(32) DEFAULT '' NOT NULL,
session_user_id INTEGER DEFAULT 0 NOT NULL,
session_last_visit INTEGER DEFAULT 0 NOT NULL,
session_start INTEGER DEFAULT 0 NOT NULL,
session_time INTEGER DEFAULT 0 NOT NULL,
session_ip VARCHAR(40) DEFAULT 0 NOT NULL,
session_browser VARCHAR(100) DEFAULT '' NOT NULL,
session_page VARCHAR(100) DEFAULT 0 NOT NULL,
session_allow_viewonline SMALLINT DEFAULT 1 NOT NULL,
PRIMARY KEY (session_id)
);
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
smile_id SMALLINT NOT NULL,
code CHAR(10) DEFAULT '' NOT NULL,
emoticon CHAR(50) DEFAULT '' NOT NULL,
smile_url CHAR(50) DEFAULT '' NOT NULL,
smile_width SMALLINT DEFAULT 0 NOT NULL,
smile_height SMALLINT DEFAULT 0 NOT NULL,
smile_order SMALLINT DEFAULT 1 NOT NULL,
display_on_posting SMALLINT DEFAULT 1 NOT NULL,
PRIMARY KEY (smile_id)
);
CREATE GENERATOR phpbb_smilies_gen;
SET GENERATOR phpbb_smilies_gen TO 0;
CREATE TRIGGER phpbb_smilies_trig
FOR phpbb_smilies BEFORE INSERT
AS BEGIN
IF (NEW.smile_id IS NULL) THEN
NEW.smile_id = GEN_ID(phpbb_smilies_gen, 1)|
END;
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
style_id SMALLINT NOT NULL,
template_id CHAR(50) DEFAULT '' NOT NULL,
theme_id SMALLINT DEFAULT 0 NOT NULL,
imageset_id SMALLINT DEFAULT 0 NOT NULL,
style_name CHAR(30) DEFAULT '' NOT NULL,
PRIMARY KEY (style_id)
);
CREATE GENERATOR phpbb_styles_gen;
SET GENERATOR phpbb_styles_gen TO 0;
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id);
CREATE TRIGGER phpbb_styles_trig
FOR phpbb_styles BEFORE INSERT
AS BEGIN
IF (NEW.style_id IS NULL) THEN
NEW.style_id = GEN_ID(phpbb_styles_gen, 1)|
END;
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
template_id SMALLINT NOT NULL,
template_name CHAR(30) DEFAULT '' NOT NULL,
template_path CHAR(50) DEFAULT '' NOT NULL,
poll_length SMALLINT DEFAULT 0 NOT NULL,
pm_box_length SMALLINT DEFAULT 0 NOT NULL,
bbcode_bitfield INT DEFAULT 0 NOT NULL,
PRIMARY KEY (template_id)
);
CREATE GENERATOR phpbb_styles_template_gen;
SET GENERATOR phpbb_styles_template_gen TO 0;
CREATE TRIGGER phpbb_styles_template_trig
FOR phpbb_styles_template BEFORE INSERT
AS BEGIN
IF (NEW.template_id IS NULL) THEN
NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1)|
END;
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
theme_id SMALLINT NOT NULL,
theme_name CHAR(60) DEFAULT '' NOT NULL,
css_external CHAR(100) DEFAULT '' NOT NULL,
css_data BLOB SUB_TYPE 1,
PRIMARY KEY (theme_id)
);
CREATE GENERATOR phpbb_styles_theme_gen;
SET GENERATOR phpbb_styles_theme_gen TO 0;
CREATE TRIGGER phpbb_styles_theme_trig
FOR phpbb_styles_theme BEFORE INSERT
AS BEGIN
IF (NEW.theme_id IS NULL) THEN
NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1)|
END;
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
imageset_id SMALLINT NOT NULL,
imageset_name CHAR(100),
imageset_path CHAR(30),
btn_post CHAR(200) DEFAULT '' NOT NULL,
btn_post_pm CHAR(200) DEFAULT '' NOT NULL,
btn_reply CHAR(200) DEFAULT '' NOT NULL,
btn_reply_pm CHAR(200) DEFAULT '' NOT NULL,
btn_locked CHAR(200) DEFAULT '' NOT NULL,
btn_profile CHAR(200) DEFAULT '' NOT NULL,
btn_pm CHAR(200) DEFAULT '' NOT NULL,
btn_delete CHAR(200) DEFAULT '' NOT NULL,
btn_ip CHAR(200) DEFAULT '' NOT NULL,
btn_quote CHAR(200) DEFAULT '' NOT NULL,
btn_search CHAR(200) DEFAULT '' NOT NULL,
btn_edit CHAR(200) DEFAULT '' NOT NULL,
btn_report CHAR(200) DEFAULT '' NOT NULL,
btn_email CHAR(200) DEFAULT '' NOT NULL,
btn_www CHAR(200) DEFAULT '' NOT NULL,
btn_icq CHAR(200) DEFAULT '' NOT NULL,
btn_aim CHAR(200) DEFAULT '' NOT NULL,
btn_yim CHAR(200) DEFAULT '' NOT NULL,
btn_msnm CHAR(200) DEFAULT '' NOT NULL,
btn_jabber CHAR(200) DEFAULT '' NOT NULL,
btn_online CHAR(200) DEFAULT '' NOT NULL,
btn_offline CHAR(200) DEFAULT '' NOT NULL,
btn_topic_watch CHAR(200) DEFAULT '' NOT NULL,
btn_topic_unwatch CHAR(200) DEFAULT '' NOT NULL,
icon_unapproved CHAR(200) DEFAULT '' NOT NULL,
icon_reported CHAR(200) DEFAULT '' NOT NULL,
icon_attach CHAR(200) DEFAULT '' NOT NULL,
icon_post CHAR(200) DEFAULT '' NOT NULL,
icon_post_new CHAR(200) DEFAULT '' NOT NULL,
icon_post_latest CHAR(200) DEFAULT '' NOT NULL,
icon_post_newest CHAR(200) DEFAULT '' NOT NULL,
forum CHAR(200) DEFAULT '' NOT NULL,
forum_new CHAR(200) DEFAULT '' NOT NULL,
forum_locked CHAR(200) DEFAULT '' NOT NULL,
sub_forum CHAR(200) DEFAULT '' NOT NULL,
sub_forum_new CHAR(200) DEFAULT '' NOT NULL,
folder CHAR(200) DEFAULT '' NOT NULL,
folder_posted CHAR(200) DEFAULT '' NOT NULL,
folder_new CHAR(200) DEFAULT '' NOT NULL,
folder_new_posted CHAR(200) DEFAULT '' NOT NULL,
folder_hot CHAR(200) DEFAULT '' NOT NULL,
folder_hot_posted CHAR(200) DEFAULT '' NOT NULL,
folder_hot_new CHAR(200) DEFAULT '' NOT NULL,
folder_hot_new_posted CHAR(200) DEFAULT '' NOT NULL,
folder_locked CHAR(200) DEFAULT '' NOT NULL,
folder_locked_posted CHAR(200) DEFAULT '' NOT NULL,
folder_locked_new CHAR(200) DEFAULT '' NOT NULL,
folder_locked_new_posted CHAR(200) DEFAULT '' NOT NULL,
folder_sticky CHAR(200) DEFAULT '' NOT NULL,
folder_sticky_posted CHAR(200) DEFAULT '' NOT NULL,
folder_sticky_new CHAR(200) DEFAULT '' NOT NULL,
folder_sticky_new_posted CHAR(200) DEFAULT '' NOT NULL,
folder_announce CHAR(200) DEFAULT '' NOT NULL,
folder_announce_posted CHAR(200) DEFAULT '' NOT NULL,
folder_announce_new CHAR(200) DEFAULT '' NOT NULL,
folder_announce_new_posted CHAR(200) DEFAULT '' NOT NULL,
poll_left CHAR(200) DEFAULT '' NOT NULL,
poll_center CHAR(200) DEFAULT '' NOT NULL,
poll_right CHAR(200) DEFAULT '' NOT NULL,
PRIMARY KEY (imageset_id)
);
CREATE GENERATOR phpbb_styles_imageset_gen;
SET GENERATOR phpbb_styles_imageset_gen TO 0;
CREATE TRIGGER phpbb_styles_imageset_trig
FOR phpbb_styles_imageset BEFORE INSERT
AS BEGIN
IF (NEW.imageset_id IS NULL) THEN
NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1)|
END;
# Table: 'phpbb_topics'
CREATE TABLE phpbb_topics (
topic_id INTEGER NOT NULL,
forum_id INTEGER DEFAULT 0 NOT NULL,
icon_id SMALLINT DEFAULT 1 NOT NULL,
topic_attachment SMALLINT DEFAULT 0 NOT NULL,
topic_approved SMALLINT DEFAULT 1 NOT NULL,
topic_reported SMALLINT DEFAULT 0 NOT NULL,
topic_title VARCHAR(60) NOT NULL,
topic_poster INTEGER DEFAULT 0 NOT NULL,
topic_time INTEGER DEFAULT 0 NOT NULL,
topic_views INTEGER DEFAULT 0 NOT NULL,
topic_replies INTEGER DEFAULT 0 NOT NULL,
topic_replies_real INTEGER DEFAULT 0 NOT NULL,
topic_status SMALLINT DEFAULT 0 NOT NULL,
topic_type SMALLINT DEFAULT 0 NOT NULL,
topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
topic_first_poster_name VARCHAR(30),
topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
topic_last_poster_name VARCHAR(30),
topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
topic_moved_id INTEGER DEFAULT 0 NOT NULL,
poll_title VARCHAR(255) DEFAULT '' NOT NULL,
poll_start INTEGER DEFAULT 0 NOT NULL,
poll_length INTEGER DEFAULT 0 NOT NULL,
poll_max_options SMALLINT DEFAULT 1 NOT NULL,
poll_last_vote INTEGER,
PRIMARY KEY (topic_id)
);
CREATE GENERATOR phpbb_topics_gen;
SET GENERATOR phpbb_topics_gen TO 0;
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
CREATE INDEX phpbb_topics_moved_id ON phpbb_topics (topic_moved_id);
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
CREATE INDEX phpbb_topics_last_poll_vote ON phpbb_topics (poll_last_vote);
CREATE INDEX phpbb_topics_type ON phpbb_topics (topic_type);
CREATE TRIGGER phpbb_topics_trig
FOR phpbb_topics BEFORE INSERT
AS BEGIN
IF (NEW.topic_id IS NULL) THEN
NEW.topic_id = GEN_ID(phpbb_topics_gen, 1)|
END;
# Table: 'phpbb_topic_marking'
CREATE TABLE phpbb_topics_marking (
user_id INTEGER DEFAULT 0 NOT NULL,
topic_id INTEGER DEFAULT 0 NOT NULL,
mark_type SMALLINT DEFAULT 0 NOT NULL,
mark_time INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY (user_id, topic_id)
);
# Table: 'phpbb_topics_watch'
CREATE TABLE phpbb_topics_watch (
topic_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
notify_status SMALLINT DEFAULT 0 NOT NULL
);
CREATE INDEX phpbb_topics_watch_topic ON phpbb_topics_watch (topic_id);
CREATE INDEX phpbb_topics_watch_user ON phpbb_topics_watch (user_id);
CREATE INDEX phpbb_topics_watch_status ON phpbb_topics_watch (notify_status);
# Table: 'phpbb_ucp_modules'
CREATE TABLE phpbb_ucp_modules (
module_id INTEGER DEFAULT 0 NOT NULL,
module_title VARCHAR(50) DEFAULT '' NOT NULL,
module_filename VARCHAR(50) DEFAULT '' NOT NULL,
module_order INTEGER DEFAULT 0 NOT NULL,
PRIMARY KEY (module_id)
);
CREATE GENERATOR phpbb_ucp_modules_gen;
SET GENERATOR phpbb_ucp_modules_gen TO 0;
CREATE INDEX phpbb_ucp_modules_order ON phpbb_ucp_modules (module_order);
CREATE TRIGGER phpbb_ucp_modules_trig
FOR phpbb_ucp_modules BEFORE INSERT
AS BEGIN
IF (NEW.module_id IS NULL) THEN
NEW.module_id = GEN_ID(phpbb_ucp_modules_gen, 1)|
END;
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (
group_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
user_pending SMALLINT
);
CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
# Table: 'phpbb_users'
CREATE TABLE phpbb_users (
user_id INTEGER NOT NULL,
user_active SMALLINT DEFAULT 1,
user_founder SMALLINT DEFAULT 0 NOT NULL,
group_id INTEGER DEFAULT 0 NOT NULL,
user_permissions BLOB SUB_TYPE 1 DEFAULT '',
user_ip VARCHAR(40),
user_regdate INTEGER DEFAULT 0 NOT NULL,
username VARCHAR(30) NOT NULL,
user_password VARCHAR(32) NOT NULL,
user_email VARCHAR(60),
user_birthday VARCHAR(10) DEFAULT '' NOT NULL,
user_lastvisit INTEGER DEFAULT 0 NOT NULL,
user_lastpage VARCHAR(100) DEFAULT '' NOT NULL,
user_karma SMALLINT DEFAULT 3 NOT NULL,
user_min_karma SMALLINT DEFAULT -5 NOT NULL,
user_startpage VARCHAR(100) DEFAULT '',
user_colour VARCHAR(6) DEFAULT '' NOT NULL,
user_posts INTEGER DEFAULT 0 NOT NULL,
user_lang VARCHAR(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT 0 NOT NULL,
user_dst SMALLINT DEFAULT 0 NOT NULL,
user_dateformat VARCHAR(15) DEFAULT 'd M Y H:i' NOT NULL,
user_style SMALLINT DEFAULT 1 NOT NULL,
user_rank INTEGER DEFAULT 0 NOT NULL,
user_new_privmsg SMALLINT DEFAULT 0 NOT NULL,
user_unread_privmsg SMALLINT DEFAULT 0 NOT NULL,
user_last_privmsg INTEGER DEFAULT 0 NOT NULL,
user_emailtime INTEGER,
user_sortby_type VARCHAR(1) DEFAULT '' NOT NULL,
user_sortby_dir VARCHAR(1) DEFAULT '' NOT NULL,
user_show_days SMALLINT DEFAULT 0 NOT NULL,
user_viewimg SMALLINT DEFAULT 1 NOT NULL,
user_notify SMALLINT DEFAULT 0 NOT NULL,
user_notify_pm SMALLINT DEFAULT 1 NOT NULL,
user_popup_pm SMALLINT DEFAULT 0 NOT NULL,
user_viewflash SMALLINT DEFAULT 1 NOT NULL,
user_viewsmilies SMALLINT DEFAULT 1 NOT NULL,
user_viewsigs SMALLINT DEFAULT 1 NOT NULL,
user_viewavatars SMALLINT DEFAULT 1 NOT NULL,
user_viewcensors SMALLINT DEFAULT 1 NOT NULL,
user_attachsig SMALLINT DEFAULT 1 NOT NULL,
user_allowhtml SMALLINT DEFAULT 1 NOT NULL,
user_allowbbcode SMALLINT DEFAULT 1 NOT NULL,
user_allowsmile SMALLINT DEFAULT 1 NOT NULL,
user_allowavatar SMALLINT DEFAULT 1 NOT NULL,
user_allow_pm SMALLINT DEFAULT 1 NOT NULL,
user_allow_email SMALLINT DEFAULT 1 NOT NULL,
user_allow_viewonline SMALLINT DEFAULT 1 NOT NULL,
user_allow_viewemail SMALLINT DEFAULT 1 NOT NULL,
user_allow_massemail SMALLINT DEFAULT 1 NOT NULL,
user_avatar VARCHAR(100) DEFAULT '' NOT NULL,
user_avatar_type SMALLINT DEFAULT 0 NOT NULL,
user_avatar_width SMALLINT DEFAULT 0 NOT NULL,
user_avatar_height SMALLINT DEFAULT 0 NOT NULL,
user_sig BLOB SUB_TYPE 1,
user_sig_bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL,
user_sig_bbcode_bitfield INTEGER DEFAULT 0 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(100) DEFAULT '' NOT NULL,
user_actkey VARCHAR(32) DEFAULT '' NOT NULL,
user_newpasswd VARCHAR(32) DEFAULT '' NOT NULL,
user_occ VARCHAR(255) DEFAULT '' NOT NULL,
user_interests VARCHAR(255) DEFAULT '' NOT NULL,
PRIMARY KEY (user_id)
);
CREATE GENERATOR phpbb_users_gen;
SET GENERATOR phpbb_users_gen TO 0;
CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
CREATE TRIGGER phpbb_users_trig
FOR phpbb_users BEFORE INSERT
AS BEGIN
IF (NEW.user_id IS NULL) THEN
NEW.user_id = GEN_ID(phpbb_users_gen, 1)|
END;
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
word_id INTEGER NOT NULL,
word CHAR(100) DEFAULT '' NOT NULL,
replacement CHAR(100) DEFAULT '' NOT NULL,
PRIMARY KEY (word_id)
);
CREATE GENERATOR phpbb_words_gen;
SET GENERATOR phpbb_words_gen TO 0;
CREATE TRIGGER phpbb_words_trig
FOR phpbb_words BEFORE INSERT
AS BEGIN
IF (NEW.word_id IS NULL) THEN
NEW.word_id = GEN_ID(phpbb_words_gen, 1)|
END;
|