2
# $Id: firebird_schema.sql,v 1.114 2007/12/05 15:18:21 acydburn Exp $
6
# Table: 'phpbb_attachments'
7
CREATE TABLE phpbb_attachments (
8
attach_id INTEGER NOT NULL,
9
post_msg_id INTEGER DEFAULT 0 NOT NULL,
10
topic_id INTEGER DEFAULT 0 NOT NULL,
11
in_message INTEGER DEFAULT 0 NOT NULL,
12
poster_id INTEGER DEFAULT 0 NOT NULL,
13
is_orphan INTEGER DEFAULT 1 NOT NULL,
14
physical_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
15
real_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
16
download_count INTEGER DEFAULT 0 NOT NULL,
17
attach_comment BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
18
extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
19
mimetype VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
20
filesize INTEGER DEFAULT 0 NOT NULL,
21
filetime INTEGER DEFAULT 0 NOT NULL,
22
thumbnail INTEGER DEFAULT 0 NOT NULL
25
ALTER TABLE phpbb_attachments ADD PRIMARY KEY (attach_id);;
27
CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments(filetime);;
28
CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments(post_msg_id);;
29
CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments(topic_id);;
30
CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments(poster_id);;
31
CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments(is_orphan);;
33
CREATE GENERATOR phpbb_attachments_gen;;
34
SET GENERATOR phpbb_attachments_gen TO 0;;
36
CREATE TRIGGER t_phpbb_attachments FOR phpbb_attachments
40
NEW.attach_id = GEN_ID(phpbb_attachments_gen, 1);
44
# Table: 'phpbb_acl_groups'
45
CREATE TABLE phpbb_acl_groups (
46
group_id INTEGER DEFAULT 0 NOT NULL,
47
forum_id INTEGER DEFAULT 0 NOT NULL,
48
auth_option_id INTEGER DEFAULT 0 NOT NULL,
49
auth_role_id INTEGER DEFAULT 0 NOT NULL,
50
auth_setting INTEGER DEFAULT 0 NOT NULL
53
CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);;
54
CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);;
55
CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);;
57
# Table: 'phpbb_acl_options'
58
CREATE TABLE phpbb_acl_options (
59
auth_option_id INTEGER NOT NULL,
60
auth_option VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
61
is_global INTEGER DEFAULT 0 NOT NULL,
62
is_local INTEGER DEFAULT 0 NOT NULL,
63
founder_only INTEGER DEFAULT 0 NOT NULL
66
ALTER TABLE phpbb_acl_options ADD PRIMARY KEY (auth_option_id);;
68
CREATE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options(auth_option);;
70
CREATE GENERATOR phpbb_acl_options_gen;;
71
SET GENERATOR phpbb_acl_options_gen TO 0;;
73
CREATE TRIGGER t_phpbb_acl_options FOR phpbb_acl_options
77
NEW.auth_option_id = GEN_ID(phpbb_acl_options_gen, 1);
81
# Table: 'phpbb_acl_roles'
82
CREATE TABLE phpbb_acl_roles (
83
role_id INTEGER NOT NULL,
84
role_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
85
role_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
86
role_type VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
87
role_order INTEGER DEFAULT 0 NOT NULL
90
ALTER TABLE phpbb_acl_roles ADD PRIMARY KEY (role_id);;
92
CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles(role_type);;
93
CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles(role_order);;
95
CREATE GENERATOR phpbb_acl_roles_gen;;
96
SET GENERATOR phpbb_acl_roles_gen TO 0;;
98
CREATE TRIGGER t_phpbb_acl_roles FOR phpbb_acl_roles
102
NEW.role_id = GEN_ID(phpbb_acl_roles_gen, 1);
106
# Table: 'phpbb_acl_roles_data'
107
CREATE TABLE phpbb_acl_roles_data (
108
role_id INTEGER DEFAULT 0 NOT NULL,
109
auth_option_id INTEGER DEFAULT 0 NOT NULL,
110
auth_setting INTEGER DEFAULT 0 NOT NULL
113
ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);;
115
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);;
117
# Table: 'phpbb_acl_users'
118
CREATE TABLE phpbb_acl_users (
119
user_id INTEGER DEFAULT 0 NOT NULL,
120
forum_id INTEGER DEFAULT 0 NOT NULL,
121
auth_option_id INTEGER DEFAULT 0 NOT NULL,
122
auth_role_id INTEGER DEFAULT 0 NOT NULL,
123
auth_setting INTEGER DEFAULT 0 NOT NULL
126
CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
127
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
128
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
130
# Table: 'phpbb_banlist'
131
CREATE TABLE phpbb_banlist (
132
ban_id INTEGER NOT NULL,
133
ban_userid INTEGER DEFAULT 0 NOT NULL,
134
ban_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
135
ban_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
136
ban_start INTEGER DEFAULT 0 NOT NULL,
137
ban_end INTEGER DEFAULT 0 NOT NULL,
138
ban_exclude INTEGER DEFAULT 0 NOT NULL,
139
ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
140
ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
143
ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);;
145
CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist(ban_end);;
146
CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist(ban_userid, ban_exclude);;
147
CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist(ban_email, ban_exclude);;
148
CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist(ban_ip, ban_exclude);;
150
CREATE GENERATOR phpbb_banlist_gen;;
151
SET GENERATOR phpbb_banlist_gen TO 0;;
153
CREATE TRIGGER t_phpbb_banlist FOR phpbb_banlist
157
NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1);
161
# Table: 'phpbb_bbcodes'
162
CREATE TABLE phpbb_bbcodes (
163
bbcode_id INTEGER DEFAULT 0 NOT NULL,
164
bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL,
165
bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
166
display_on_posting INTEGER DEFAULT 0 NOT NULL,
167
bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
168
bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
169
first_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
170
first_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
171
second_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
172
second_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
175
ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);;
177
CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);;
179
# Table: 'phpbb_bookmarks'
180
CREATE TABLE phpbb_bookmarks (
181
topic_id INTEGER DEFAULT 0 NOT NULL,
182
user_id INTEGER DEFAULT 0 NOT NULL
185
ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);;
188
# Table: 'phpbb_bots'
189
CREATE TABLE phpbb_bots (
190
bot_id INTEGER NOT NULL,
191
bot_active INTEGER DEFAULT 1 NOT NULL,
192
bot_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
193
user_id INTEGER DEFAULT 0 NOT NULL,
194
bot_agent VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
195
bot_ip VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
198
ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);;
200
CREATE INDEX phpbb_bots_bot_active ON phpbb_bots(bot_active);;
202
CREATE GENERATOR phpbb_bots_gen;;
203
SET GENERATOR phpbb_bots_gen TO 0;;
205
CREATE TRIGGER t_phpbb_bots FOR phpbb_bots
209
NEW.bot_id = GEN_ID(phpbb_bots_gen, 1);
213
# Table: 'phpbb_config'
214
CREATE TABLE phpbb_config (
215
config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
216
config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
217
is_dynamic INTEGER DEFAULT 0 NOT NULL
220
ALTER TABLE phpbb_config ADD PRIMARY KEY (config_name);;
222
CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);;
224
# Table: 'phpbb_confirm'
225
CREATE TABLE phpbb_confirm (
226
confirm_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
227
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
228
confirm_type INTEGER DEFAULT 0 NOT NULL,
229
code VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
230
seed INTEGER DEFAULT 0 NOT NULL
233
ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);;
235
CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);;
237
# Table: 'phpbb_disallow'
238
CREATE TABLE phpbb_disallow (
239
disallow_id INTEGER NOT NULL,
240
disallow_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
243
ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);;
246
CREATE GENERATOR phpbb_disallow_gen;;
247
SET GENERATOR phpbb_disallow_gen TO 0;;
249
CREATE TRIGGER t_phpbb_disallow FOR phpbb_disallow
253
NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1);
257
# Table: 'phpbb_drafts'
258
CREATE TABLE phpbb_drafts (
259
draft_id INTEGER NOT NULL,
260
user_id INTEGER DEFAULT 0 NOT NULL,
261
topic_id INTEGER DEFAULT 0 NOT NULL,
262
forum_id INTEGER DEFAULT 0 NOT NULL,
263
save_time INTEGER DEFAULT 0 NOT NULL,
264
draft_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
265
draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
268
ALTER TABLE phpbb_drafts ADD PRIMARY KEY (draft_id);;
270
CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts(save_time);;
272
CREATE GENERATOR phpbb_drafts_gen;;
273
SET GENERATOR phpbb_drafts_gen TO 0;;
275
CREATE TRIGGER t_phpbb_drafts FOR phpbb_drafts
279
NEW.draft_id = GEN_ID(phpbb_drafts_gen, 1);
283
# Table: 'phpbb_extensions'
284
CREATE TABLE phpbb_extensions (
285
extension_id INTEGER NOT NULL,
286
group_id INTEGER DEFAULT 0 NOT NULL,
287
extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
290
ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);;
293
CREATE GENERATOR phpbb_extensions_gen;;
294
SET GENERATOR phpbb_extensions_gen TO 0;;
296
CREATE TRIGGER t_phpbb_extensions FOR phpbb_extensions
300
NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1);
304
# Table: 'phpbb_extension_groups'
305
CREATE TABLE phpbb_extension_groups (
306
group_id INTEGER NOT NULL,
307
group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
308
cat_id INTEGER DEFAULT 0 NOT NULL,
309
allow_group INTEGER DEFAULT 0 NOT NULL,
310
download_mode INTEGER DEFAULT 1 NOT NULL,
311
upload_icon VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
312
max_filesize INTEGER DEFAULT 0 NOT NULL,
313
allowed_forums BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
314
allow_in_pm INTEGER DEFAULT 0 NOT NULL
317
ALTER TABLE phpbb_extension_groups ADD PRIMARY KEY (group_id);;
320
CREATE GENERATOR phpbb_extension_groups_gen;;
321
SET GENERATOR phpbb_extension_groups_gen TO 0;;
323
CREATE TRIGGER t_phpbb_extension_groups FOR phpbb_extension_groups
327
NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1);
331
# Table: 'phpbb_forums'
332
CREATE TABLE phpbb_forums (
333
forum_id INTEGER NOT NULL,
334
parent_id INTEGER DEFAULT 0 NOT NULL,
335
left_id INTEGER DEFAULT 0 NOT NULL,
336
right_id INTEGER DEFAULT 0 NOT NULL,
337
forum_parents BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
338
forum_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
339
forum_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
340
forum_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
341
forum_desc_options INTEGER DEFAULT 7 NOT NULL,
342
forum_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
343
forum_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
344
forum_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
345
forum_style INTEGER DEFAULT 0 NOT NULL,
346
forum_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
347
forum_rules BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
348
forum_rules_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
349
forum_rules_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
350
forum_rules_options INTEGER DEFAULT 7 NOT NULL,
351
forum_rules_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
352
forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
353
forum_type INTEGER DEFAULT 0 NOT NULL,
354
forum_status INTEGER DEFAULT 0 NOT NULL,
355
forum_posts INTEGER DEFAULT 0 NOT NULL,
356
forum_topics INTEGER DEFAULT 0 NOT NULL,
357
forum_topics_real INTEGER DEFAULT 0 NOT NULL,
358
forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
359
forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
360
forum_last_post_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
361
forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
362
forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
363
forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
364
forum_flags INTEGER DEFAULT 32 NOT NULL,
365
display_on_index INTEGER DEFAULT 1 NOT NULL,
366
enable_indexing INTEGER DEFAULT 1 NOT NULL,
367
enable_icons INTEGER DEFAULT 1 NOT NULL,
368
enable_prune INTEGER DEFAULT 0 NOT NULL,
369
prune_next INTEGER DEFAULT 0 NOT NULL,
370
prune_days INTEGER DEFAULT 0 NOT NULL,
371
prune_viewed INTEGER DEFAULT 0 NOT NULL,
372
prune_freq INTEGER DEFAULT 0 NOT NULL
375
ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);;
377
CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);;
378
CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums(forum_last_post_id);;
380
CREATE GENERATOR phpbb_forums_gen;;
381
SET GENERATOR phpbb_forums_gen TO 0;;
383
CREATE TRIGGER t_phpbb_forums FOR phpbb_forums
387
NEW.forum_id = GEN_ID(phpbb_forums_gen, 1);
391
# Table: 'phpbb_forums_access'
392
CREATE TABLE phpbb_forums_access (
393
forum_id INTEGER DEFAULT 0 NOT NULL,
394
user_id INTEGER DEFAULT 0 NOT NULL,
395
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL
398
ALTER TABLE phpbb_forums_access ADD PRIMARY KEY (forum_id, user_id, session_id);;
401
# Table: 'phpbb_forums_track'
402
CREATE TABLE phpbb_forums_track (
403
user_id INTEGER DEFAULT 0 NOT NULL,
404
forum_id INTEGER DEFAULT 0 NOT NULL,
405
mark_time INTEGER DEFAULT 0 NOT NULL
408
ALTER TABLE phpbb_forums_track ADD PRIMARY KEY (user_id, forum_id);;
411
# Table: 'phpbb_forums_watch'
412
CREATE TABLE phpbb_forums_watch (
413
forum_id INTEGER DEFAULT 0 NOT NULL,
414
user_id INTEGER DEFAULT 0 NOT NULL,
415
notify_status INTEGER DEFAULT 0 NOT NULL
418
CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);;
419
CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);;
420
CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);;
422
# Table: 'phpbb_groups'
423
CREATE TABLE phpbb_groups (
424
group_id INTEGER NOT NULL,
425
group_type INTEGER DEFAULT 1 NOT NULL,
426
group_founder_manage INTEGER DEFAULT 0 NOT NULL,
427
group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
428
group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
429
group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
430
group_desc_options INTEGER DEFAULT 7 NOT NULL,
431
group_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
432
group_display INTEGER DEFAULT 0 NOT NULL,
433
group_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
434
group_avatar_type INTEGER DEFAULT 0 NOT NULL,
435
group_avatar_width INTEGER DEFAULT 0 NOT NULL,
436
group_avatar_height INTEGER DEFAULT 0 NOT NULL,
437
group_rank INTEGER DEFAULT 0 NOT NULL,
438
group_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
439
group_sig_chars INTEGER DEFAULT 0 NOT NULL,
440
group_receive_pm INTEGER DEFAULT 0 NOT NULL,
441
group_message_limit INTEGER DEFAULT 0 NOT NULL,
442
group_legend INTEGER DEFAULT 1 NOT NULL
445
ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);;
447
CREATE INDEX phpbb_groups_group_legend ON phpbb_groups(group_legend);;
449
CREATE GENERATOR phpbb_groups_gen;;
450
SET GENERATOR phpbb_groups_gen TO 0;;
452
CREATE TRIGGER t_phpbb_groups FOR phpbb_groups
456
NEW.group_id = GEN_ID(phpbb_groups_gen, 1);
460
# Table: 'phpbb_icons'
461
CREATE TABLE phpbb_icons (
462
icons_id INTEGER NOT NULL,
463
icons_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
464
icons_width INTEGER DEFAULT 0 NOT NULL,
465
icons_height INTEGER DEFAULT 0 NOT NULL,
466
icons_order INTEGER DEFAULT 0 NOT NULL,
467
display_on_posting INTEGER DEFAULT 1 NOT NULL
470
ALTER TABLE phpbb_icons ADD PRIMARY KEY (icons_id);;
472
CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons(display_on_posting);;
474
CREATE GENERATOR phpbb_icons_gen;;
475
SET GENERATOR phpbb_icons_gen TO 0;;
477
CREATE TRIGGER t_phpbb_icons FOR phpbb_icons
481
NEW.icons_id = GEN_ID(phpbb_icons_gen, 1);
485
# Table: 'phpbb_lang'
486
CREATE TABLE phpbb_lang (
487
lang_id INTEGER NOT NULL,
488
lang_iso VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
489
lang_dir VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
490
lang_english_name VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
491
lang_local_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
492
lang_author VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
495
ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);;
497
CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang(lang_iso);;
499
CREATE GENERATOR phpbb_lang_gen;;
500
SET GENERATOR phpbb_lang_gen TO 0;;
502
CREATE TRIGGER t_phpbb_lang FOR phpbb_lang
506
NEW.lang_id = GEN_ID(phpbb_lang_gen, 1);
511
CREATE TABLE phpbb_log (
512
log_id INTEGER NOT NULL,
513
log_type INTEGER DEFAULT 0 NOT NULL,
514
user_id INTEGER DEFAULT 0 NOT NULL,
515
forum_id INTEGER DEFAULT 0 NOT NULL,
516
topic_id INTEGER DEFAULT 0 NOT NULL,
517
reportee_id INTEGER DEFAULT 0 NOT NULL,
518
log_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
519
log_time INTEGER DEFAULT 0 NOT NULL,
520
log_operation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
521
log_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
524
ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
526
CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
527
CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
528
CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
529
CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
530
CREATE INDEX phpbb_log_user_id ON phpbb_log(user_id);;
532
CREATE GENERATOR phpbb_log_gen;;
533
SET GENERATOR phpbb_log_gen TO 0;;
535
CREATE TRIGGER t_phpbb_log FOR phpbb_log
539
NEW.log_id = GEN_ID(phpbb_log_gen, 1);
543
# Table: 'phpbb_moderator_cache'
544
CREATE TABLE phpbb_moderator_cache (
545
forum_id INTEGER DEFAULT 0 NOT NULL,
546
user_id INTEGER DEFAULT 0 NOT NULL,
547
username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
548
group_id INTEGER DEFAULT 0 NOT NULL,
549
group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
550
display_on_index INTEGER DEFAULT 1 NOT NULL
553
CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);;
554
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);;
556
# Table: 'phpbb_modules'
557
CREATE TABLE phpbb_modules (
558
module_id INTEGER NOT NULL,
559
module_enabled INTEGER DEFAULT 1 NOT NULL,
560
module_display INTEGER DEFAULT 1 NOT NULL,
561
module_basename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
562
module_class VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
563
parent_id INTEGER DEFAULT 0 NOT NULL,
564
left_id INTEGER DEFAULT 0 NOT NULL,
565
right_id INTEGER DEFAULT 0 NOT NULL,
566
module_langname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
567
module_mode VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
568
module_auth VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
571
ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);;
573
CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);;
574
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);;
575
CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);;
577
CREATE GENERATOR phpbb_modules_gen;;
578
SET GENERATOR phpbb_modules_gen TO 0;;
580
CREATE TRIGGER t_phpbb_modules FOR phpbb_modules
584
NEW.module_id = GEN_ID(phpbb_modules_gen, 1);
588
# Table: 'phpbb_poll_options'
589
CREATE TABLE phpbb_poll_options (
590
poll_option_id INTEGER DEFAULT 0 NOT NULL,
591
topic_id INTEGER DEFAULT 0 NOT NULL,
592
poll_option_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
593
poll_option_total INTEGER DEFAULT 0 NOT NULL
596
CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options(poll_option_id);;
597
CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options(topic_id);;
599
# Table: 'phpbb_poll_votes'
600
CREATE TABLE phpbb_poll_votes (
601
topic_id INTEGER DEFAULT 0 NOT NULL,
602
poll_option_id INTEGER DEFAULT 0 NOT NULL,
603
vote_user_id INTEGER DEFAULT 0 NOT NULL,
604
vote_user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL
607
CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes(topic_id);;
608
CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes(vote_user_id);;
609
CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes(vote_user_ip);;
611
# Table: 'phpbb_posts'
612
CREATE TABLE phpbb_posts (
613
post_id INTEGER NOT NULL,
614
topic_id INTEGER DEFAULT 0 NOT NULL,
615
forum_id INTEGER DEFAULT 0 NOT NULL,
616
poster_id INTEGER DEFAULT 0 NOT NULL,
617
icon_id INTEGER DEFAULT 0 NOT NULL,
618
poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
619
post_time INTEGER DEFAULT 0 NOT NULL,
620
post_approved INTEGER DEFAULT 1 NOT NULL,
621
post_reported INTEGER DEFAULT 0 NOT NULL,
622
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
623
enable_smilies INTEGER DEFAULT 1 NOT NULL,
624
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
625
enable_sig INTEGER DEFAULT 1 NOT NULL,
626
post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
627
post_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
628
post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
629
post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
630
post_attachment INTEGER DEFAULT 0 NOT NULL,
631
bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
632
bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
633
post_postcount INTEGER DEFAULT 1 NOT NULL,
634
post_edit_time INTEGER DEFAULT 0 NOT NULL,
635
post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
636
post_edit_user INTEGER DEFAULT 0 NOT NULL,
637
post_edit_count INTEGER DEFAULT 0 NOT NULL,
638
post_edit_locked INTEGER DEFAULT 0 NOT NULL
641
ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
643
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);;
644
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);;
645
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);;
646
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);;
647
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);;
648
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);;
650
CREATE GENERATOR phpbb_posts_gen;;
651
SET GENERATOR phpbb_posts_gen TO 0;;
653
CREATE TRIGGER t_phpbb_posts FOR phpbb_posts
657
NEW.post_id = GEN_ID(phpbb_posts_gen, 1);
661
# Table: 'phpbb_privmsgs'
662
CREATE TABLE phpbb_privmsgs (
663
msg_id INTEGER NOT NULL,
664
root_level INTEGER DEFAULT 0 NOT NULL,
665
author_id INTEGER DEFAULT 0 NOT NULL,
666
icon_id INTEGER DEFAULT 0 NOT NULL,
667
author_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
668
message_time INTEGER DEFAULT 0 NOT NULL,
669
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
670
enable_smilies INTEGER DEFAULT 1 NOT NULL,
671
enable_magic_url INTEGER DEFAULT 1 NOT NULL,
672
enable_sig INTEGER DEFAULT 1 NOT NULL,
673
message_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
674
message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
675
message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
676
message_edit_user INTEGER DEFAULT 0 NOT NULL,
677
message_attachment INTEGER DEFAULT 0 NOT NULL,
678
bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
679
bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
680
message_edit_time INTEGER DEFAULT 0 NOT NULL,
681
message_edit_count INTEGER DEFAULT 0 NOT NULL,
682
to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
683
bcc_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
686
ALTER TABLE phpbb_privmsgs ADD PRIMARY KEY (msg_id);;
688
CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs(author_ip);;
689
CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs(message_time);;
690
CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs(author_id);;
691
CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs(root_level);;
693
CREATE GENERATOR phpbb_privmsgs_gen;;
694
SET GENERATOR phpbb_privmsgs_gen TO 0;;
696
CREATE TRIGGER t_phpbb_privmsgs FOR phpbb_privmsgs
700
NEW.msg_id = GEN_ID(phpbb_privmsgs_gen, 1);
704
# Table: 'phpbb_privmsgs_folder'
705
CREATE TABLE phpbb_privmsgs_folder (
706
folder_id INTEGER NOT NULL,
707
user_id INTEGER DEFAULT 0 NOT NULL,
708
folder_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
709
pm_count INTEGER DEFAULT 0 NOT NULL
712
ALTER TABLE phpbb_privmsgs_folder ADD PRIMARY KEY (folder_id);;
714
CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder(user_id);;
716
CREATE GENERATOR phpbb_privmsgs_folder_gen;;
717
SET GENERATOR phpbb_privmsgs_folder_gen TO 0;;
719
CREATE TRIGGER t_phpbb_privmsgs_folder FOR phpbb_privmsgs_folder
723
NEW.folder_id = GEN_ID(phpbb_privmsgs_folder_gen, 1);
727
# Table: 'phpbb_privmsgs_rules'
728
CREATE TABLE phpbb_privmsgs_rules (
729
rule_id INTEGER NOT NULL,
730
user_id INTEGER DEFAULT 0 NOT NULL,
731
rule_check INTEGER DEFAULT 0 NOT NULL,
732
rule_connection INTEGER DEFAULT 0 NOT NULL,
733
rule_string VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
734
rule_user_id INTEGER DEFAULT 0 NOT NULL,
735
rule_group_id INTEGER DEFAULT 0 NOT NULL,
736
rule_action INTEGER DEFAULT 0 NOT NULL,
737
rule_folder_id INTEGER DEFAULT 0 NOT NULL
740
ALTER TABLE phpbb_privmsgs_rules ADD PRIMARY KEY (rule_id);;
742
CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules(user_id);;
744
CREATE GENERATOR phpbb_privmsgs_rules_gen;;
745
SET GENERATOR phpbb_privmsgs_rules_gen TO 0;;
747
CREATE TRIGGER t_phpbb_privmsgs_rules FOR phpbb_privmsgs_rules
751
NEW.rule_id = GEN_ID(phpbb_privmsgs_rules_gen, 1);
755
# Table: 'phpbb_privmsgs_to'
756
CREATE TABLE phpbb_privmsgs_to (
757
msg_id INTEGER DEFAULT 0 NOT NULL,
758
user_id INTEGER DEFAULT 0 NOT NULL,
759
author_id INTEGER DEFAULT 0 NOT NULL,
760
pm_deleted INTEGER DEFAULT 0 NOT NULL,
761
pm_new INTEGER DEFAULT 1 NOT NULL,
762
pm_unread INTEGER DEFAULT 1 NOT NULL,
763
pm_replied INTEGER DEFAULT 0 NOT NULL,
764
pm_marked INTEGER DEFAULT 0 NOT NULL,
765
pm_forwarded INTEGER DEFAULT 0 NOT NULL,
766
folder_id INTEGER DEFAULT 0 NOT NULL
769
CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to(msg_id);;
770
CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to(author_id);;
771
CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder_id);;
773
# Table: 'phpbb_profile_fields'
774
CREATE TABLE phpbb_profile_fields (
775
field_id INTEGER NOT NULL,
776
field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
777
field_type INTEGER DEFAULT 0 NOT NULL,
778
field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
779
field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
780
field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
781
field_maxlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
782
field_novalue VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
783
field_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
784
field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
785
field_required INTEGER DEFAULT 0 NOT NULL,
786
field_show_on_reg INTEGER DEFAULT 0 NOT NULL,
787
field_hide INTEGER DEFAULT 0 NOT NULL,
788
field_no_view INTEGER DEFAULT 0 NOT NULL,
789
field_active INTEGER DEFAULT 0 NOT NULL,
790
field_order INTEGER DEFAULT 0 NOT NULL
793
ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);;
795
CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields(field_type);;
796
CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields(field_order);;
798
CREATE GENERATOR phpbb_profile_fields_gen;;
799
SET GENERATOR phpbb_profile_fields_gen TO 0;;
801
CREATE TRIGGER t_phpbb_profile_fields FOR phpbb_profile_fields
805
NEW.field_id = GEN_ID(phpbb_profile_fields_gen, 1);
809
# Table: 'phpbb_profile_fields_data'
810
CREATE TABLE phpbb_profile_fields_data (
811
user_id INTEGER DEFAULT 0 NOT NULL
814
ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);;
817
# Table: 'phpbb_profile_fields_lang'
818
CREATE TABLE phpbb_profile_fields_lang (
819
field_id INTEGER DEFAULT 0 NOT NULL,
820
lang_id INTEGER DEFAULT 0 NOT NULL,
821
option_id INTEGER DEFAULT 0 NOT NULL,
822
field_type INTEGER DEFAULT 0 NOT NULL,
823
lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
826
ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);;
829
# Table: 'phpbb_profile_lang'
830
CREATE TABLE phpbb_profile_lang (
831
field_id INTEGER DEFAULT 0 NOT NULL,
832
lang_id INTEGER DEFAULT 0 NOT NULL,
833
lang_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
834
lang_explain BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
835
lang_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
838
ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
841
# Table: 'phpbb_ranks'
842
CREATE TABLE phpbb_ranks (
843
rank_id INTEGER NOT NULL,
844
rank_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
845
rank_min INTEGER DEFAULT 0 NOT NULL,
846
rank_special INTEGER DEFAULT 0 NOT NULL,
847
rank_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
850
ALTER TABLE phpbb_ranks ADD PRIMARY KEY (rank_id);;
853
CREATE GENERATOR phpbb_ranks_gen;;
854
SET GENERATOR phpbb_ranks_gen TO 0;;
856
CREATE TRIGGER t_phpbb_ranks FOR phpbb_ranks
860
NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1);
864
# Table: 'phpbb_reports'
865
CREATE TABLE phpbb_reports (
866
report_id INTEGER NOT NULL,
867
reason_id INTEGER DEFAULT 0 NOT NULL,
868
post_id INTEGER DEFAULT 0 NOT NULL,
869
user_id INTEGER DEFAULT 0 NOT NULL,
870
user_notify INTEGER DEFAULT 0 NOT NULL,
871
report_closed INTEGER DEFAULT 0 NOT NULL,
872
report_time INTEGER DEFAULT 0 NOT NULL,
873
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
876
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
879
CREATE GENERATOR phpbb_reports_gen;;
880
SET GENERATOR phpbb_reports_gen TO 0;;
882
CREATE TRIGGER t_phpbb_reports FOR phpbb_reports
886
NEW.report_id = GEN_ID(phpbb_reports_gen, 1);
890
# Table: 'phpbb_reports_reasons'
891
CREATE TABLE phpbb_reports_reasons (
892
reason_id INTEGER NOT NULL,
893
reason_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
894
reason_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
895
reason_order INTEGER DEFAULT 0 NOT NULL
898
ALTER TABLE phpbb_reports_reasons ADD PRIMARY KEY (reason_id);;
901
CREATE GENERATOR phpbb_reports_reasons_gen;;
902
SET GENERATOR phpbb_reports_reasons_gen TO 0;;
904
CREATE TRIGGER t_phpbb_reports_reasons FOR phpbb_reports_reasons
908
NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1);
912
# Table: 'phpbb_search_results'
913
CREATE TABLE phpbb_search_results (
914
search_key VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
915
search_time INTEGER DEFAULT 0 NOT NULL,
916
search_keywords BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
917
search_authors BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
920
ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);;
923
# Table: 'phpbb_search_wordlist'
924
CREATE TABLE phpbb_search_wordlist (
925
word_id INTEGER NOT NULL,
926
word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
927
word_common INTEGER DEFAULT 0 NOT NULL,
928
word_count INTEGER DEFAULT 0 NOT NULL
931
ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);;
933
CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);;
934
CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);;
936
CREATE GENERATOR phpbb_search_wordlist_gen;;
937
SET GENERATOR phpbb_search_wordlist_gen TO 0;;
939
CREATE TRIGGER t_phpbb_search_wordlist FOR phpbb_search_wordlist
943
NEW.word_id = GEN_ID(phpbb_search_wordlist_gen, 1);
947
# Table: 'phpbb_search_wordmatch'
948
CREATE TABLE phpbb_search_wordmatch (
949
post_id INTEGER DEFAULT 0 NOT NULL,
950
word_id INTEGER DEFAULT 0 NOT NULL,
951
title_match INTEGER DEFAULT 0 NOT NULL
954
CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);;
955
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);;
956
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);;
958
# Table: 'phpbb_sessions'
959
CREATE TABLE phpbb_sessions (
960
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
961
session_user_id INTEGER DEFAULT 0 NOT NULL,
962
session_last_visit INTEGER DEFAULT 0 NOT NULL,
963
session_start INTEGER DEFAULT 0 NOT NULL,
964
session_time INTEGER DEFAULT 0 NOT NULL,
965
session_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
966
session_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL,
967
session_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
968
session_page VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
969
session_viewonline INTEGER DEFAULT 1 NOT NULL,
970
session_autologin INTEGER DEFAULT 0 NOT NULL,
971
session_admin INTEGER DEFAULT 0 NOT NULL
974
ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);;
976
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);;
977
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);;
979
# Table: 'phpbb_sessions_keys'
980
CREATE TABLE phpbb_sessions_keys (
981
key_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
982
user_id INTEGER DEFAULT 0 NOT NULL,
983
last_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
984
last_login INTEGER DEFAULT 0 NOT NULL
987
ALTER TABLE phpbb_sessions_keys ADD PRIMARY KEY (key_id, user_id);;
989
CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);;
991
# Table: 'phpbb_sitelist'
992
CREATE TABLE phpbb_sitelist (
993
site_id INTEGER NOT NULL,
994
site_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
995
site_hostname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
996
ip_exclude INTEGER DEFAULT 0 NOT NULL
999
ALTER TABLE phpbb_sitelist ADD PRIMARY KEY (site_id);;
1002
CREATE GENERATOR phpbb_sitelist_gen;;
1003
SET GENERATOR phpbb_sitelist_gen TO 0;;
1005
CREATE TRIGGER t_phpbb_sitelist FOR phpbb_sitelist
1009
NEW.site_id = GEN_ID(phpbb_sitelist_gen, 1);
1013
# Table: 'phpbb_smilies'
1014
CREATE TABLE phpbb_smilies (
1015
smiley_id INTEGER NOT NULL,
1016
code VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1017
emotion VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1018
smiley_url VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
1019
smiley_width INTEGER DEFAULT 0 NOT NULL,
1020
smiley_height INTEGER DEFAULT 0 NOT NULL,
1021
smiley_order INTEGER DEFAULT 0 NOT NULL,
1022
display_on_posting INTEGER DEFAULT 1 NOT NULL
1025
ALTER TABLE phpbb_smilies ADD PRIMARY KEY (smiley_id);;
1027
CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies(display_on_posting);;
1029
CREATE GENERATOR phpbb_smilies_gen;;
1030
SET GENERATOR phpbb_smilies_gen TO 0;;
1032
CREATE TRIGGER t_phpbb_smilies FOR phpbb_smilies
1036
NEW.smiley_id = GEN_ID(phpbb_smilies_gen, 1);
1040
# Table: 'phpbb_styles'
1041
CREATE TABLE phpbb_styles (
1042
style_id INTEGER NOT NULL,
1043
style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1044
style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1045
style_active INTEGER DEFAULT 1 NOT NULL,
1046
template_id INTEGER DEFAULT 0 NOT NULL,
1047
theme_id INTEGER DEFAULT 0 NOT NULL,
1048
imageset_id INTEGER DEFAULT 0 NOT NULL
1051
ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
1053
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
1054
CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
1055
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
1056
CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);;
1058
CREATE GENERATOR phpbb_styles_gen;;
1059
SET GENERATOR phpbb_styles_gen TO 0;;
1061
CREATE TRIGGER t_phpbb_styles FOR phpbb_styles
1065
NEW.style_id = GEN_ID(phpbb_styles_gen, 1);
1069
# Table: 'phpbb_styles_template'
1070
CREATE TABLE phpbb_styles_template (
1071
template_id INTEGER NOT NULL,
1072
template_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1073
template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1074
template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
1075
bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
1076
template_storedb INTEGER DEFAULT 0 NOT NULL
1079
ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);;
1081
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);;
1083
CREATE GENERATOR phpbb_styles_template_gen;;
1084
SET GENERATOR phpbb_styles_template_gen TO 0;;
1086
CREATE TRIGGER t_phpbb_styles_template FOR phpbb_styles_template
1090
NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1);
1094
# Table: 'phpbb_styles_template_data'
1095
CREATE TABLE phpbb_styles_template_data (
1096
template_id INTEGER DEFAULT 0 NOT NULL,
1097
template_filename VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
1098
template_included BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
1099
template_mtime INTEGER DEFAULT 0 NOT NULL,
1100
template_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
1103
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data(template_id);;
1104
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data(template_filename);;
1106
# Table: 'phpbb_styles_theme'
1107
CREATE TABLE phpbb_styles_theme (
1108
theme_id INTEGER NOT NULL,
1109
theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1110
theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1111
theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
1112
theme_storedb INTEGER DEFAULT 0 NOT NULL,
1113
theme_mtime INTEGER DEFAULT 0 NOT NULL,
1114
theme_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
1117
ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);;
1119
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme(theme_name);;
1121
CREATE GENERATOR phpbb_styles_theme_gen;;
1122
SET GENERATOR phpbb_styles_theme_gen TO 0;;
1124
CREATE TRIGGER t_phpbb_styles_theme FOR phpbb_styles_theme
1128
NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1);
1132
# Table: 'phpbb_styles_imageset'
1133
CREATE TABLE phpbb_styles_imageset (
1134
imageset_id INTEGER NOT NULL,
1135
imageset_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1136
imageset_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1137
imageset_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
1140
ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);;
1142
CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);;
1144
CREATE GENERATOR phpbb_styles_imageset_gen;;
1145
SET GENERATOR phpbb_styles_imageset_gen TO 0;;
1147
CREATE TRIGGER t_phpbb_styles_imageset FOR phpbb_styles_imageset
1151
NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1);
1155
# Table: 'phpbb_styles_imageset_data'
1156
CREATE TABLE phpbb_styles_imageset_data (
1157
image_id INTEGER NOT NULL,
1158
image_name VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
1159
image_filename VARCHAR(200) CHARACTER SET NONE DEFAULT '' NOT NULL,
1160
image_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
1161
image_height INTEGER DEFAULT 0 NOT NULL,
1162
image_width INTEGER DEFAULT 0 NOT NULL,
1163
imageset_id INTEGER DEFAULT 0 NOT NULL
1166
ALTER TABLE phpbb_styles_imageset_data ADD PRIMARY KEY (image_id);;
1168
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data(imageset_id);;
1170
CREATE GENERATOR phpbb_styles_imageset_data_gen;;
1171
SET GENERATOR phpbb_styles_imageset_data_gen TO 0;;
1173
CREATE TRIGGER t_phpbb_styles_imageset_data FOR phpbb_styles_imageset_data
1177
NEW.image_id = GEN_ID(phpbb_styles_imageset_data_gen, 1);
1181
# Table: 'phpbb_topics'
1182
CREATE TABLE phpbb_topics (
1183
topic_id INTEGER NOT NULL,
1184
forum_id INTEGER DEFAULT 0 NOT NULL,
1185
icon_id INTEGER DEFAULT 0 NOT NULL,
1186
topic_attachment INTEGER DEFAULT 0 NOT NULL,
1187
topic_approved INTEGER DEFAULT 1 NOT NULL,
1188
topic_reported INTEGER DEFAULT 0 NOT NULL,
1189
topic_title VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1190
topic_poster INTEGER DEFAULT 0 NOT NULL,
1191
topic_time INTEGER DEFAULT 0 NOT NULL,
1192
topic_time_limit INTEGER DEFAULT 0 NOT NULL,
1193
topic_views INTEGER DEFAULT 0 NOT NULL,
1194
topic_replies INTEGER DEFAULT 0 NOT NULL,
1195
topic_replies_real INTEGER DEFAULT 0 NOT NULL,
1196
topic_status INTEGER DEFAULT 0 NOT NULL,
1197
topic_type INTEGER DEFAULT 0 NOT NULL,
1198
topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
1199
topic_first_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1200
topic_first_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
1201
topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
1202
topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
1203
topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1204
topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
1205
topic_last_post_subject VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1206
topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
1207
topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
1208
topic_moved_id INTEGER DEFAULT 0 NOT NULL,
1209
topic_bumped INTEGER DEFAULT 0 NOT NULL,
1210
topic_bumper INTEGER DEFAULT 0 NOT NULL,
1211
poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1212
poll_start INTEGER DEFAULT 0 NOT NULL,
1213
poll_length INTEGER DEFAULT 0 NOT NULL,
1214
poll_max_options INTEGER DEFAULT 1 NOT NULL,
1215
poll_last_vote INTEGER DEFAULT 0 NOT NULL,
1216
poll_vote_change INTEGER DEFAULT 0 NOT NULL
1219
ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
1221
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);;
1222
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);;
1223
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);;
1224
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);;
1225
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);;
1226
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);;
1228
CREATE GENERATOR phpbb_topics_gen;;
1229
SET GENERATOR phpbb_topics_gen TO 0;;
1231
CREATE TRIGGER t_phpbb_topics FOR phpbb_topics
1235
NEW.topic_id = GEN_ID(phpbb_topics_gen, 1);
1239
# Table: 'phpbb_topics_track'
1240
CREATE TABLE phpbb_topics_track (
1241
user_id INTEGER DEFAULT 0 NOT NULL,
1242
topic_id INTEGER DEFAULT 0 NOT NULL,
1243
forum_id INTEGER DEFAULT 0 NOT NULL,
1244
mark_time INTEGER DEFAULT 0 NOT NULL
1247
ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
1249
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
1251
# Table: 'phpbb_topics_posted'
1252
CREATE TABLE phpbb_topics_posted (
1253
user_id INTEGER DEFAULT 0 NOT NULL,
1254
topic_id INTEGER DEFAULT 0 NOT NULL,
1255
topic_posted INTEGER DEFAULT 0 NOT NULL
1258
ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);;
1261
# Table: 'phpbb_topics_watch'
1262
CREATE TABLE phpbb_topics_watch (
1263
topic_id INTEGER DEFAULT 0 NOT NULL,
1264
user_id INTEGER DEFAULT 0 NOT NULL,
1265
notify_status INTEGER DEFAULT 0 NOT NULL
1268
CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);;
1269
CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);;
1270
CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);;
1272
# Table: 'phpbb_user_group'
1273
CREATE TABLE phpbb_user_group (
1274
group_id INTEGER DEFAULT 0 NOT NULL,
1275
user_id INTEGER DEFAULT 0 NOT NULL,
1276
group_leader INTEGER DEFAULT 0 NOT NULL,
1277
user_pending INTEGER DEFAULT 1 NOT NULL
1280
CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group(group_id);;
1281
CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group(user_id);;
1282
CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group(group_leader);;
1284
# Table: 'phpbb_users'
1285
CREATE TABLE phpbb_users (
1286
user_id INTEGER NOT NULL,
1287
user_type INTEGER DEFAULT 0 NOT NULL,
1288
group_id INTEGER DEFAULT 3 NOT NULL,
1289
user_permissions BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
1290
user_perm_from INTEGER DEFAULT 0 NOT NULL,
1291
user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
1292
user_regdate INTEGER DEFAULT 0 NOT NULL,
1293
username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1294
username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1295
user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1296
user_passchg INTEGER DEFAULT 0 NOT NULL,
1297
user_pass_convert INTEGER DEFAULT 0 NOT NULL,
1298
user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1299
user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL,
1300
user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
1301
user_lastvisit INTEGER DEFAULT 0 NOT NULL,
1302
user_lastmark INTEGER DEFAULT 0 NOT NULL,
1303
user_lastpost_time INTEGER DEFAULT 0 NOT NULL,
1304
user_lastpage VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1305
user_last_confirm_key VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
1306
user_last_search INTEGER DEFAULT 0 NOT NULL,
1307
user_warnings INTEGER DEFAULT 0 NOT NULL,
1308
user_last_warning INTEGER DEFAULT 0 NOT NULL,
1309
user_login_attempts INTEGER DEFAULT 0 NOT NULL,
1310
user_inactive_reason INTEGER DEFAULT 0 NOT NULL,
1311
user_inactive_time INTEGER DEFAULT 0 NOT NULL,
1312
user_posts INTEGER DEFAULT 0 NOT NULL,
1313
user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
1314
user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL,
1315
user_dst INTEGER DEFAULT 0 NOT NULL,
1316
user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE,
1317
user_style INTEGER DEFAULT 0 NOT NULL,
1318
user_rank INTEGER DEFAULT 0 NOT NULL,
1319
user_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
1320
user_new_privmsg INTEGER DEFAULT 0 NOT NULL,
1321
user_unread_privmsg INTEGER DEFAULT 0 NOT NULL,
1322
user_last_privmsg INTEGER DEFAULT 0 NOT NULL,
1323
user_message_rules INTEGER DEFAULT 0 NOT NULL,
1324
user_full_folder INTEGER DEFAULT -3 NOT NULL,
1325
user_emailtime INTEGER DEFAULT 0 NOT NULL,
1326
user_topic_show_days INTEGER DEFAULT 0 NOT NULL,
1327
user_topic_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
1328
user_topic_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'd' NOT NULL,
1329
user_post_show_days INTEGER DEFAULT 0 NOT NULL,
1330
user_post_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
1331
user_post_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'a' NOT NULL,
1332
user_notify INTEGER DEFAULT 0 NOT NULL,
1333
user_notify_pm INTEGER DEFAULT 1 NOT NULL,
1334
user_notify_type INTEGER DEFAULT 0 NOT NULL,
1335
user_allow_pm INTEGER DEFAULT 1 NOT NULL,
1336
user_allow_viewonline INTEGER DEFAULT 1 NOT NULL,
1337
user_allow_viewemail INTEGER DEFAULT 1 NOT NULL,
1338
user_allow_massemail INTEGER DEFAULT 1 NOT NULL,
1339
user_options INTEGER DEFAULT 895 NOT NULL,
1340
user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
1341
user_avatar_type INTEGER DEFAULT 0 NOT NULL,
1342
user_avatar_width INTEGER DEFAULT 0 NOT NULL,
1343
user_avatar_height INTEGER DEFAULT 0 NOT NULL,
1344
user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
1345
user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
1346
user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
1347
user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1348
user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL,
1349
user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1350
user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1351
user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1352
user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1353
user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1354
user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
1355
user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
1356
user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
1357
user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1358
user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
1361
ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);;
1363
CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);;
1364
CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);;
1365
CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);;
1366
CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);;
1368
CREATE GENERATOR phpbb_users_gen;;
1369
SET GENERATOR phpbb_users_gen TO 0;;
1371
CREATE TRIGGER t_phpbb_users FOR phpbb_users
1375
NEW.user_id = GEN_ID(phpbb_users_gen, 1);
1379
# Table: 'phpbb_warnings'
1380
CREATE TABLE phpbb_warnings (
1381
warning_id INTEGER NOT NULL,
1382
user_id INTEGER DEFAULT 0 NOT NULL,
1383
post_id INTEGER DEFAULT 0 NOT NULL,
1384
log_id INTEGER DEFAULT 0 NOT NULL,
1385
warning_time INTEGER DEFAULT 0 NOT NULL
1388
ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);;
1391
CREATE GENERATOR phpbb_warnings_gen;;
1392
SET GENERATOR phpbb_warnings_gen TO 0;;
1394
CREATE TRIGGER t_phpbb_warnings FOR phpbb_warnings
1398
NEW.warning_id = GEN_ID(phpbb_warnings_gen, 1);
1402
# Table: 'phpbb_words'
1403
CREATE TABLE phpbb_words (
1404
word_id INTEGER NOT NULL,
1405
word VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
1406
replacement VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
1409
ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);;
1412
CREATE GENERATOR phpbb_words_gen;;
1413
SET GENERATOR phpbb_words_gen TO 0;;
1415
CREATE TRIGGER t_phpbb_words FOR phpbb_words
1419
NEW.word_id = GEN_ID(phpbb_words_gen, 1);
1423
# Table: 'phpbb_zebra'
1424
CREATE TABLE phpbb_zebra (
1425
user_id INTEGER DEFAULT 0 NOT NULL,
1426
zebra_id INTEGER DEFAULT 0 NOT NULL,
1427
friend INTEGER DEFAULT 0 NOT NULL,
1428
foe INTEGER DEFAULT 0 NOT NULL
1431
ALTER TABLE phpbb_zebra ADD PRIMARY KEY (user_id, zebra_id);;