3
$Id: mssql_schema.sql,v 1.109 2007/12/05 15:18:21 acydburn Exp $
11
Table: 'phpbb_attachments'
13
CREATE TABLE [phpbb_attachments] (
14
[attach_id] [int] IDENTITY (1, 1) NOT NULL ,
15
[post_msg_id] [int] DEFAULT (0) NOT NULL ,
16
[topic_id] [int] DEFAULT (0) NOT NULL ,
17
[in_message] [int] DEFAULT (0) NOT NULL ,
18
[poster_id] [int] DEFAULT (0) NOT NULL ,
19
[is_orphan] [int] DEFAULT (1) NOT NULL ,
20
[physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
21
[real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
22
[download_count] [int] DEFAULT (0) NOT NULL ,
23
[attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL ,
24
[extension] [varchar] (100) DEFAULT ('') NOT NULL ,
25
[mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
26
[filesize] [int] DEFAULT (0) NOT NULL ,
27
[filetime] [int] DEFAULT (0) NOT NULL ,
28
[thumbnail] [int] DEFAULT (0) NOT NULL
32
ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
33
CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED
39
CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY]
42
CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY]
45
CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY]
48
CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY]
51
CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY]
56
Table: 'phpbb_acl_groups'
58
CREATE TABLE [phpbb_acl_groups] (
59
[group_id] [int] DEFAULT (0) NOT NULL ,
60
[forum_id] [int] DEFAULT (0) NOT NULL ,
61
[auth_option_id] [int] DEFAULT (0) NOT NULL ,
62
[auth_role_id] [int] DEFAULT (0) NOT NULL ,
63
[auth_setting] [int] DEFAULT (0) NOT NULL
67
CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY]
70
CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY]
73
CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY]
78
Table: 'phpbb_acl_options'
80
CREATE TABLE [phpbb_acl_options] (
81
[auth_option_id] [int] IDENTITY (1, 1) NOT NULL ,
82
[auth_option] [varchar] (50) DEFAULT ('') NOT NULL ,
83
[is_global] [int] DEFAULT (0) NOT NULL ,
84
[is_local] [int] DEFAULT (0) NOT NULL ,
85
[founder_only] [int] DEFAULT (0) NOT NULL
89
ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD
90
CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED
96
CREATE INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY]
101
Table: 'phpbb_acl_roles'
103
CREATE TABLE [phpbb_acl_roles] (
104
[role_id] [int] IDENTITY (1, 1) NOT NULL ,
105
[role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
106
[role_description] [varchar] (4000) DEFAULT ('') NOT NULL ,
107
[role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
108
[role_order] [int] DEFAULT (0) NOT NULL
112
ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD
113
CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED
119
CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY]
122
CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY]
127
Table: 'phpbb_acl_roles_data'
129
CREATE TABLE [phpbb_acl_roles_data] (
130
[role_id] [int] DEFAULT (0) NOT NULL ,
131
[auth_option_id] [int] DEFAULT (0) NOT NULL ,
132
[auth_setting] [int] DEFAULT (0) NOT NULL
136
ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD
137
CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED
144
CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
149
Table: 'phpbb_acl_users'
151
CREATE TABLE [phpbb_acl_users] (
152
[user_id] [int] DEFAULT (0) NOT NULL ,
153
[forum_id] [int] DEFAULT (0) NOT NULL ,
154
[auth_option_id] [int] DEFAULT (0) NOT NULL ,
155
[auth_role_id] [int] DEFAULT (0) NOT NULL ,
156
[auth_setting] [int] DEFAULT (0) NOT NULL
160
CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY]
163
CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY]
166
CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
171
Table: 'phpbb_banlist'
173
CREATE TABLE [phpbb_banlist] (
174
[ban_id] [int] IDENTITY (1, 1) NOT NULL ,
175
[ban_userid] [int] DEFAULT (0) NOT NULL ,
176
[ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
177
[ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
178
[ban_start] [int] DEFAULT (0) NOT NULL ,
179
[ban_end] [int] DEFAULT (0) NOT NULL ,
180
[ban_exclude] [int] DEFAULT (0) NOT NULL ,
181
[ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
182
[ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL
186
ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
187
CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
193
CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY]
196
CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY]
199
CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY]
202
CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY]
207
Table: 'phpbb_bbcodes'
209
CREATE TABLE [phpbb_bbcodes] (
210
[bbcode_id] [int] DEFAULT (0) NOT NULL ,
211
[bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
212
[bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
213
[display_on_posting] [int] DEFAULT (0) NOT NULL ,
214
[bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL ,
215
[bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
216
[first_pass_match] [text] DEFAULT ('') NOT NULL ,
217
[first_pass_replace] [text] DEFAULT ('') NOT NULL ,
218
[second_pass_match] [text] DEFAULT ('') NOT NULL ,
219
[second_pass_replace] [text] DEFAULT ('') NOT NULL
220
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
223
ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
224
CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED
230
CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
235
Table: 'phpbb_bookmarks'
237
CREATE TABLE [phpbb_bookmarks] (
238
[topic_id] [int] DEFAULT (0) NOT NULL ,
239
[user_id] [int] DEFAULT (0) NOT NULL
243
ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
244
CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED
255
CREATE TABLE [phpbb_bots] (
256
[bot_id] [int] IDENTITY (1, 1) NOT NULL ,
257
[bot_active] [int] DEFAULT (1) NOT NULL ,
258
[bot_name] [varchar] (255) DEFAULT ('') NOT NULL ,
259
[user_id] [int] DEFAULT (0) NOT NULL ,
260
[bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
261
[bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
265
ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
266
CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED
272
CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
277
Table: 'phpbb_config'
279
CREATE TABLE [phpbb_config] (
280
[config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
281
[config_value] [varchar] (255) DEFAULT ('') NOT NULL ,
282
[is_dynamic] [int] DEFAULT (0) NOT NULL
286
ALTER TABLE [phpbb_config] WITH NOCHECK ADD
287
CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED
293
CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
298
Table: 'phpbb_confirm'
300
CREATE TABLE [phpbb_confirm] (
301
[confirm_id] [char] (32) DEFAULT ('') NOT NULL ,
302
[session_id] [char] (32) DEFAULT ('') NOT NULL ,
303
[confirm_type] [int] DEFAULT (0) NOT NULL ,
304
[code] [varchar] (8) DEFAULT ('') NOT NULL ,
305
[seed] [int] DEFAULT (0) NOT NULL
309
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
310
CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
317
CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY]
322
Table: 'phpbb_disallow'
324
CREATE TABLE [phpbb_disallow] (
325
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
326
[disallow_username] [varchar] (255) DEFAULT ('') NOT NULL
330
ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
331
CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
339
Table: 'phpbb_drafts'
341
CREATE TABLE [phpbb_drafts] (
342
[draft_id] [int] IDENTITY (1, 1) NOT NULL ,
343
[user_id] [int] DEFAULT (0) NOT NULL ,
344
[topic_id] [int] DEFAULT (0) NOT NULL ,
345
[forum_id] [int] DEFAULT (0) NOT NULL ,
346
[save_time] [int] DEFAULT (0) NOT NULL ,
347
[draft_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
348
[draft_message] [text] DEFAULT ('') NOT NULL
349
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
352
ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
353
CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED
359
CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
364
Table: 'phpbb_extensions'
366
CREATE TABLE [phpbb_extensions] (
367
[extension_id] [int] IDENTITY (1, 1) NOT NULL ,
368
[group_id] [int] DEFAULT (0) NOT NULL ,
369
[extension] [varchar] (100) DEFAULT ('') NOT NULL
373
ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
374
CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
382
Table: 'phpbb_extension_groups'
384
CREATE TABLE [phpbb_extension_groups] (
385
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
386
[group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
387
[cat_id] [int] DEFAULT (0) NOT NULL ,
388
[allow_group] [int] DEFAULT (0) NOT NULL ,
389
[download_mode] [int] DEFAULT (1) NOT NULL ,
390
[upload_icon] [varchar] (255) DEFAULT ('') NOT NULL ,
391
[max_filesize] [int] DEFAULT (0) NOT NULL ,
392
[allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL ,
393
[allow_in_pm] [int] DEFAULT (0) NOT NULL
397
ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD
398
CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED
406
Table: 'phpbb_forums'
408
CREATE TABLE [phpbb_forums] (
409
[forum_id] [int] IDENTITY (1, 1) NOT NULL ,
410
[parent_id] [int] DEFAULT (0) NOT NULL ,
411
[left_id] [int] DEFAULT (0) NOT NULL ,
412
[right_id] [int] DEFAULT (0) NOT NULL ,
413
[forum_parents] [text] DEFAULT ('') NOT NULL ,
414
[forum_name] [varchar] (255) DEFAULT ('') NOT NULL ,
415
[forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
416
[forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
417
[forum_desc_options] [int] DEFAULT (7) NOT NULL ,
418
[forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
419
[forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
420
[forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
421
[forum_style] [int] DEFAULT (0) NOT NULL ,
422
[forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
423
[forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL ,
424
[forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
425
[forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
426
[forum_rules_options] [int] DEFAULT (7) NOT NULL ,
427
[forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
428
[forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
429
[forum_type] [int] DEFAULT (0) NOT NULL ,
430
[forum_status] [int] DEFAULT (0) NOT NULL ,
431
[forum_posts] [int] DEFAULT (0) NOT NULL ,
432
[forum_topics] [int] DEFAULT (0) NOT NULL ,
433
[forum_topics_real] [int] DEFAULT (0) NOT NULL ,
434
[forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
435
[forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
436
[forum_last_post_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
437
[forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
438
[forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
439
[forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
440
[forum_flags] [int] DEFAULT (32) NOT NULL ,
441
[display_on_index] [int] DEFAULT (1) NOT NULL ,
442
[enable_indexing] [int] DEFAULT (1) NOT NULL ,
443
[enable_icons] [int] DEFAULT (1) NOT NULL ,
444
[enable_prune] [int] DEFAULT (0) NOT NULL ,
445
[prune_next] [int] DEFAULT (0) NOT NULL ,
446
[prune_days] [int] DEFAULT (0) NOT NULL ,
447
[prune_viewed] [int] DEFAULT (0) NOT NULL ,
448
[prune_freq] [int] DEFAULT (0) NOT NULL
449
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
452
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
453
CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
459
CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY]
462
CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY]
467
Table: 'phpbb_forums_access'
469
CREATE TABLE [phpbb_forums_access] (
470
[forum_id] [int] DEFAULT (0) NOT NULL ,
471
[user_id] [int] DEFAULT (0) NOT NULL ,
472
[session_id] [char] (32) DEFAULT ('') NOT NULL
476
ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD
477
CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED
487
Table: 'phpbb_forums_track'
489
CREATE TABLE [phpbb_forums_track] (
490
[user_id] [int] DEFAULT (0) NOT NULL ,
491
[forum_id] [int] DEFAULT (0) NOT NULL ,
492
[mark_time] [int] DEFAULT (0) NOT NULL
496
ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD
497
CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED
506
Table: 'phpbb_forums_watch'
508
CREATE TABLE [phpbb_forums_watch] (
509
[forum_id] [int] DEFAULT (0) NOT NULL ,
510
[user_id] [int] DEFAULT (0) NOT NULL ,
511
[notify_status] [int] DEFAULT (0) NOT NULL
515
CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY]
518
CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY]
521
CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY]
526
Table: 'phpbb_groups'
528
CREATE TABLE [phpbb_groups] (
529
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
530
[group_type] [int] DEFAULT (1) NOT NULL ,
531
[group_founder_manage] [int] DEFAULT (0) NOT NULL ,
532
[group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
533
[group_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
534
[group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
535
[group_desc_options] [int] DEFAULT (7) NOT NULL ,
536
[group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
537
[group_display] [int] DEFAULT (0) NOT NULL ,
538
[group_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
539
[group_avatar_type] [int] DEFAULT (0) NOT NULL ,
540
[group_avatar_width] [int] DEFAULT (0) NOT NULL ,
541
[group_avatar_height] [int] DEFAULT (0) NOT NULL ,
542
[group_rank] [int] DEFAULT (0) NOT NULL ,
543
[group_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
544
[group_sig_chars] [int] DEFAULT (0) NOT NULL ,
545
[group_receive_pm] [int] DEFAULT (0) NOT NULL ,
546
[group_message_limit] [int] DEFAULT (0) NOT NULL ,
547
[group_legend] [int] DEFAULT (1) NOT NULL
551
ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
552
CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
558
CREATE INDEX [group_legend] ON [phpbb_groups]([group_legend]) ON [PRIMARY]
565
CREATE TABLE [phpbb_icons] (
566
[icons_id] [int] IDENTITY (1, 1) NOT NULL ,
567
[icons_url] [varchar] (255) DEFAULT ('') NOT NULL ,
568
[icons_width] [int] DEFAULT (0) NOT NULL ,
569
[icons_height] [int] DEFAULT (0) NOT NULL ,
570
[icons_order] [int] DEFAULT (0) NOT NULL ,
571
[display_on_posting] [int] DEFAULT (1) NOT NULL
575
ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
576
CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED
582
CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY]
589
CREATE TABLE [phpbb_lang] (
590
[lang_id] [int] IDENTITY (1, 1) NOT NULL ,
591
[lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
592
[lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
593
[lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
594
[lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
595
[lang_author] [varchar] (255) DEFAULT ('') NOT NULL
599
ALTER TABLE [phpbb_lang] WITH NOCHECK ADD
600
CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED
606
CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY]
613
CREATE TABLE [phpbb_log] (
614
[log_id] [int] IDENTITY (1, 1) NOT NULL ,
615
[log_type] [int] DEFAULT (0) NOT NULL ,
616
[user_id] [int] DEFAULT (0) NOT NULL ,
617
[forum_id] [int] DEFAULT (0) NOT NULL ,
618
[topic_id] [int] DEFAULT (0) NOT NULL ,
619
[reportee_id] [int] DEFAULT (0) NOT NULL ,
620
[log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
621
[log_time] [int] DEFAULT (0) NOT NULL ,
622
[log_operation] [varchar] (4000) DEFAULT ('') NOT NULL ,
623
[log_data] [text] DEFAULT ('') NOT NULL
624
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
627
ALTER TABLE [phpbb_log] WITH NOCHECK ADD
628
CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED
634
CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
637
CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
640
CREATE INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY]
643
CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY]
646
CREATE INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY]
651
Table: 'phpbb_moderator_cache'
653
CREATE TABLE [phpbb_moderator_cache] (
654
[forum_id] [int] DEFAULT (0) NOT NULL ,
655
[user_id] [int] DEFAULT (0) NOT NULL ,
656
[username] [varchar] (255) DEFAULT ('') NOT NULL ,
657
[group_id] [int] DEFAULT (0) NOT NULL ,
658
[group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
659
[display_on_index] [int] DEFAULT (1) NOT NULL
663
CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY]
666
CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY]
671
Table: 'phpbb_modules'
673
CREATE TABLE [phpbb_modules] (
674
[module_id] [int] IDENTITY (1, 1) NOT NULL ,
675
[module_enabled] [int] DEFAULT (1) NOT NULL ,
676
[module_display] [int] DEFAULT (1) NOT NULL ,
677
[module_basename] [varchar] (255) DEFAULT ('') NOT NULL ,
678
[module_class] [varchar] (10) DEFAULT ('') NOT NULL ,
679
[parent_id] [int] DEFAULT (0) NOT NULL ,
680
[left_id] [int] DEFAULT (0) NOT NULL ,
681
[right_id] [int] DEFAULT (0) NOT NULL ,
682
[module_langname] [varchar] (255) DEFAULT ('') NOT NULL ,
683
[module_mode] [varchar] (255) DEFAULT ('') NOT NULL ,
684
[module_auth] [varchar] (255) DEFAULT ('') NOT NULL
688
ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
689
CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED
695
CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY]
698
CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY]
701
CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY]
706
Table: 'phpbb_poll_options'
708
CREATE TABLE [phpbb_poll_options] (
709
[poll_option_id] [int] DEFAULT (0) NOT NULL ,
710
[topic_id] [int] DEFAULT (0) NOT NULL ,
711
[poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL ,
712
[poll_option_total] [int] DEFAULT (0) NOT NULL
716
CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
719
CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY]
724
Table: 'phpbb_poll_votes'
726
CREATE TABLE [phpbb_poll_votes] (
727
[topic_id] [int] DEFAULT (0) NOT NULL ,
728
[poll_option_id] [int] DEFAULT (0) NOT NULL ,
729
[vote_user_id] [int] DEFAULT (0) NOT NULL ,
730
[vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL
734
CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY]
737
CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY]
740
CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY]
747
CREATE TABLE [phpbb_posts] (
748
[post_id] [int] IDENTITY (1, 1) NOT NULL ,
749
[topic_id] [int] DEFAULT (0) NOT NULL ,
750
[forum_id] [int] DEFAULT (0) NOT NULL ,
751
[poster_id] [int] DEFAULT (0) NOT NULL ,
752
[icon_id] [int] DEFAULT (0) NOT NULL ,
753
[poster_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
754
[post_time] [int] DEFAULT (0) NOT NULL ,
755
[post_approved] [int] DEFAULT (1) NOT NULL ,
756
[post_reported] [int] DEFAULT (0) NOT NULL ,
757
[enable_bbcode] [int] DEFAULT (1) NOT NULL ,
758
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
759
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
760
[enable_sig] [int] DEFAULT (1) NOT NULL ,
761
[post_username] [varchar] (255) DEFAULT ('') NOT NULL ,
762
[post_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
763
[post_text] [text] DEFAULT ('') NOT NULL ,
764
[post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
765
[post_attachment] [int] DEFAULT (0) NOT NULL ,
766
[bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
767
[bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
768
[post_postcount] [int] DEFAULT (1) NOT NULL ,
769
[post_edit_time] [int] DEFAULT (0) NOT NULL ,
770
[post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
771
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
772
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
773
[post_edit_locked] [int] DEFAULT (0) NOT NULL
774
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
777
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
778
CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
784
CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY]
787
CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY]
790
CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY]
793
CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY]
796
CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
799
CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY]
804
Table: 'phpbb_privmsgs'
806
CREATE TABLE [phpbb_privmsgs] (
807
[msg_id] [int] IDENTITY (1, 1) NOT NULL ,
808
[root_level] [int] DEFAULT (0) NOT NULL ,
809
[author_id] [int] DEFAULT (0) NOT NULL ,
810
[icon_id] [int] DEFAULT (0) NOT NULL ,
811
[author_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
812
[message_time] [int] DEFAULT (0) NOT NULL ,
813
[enable_bbcode] [int] DEFAULT (1) NOT NULL ,
814
[enable_smilies] [int] DEFAULT (1) NOT NULL ,
815
[enable_magic_url] [int] DEFAULT (1) NOT NULL ,
816
[enable_sig] [int] DEFAULT (1) NOT NULL ,
817
[message_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
818
[message_text] [text] DEFAULT ('') NOT NULL ,
819
[message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
820
[message_edit_user] [int] DEFAULT (0) NOT NULL ,
821
[message_attachment] [int] DEFAULT (0) NOT NULL ,
822
[bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
823
[bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
824
[message_edit_time] [int] DEFAULT (0) NOT NULL ,
825
[message_edit_count] [int] DEFAULT (0) NOT NULL ,
826
[to_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
827
[bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL
828
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
831
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
832
CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
838
CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY]
841
CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY]
844
CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY]
847
CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY]
852
Table: 'phpbb_privmsgs_folder'
854
CREATE TABLE [phpbb_privmsgs_folder] (
855
[folder_id] [int] IDENTITY (1, 1) NOT NULL ,
856
[user_id] [int] DEFAULT (0) NOT NULL ,
857
[folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
858
[pm_count] [int] DEFAULT (0) NOT NULL
862
ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD
863
CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED
869
CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY]
874
Table: 'phpbb_privmsgs_rules'
876
CREATE TABLE [phpbb_privmsgs_rules] (
877
[rule_id] [int] IDENTITY (1, 1) NOT NULL ,
878
[user_id] [int] DEFAULT (0) NOT NULL ,
879
[rule_check] [int] DEFAULT (0) NOT NULL ,
880
[rule_connection] [int] DEFAULT (0) NOT NULL ,
881
[rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
882
[rule_user_id] [int] DEFAULT (0) NOT NULL ,
883
[rule_group_id] [int] DEFAULT (0) NOT NULL ,
884
[rule_action] [int] DEFAULT (0) NOT NULL ,
885
[rule_folder_id] [int] DEFAULT (0) NOT NULL
889
ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD
890
CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED
896
CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY]
901
Table: 'phpbb_privmsgs_to'
903
CREATE TABLE [phpbb_privmsgs_to] (
904
[msg_id] [int] DEFAULT (0) NOT NULL ,
905
[user_id] [int] DEFAULT (0) NOT NULL ,
906
[author_id] [int] DEFAULT (0) NOT NULL ,
907
[pm_deleted] [int] DEFAULT (0) NOT NULL ,
908
[pm_new] [int] DEFAULT (1) NOT NULL ,
909
[pm_unread] [int] DEFAULT (1) NOT NULL ,
910
[pm_replied] [int] DEFAULT (0) NOT NULL ,
911
[pm_marked] [int] DEFAULT (0) NOT NULL ,
912
[pm_forwarded] [int] DEFAULT (0) NOT NULL ,
913
[folder_id] [int] DEFAULT (0) NOT NULL
917
CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY]
920
CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY]
923
CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY]
928
Table: 'phpbb_profile_fields'
930
CREATE TABLE [phpbb_profile_fields] (
931
[field_id] [int] IDENTITY (1, 1) NOT NULL ,
932
[field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
933
[field_type] [int] DEFAULT (0) NOT NULL ,
934
[field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
935
[field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
936
[field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
937
[field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
938
[field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
939
[field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
940
[field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
941
[field_required] [int] DEFAULT (0) NOT NULL ,
942
[field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
943
[field_hide] [int] DEFAULT (0) NOT NULL ,
944
[field_no_view] [int] DEFAULT (0) NOT NULL ,
945
[field_active] [int] DEFAULT (0) NOT NULL ,
946
[field_order] [int] DEFAULT (0) NOT NULL
950
ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
951
CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED
957
CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY]
960
CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY]
965
Table: 'phpbb_profile_fields_data'
967
CREATE TABLE [phpbb_profile_fields_data] (
968
[user_id] [int] DEFAULT (0) NOT NULL
972
ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD
973
CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED
981
Table: 'phpbb_profile_fields_lang'
983
CREATE TABLE [phpbb_profile_fields_lang] (
984
[field_id] [int] DEFAULT (0) NOT NULL ,
985
[lang_id] [int] DEFAULT (0) NOT NULL ,
986
[option_id] [int] DEFAULT (0) NOT NULL ,
987
[field_type] [int] DEFAULT (0) NOT NULL ,
988
[lang_value] [varchar] (255) DEFAULT ('') NOT NULL
992
ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
993
CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED
1003
Table: 'phpbb_profile_lang'
1005
CREATE TABLE [phpbb_profile_lang] (
1006
[field_id] [int] DEFAULT (0) NOT NULL ,
1007
[lang_id] [int] DEFAULT (0) NOT NULL ,
1008
[lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1009
[lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL ,
1010
[lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
1014
ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
1015
CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED
1024
Table: 'phpbb_ranks'
1026
CREATE TABLE [phpbb_ranks] (
1027
[rank_id] [int] IDENTITY (1, 1) NOT NULL ,
1028
[rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1029
[rank_min] [int] DEFAULT (0) NOT NULL ,
1030
[rank_special] [int] DEFAULT (0) NOT NULL ,
1031
[rank_image] [varchar] (255) DEFAULT ('') NOT NULL
1035
ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
1036
CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
1044
Table: 'phpbb_reports'
1046
CREATE TABLE [phpbb_reports] (
1047
[report_id] [int] IDENTITY (1, 1) NOT NULL ,
1048
[reason_id] [int] DEFAULT (0) NOT NULL ,
1049
[post_id] [int] DEFAULT (0) NOT NULL ,
1050
[user_id] [int] DEFAULT (0) NOT NULL ,
1051
[user_notify] [int] DEFAULT (0) NOT NULL ,
1052
[report_closed] [int] DEFAULT (0) NOT NULL ,
1053
[report_time] [int] DEFAULT (0) NOT NULL ,
1054
[report_text] [text] DEFAULT ('') NOT NULL
1055
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1058
ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
1059
CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED
1067
Table: 'phpbb_reports_reasons'
1069
CREATE TABLE [phpbb_reports_reasons] (
1070
[reason_id] [int] IDENTITY (1, 1) NOT NULL ,
1071
[reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1072
[reason_description] [text] DEFAULT ('') NOT NULL ,
1073
[reason_order] [int] DEFAULT (0) NOT NULL
1074
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1077
ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
1078
CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED
1086
Table: 'phpbb_search_results'
1088
CREATE TABLE [phpbb_search_results] (
1089
[search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
1090
[search_time] [int] DEFAULT (0) NOT NULL ,
1091
[search_keywords] [text] DEFAULT ('') NOT NULL ,
1092
[search_authors] [text] DEFAULT ('') NOT NULL
1093
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1096
ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
1097
CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
1105
Table: 'phpbb_search_wordlist'
1107
CREATE TABLE [phpbb_search_wordlist] (
1108
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
1109
[word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
1110
[word_common] [int] DEFAULT (0) NOT NULL ,
1111
[word_count] [int] DEFAULT (0) NOT NULL
1115
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
1116
CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
1122
CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY]
1125
CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY]
1130
Table: 'phpbb_search_wordmatch'
1132
CREATE TABLE [phpbb_search_wordmatch] (
1133
[post_id] [int] DEFAULT (0) NOT NULL ,
1134
[word_id] [int] DEFAULT (0) NOT NULL ,
1135
[title_match] [int] DEFAULT (0) NOT NULL
1139
CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY]
1142
CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
1145
CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY]
1150
Table: 'phpbb_sessions'
1152
CREATE TABLE [phpbb_sessions] (
1153
[session_id] [char] (32) DEFAULT ('') NOT NULL ,
1154
[session_user_id] [int] DEFAULT (0) NOT NULL ,
1155
[session_last_visit] [int] DEFAULT (0) NOT NULL ,
1156
[session_start] [int] DEFAULT (0) NOT NULL ,
1157
[session_time] [int] DEFAULT (0) NOT NULL ,
1158
[session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1159
[session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
1160
[session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
1161
[session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
1162
[session_viewonline] [int] DEFAULT (1) NOT NULL ,
1163
[session_autologin] [int] DEFAULT (0) NOT NULL ,
1164
[session_admin] [int] DEFAULT (0) NOT NULL
1168
ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
1169
CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED
1175
CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY]
1178
CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY]
1183
Table: 'phpbb_sessions_keys'
1185
CREATE TABLE [phpbb_sessions_keys] (
1186
[key_id] [char] (32) DEFAULT ('') NOT NULL ,
1187
[user_id] [int] DEFAULT (0) NOT NULL ,
1188
[last_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1189
[last_login] [int] DEFAULT (0) NOT NULL
1193
ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD
1194
CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED
1201
CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY]
1206
Table: 'phpbb_sitelist'
1208
CREATE TABLE [phpbb_sitelist] (
1209
[site_id] [int] IDENTITY (1, 1) NOT NULL ,
1210
[site_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1211
[site_hostname] [varchar] (255) DEFAULT ('') NOT NULL ,
1212
[ip_exclude] [int] DEFAULT (0) NOT NULL
1216
ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
1217
CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED
1225
Table: 'phpbb_smilies'
1227
CREATE TABLE [phpbb_smilies] (
1228
[smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
1229
[code] [varchar] (50) DEFAULT ('') NOT NULL ,
1230
[emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
1231
[smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
1232
[smiley_width] [int] DEFAULT (0) NOT NULL ,
1233
[smiley_height] [int] DEFAULT (0) NOT NULL ,
1234
[smiley_order] [int] DEFAULT (0) NOT NULL ,
1235
[display_on_posting] [int] DEFAULT (1) NOT NULL
1239
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
1240
CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
1246
CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY]
1251
Table: 'phpbb_styles'
1253
CREATE TABLE [phpbb_styles] (
1254
[style_id] [int] IDENTITY (1, 1) NOT NULL ,
1255
[style_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1256
[style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1257
[style_active] [int] DEFAULT (1) NOT NULL ,
1258
[template_id] [int] DEFAULT (0) NOT NULL ,
1259
[theme_id] [int] DEFAULT (0) NOT NULL ,
1260
[imageset_id] [int] DEFAULT (0) NOT NULL
1264
ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
1265
CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED
1271
CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
1274
CREATE INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY]
1277
CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY]
1280
CREATE INDEX [imageset_id] ON [phpbb_styles]([imageset_id]) ON [PRIMARY]
1285
Table: 'phpbb_styles_template'
1287
CREATE TABLE [phpbb_styles_template] (
1288
[template_id] [int] IDENTITY (1, 1) NOT NULL ,
1289
[template_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1290
[template_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1291
[template_path] [varchar] (100) DEFAULT ('') NOT NULL ,
1292
[bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
1293
[template_storedb] [int] DEFAULT (0) NOT NULL
1297
ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
1298
CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
1304
CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
1309
Table: 'phpbb_styles_template_data'
1311
CREATE TABLE [phpbb_styles_template_data] (
1312
[template_id] [int] DEFAULT (0) NOT NULL ,
1313
[template_filename] [varchar] (100) DEFAULT ('') NOT NULL ,
1314
[template_included] [varchar] (8000) DEFAULT ('') NOT NULL ,
1315
[template_mtime] [int] DEFAULT (0) NOT NULL ,
1316
[template_data] [text] DEFAULT ('') NOT NULL
1317
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1320
CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
1323
CREATE INDEX [tfn] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
1328
Table: 'phpbb_styles_theme'
1330
CREATE TABLE [phpbb_styles_theme] (
1331
[theme_id] [int] IDENTITY (1, 1) NOT NULL ,
1332
[theme_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1333
[theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1334
[theme_path] [varchar] (100) DEFAULT ('') NOT NULL ,
1335
[theme_storedb] [int] DEFAULT (0) NOT NULL ,
1336
[theme_mtime] [int] DEFAULT (0) NOT NULL ,
1337
[theme_data] [text] DEFAULT ('') NOT NULL
1338
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1341
ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
1342
CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
1348
CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
1353
Table: 'phpbb_styles_imageset'
1355
CREATE TABLE [phpbb_styles_imageset] (
1356
[imageset_id] [int] IDENTITY (1, 1) NOT NULL ,
1357
[imageset_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1358
[imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
1359
[imageset_path] [varchar] (100) DEFAULT ('') NOT NULL
1363
ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD
1364
CONSTRAINT [PK_phpbb_styles_imageset] PRIMARY KEY CLUSTERED
1370
CREATE UNIQUE INDEX [imgset_nm] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY]
1375
Table: 'phpbb_styles_imageset_data'
1377
CREATE TABLE [phpbb_styles_imageset_data] (
1378
[image_id] [int] IDENTITY (1, 1) NOT NULL ,
1379
[image_name] [varchar] (200) DEFAULT ('') NOT NULL ,
1380
[image_filename] [varchar] (200) DEFAULT ('') NOT NULL ,
1381
[image_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
1382
[image_height] [int] DEFAULT (0) NOT NULL ,
1383
[image_width] [int] DEFAULT (0) NOT NULL ,
1384
[imageset_id] [int] DEFAULT (0) NOT NULL
1388
ALTER TABLE [phpbb_styles_imageset_data] WITH NOCHECK ADD
1389
CONSTRAINT [PK_phpbb_styles_imageset_data] PRIMARY KEY CLUSTERED
1395
CREATE INDEX [i_d] ON [phpbb_styles_imageset_data]([imageset_id]) ON [PRIMARY]
1400
Table: 'phpbb_topics'
1402
CREATE TABLE [phpbb_topics] (
1403
[topic_id] [int] IDENTITY (1, 1) NOT NULL ,
1404
[forum_id] [int] DEFAULT (0) NOT NULL ,
1405
[icon_id] [int] DEFAULT (0) NOT NULL ,
1406
[topic_attachment] [int] DEFAULT (0) NOT NULL ,
1407
[topic_approved] [int] DEFAULT (1) NOT NULL ,
1408
[topic_reported] [int] DEFAULT (0) NOT NULL ,
1409
[topic_title] [varchar] (100) DEFAULT ('') NOT NULL ,
1410
[topic_poster] [int] DEFAULT (0) NOT NULL ,
1411
[topic_time] [int] DEFAULT (0) NOT NULL ,
1412
[topic_time_limit] [int] DEFAULT (0) NOT NULL ,
1413
[topic_views] [int] DEFAULT (0) NOT NULL ,
1414
[topic_replies] [int] DEFAULT (0) NOT NULL ,
1415
[topic_replies_real] [int] DEFAULT (0) NOT NULL ,
1416
[topic_status] [int] DEFAULT (0) NOT NULL ,
1417
[topic_type] [int] DEFAULT (0) NOT NULL ,
1418
[topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
1419
[topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1420
[topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
1421
[topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
1422
[topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
1423
[topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
1424
[topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
1425
[topic_last_post_subject] [varchar] (100) DEFAULT ('') NOT NULL ,
1426
[topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
1427
[topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
1428
[topic_moved_id] [int] DEFAULT (0) NOT NULL ,
1429
[topic_bumped] [int] DEFAULT (0) NOT NULL ,
1430
[topic_bumper] [int] DEFAULT (0) NOT NULL ,
1431
[poll_title] [varchar] (255) DEFAULT ('') NOT NULL ,
1432
[poll_start] [int] DEFAULT (0) NOT NULL ,
1433
[poll_length] [int] DEFAULT (0) NOT NULL ,
1434
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
1435
[poll_last_vote] [int] DEFAULT (0) NOT NULL ,
1436
[poll_vote_change] [int] DEFAULT (0) NOT NULL
1440
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
1441
CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
1447
CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY]
1450
CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY]
1453
CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY]
1456
CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY]
1459
CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY]
1462
CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY]
1467
Table: 'phpbb_topics_track'
1469
CREATE TABLE [phpbb_topics_track] (
1470
[user_id] [int] DEFAULT (0) NOT NULL ,
1471
[topic_id] [int] DEFAULT (0) NOT NULL ,
1472
[forum_id] [int] DEFAULT (0) NOT NULL ,
1473
[mark_time] [int] DEFAULT (0) NOT NULL
1477
ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
1478
CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED
1485
CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
1490
Table: 'phpbb_topics_posted'
1492
CREATE TABLE [phpbb_topics_posted] (
1493
[user_id] [int] DEFAULT (0) NOT NULL ,
1494
[topic_id] [int] DEFAULT (0) NOT NULL ,
1495
[topic_posted] [int] DEFAULT (0) NOT NULL
1499
ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD
1500
CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED
1509
Table: 'phpbb_topics_watch'
1511
CREATE TABLE [phpbb_topics_watch] (
1512
[topic_id] [int] DEFAULT (0) NOT NULL ,
1513
[user_id] [int] DEFAULT (0) NOT NULL ,
1514
[notify_status] [int] DEFAULT (0) NOT NULL
1518
CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY]
1521
CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY]
1524
CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY]
1529
Table: 'phpbb_user_group'
1531
CREATE TABLE [phpbb_user_group] (
1532
[group_id] [int] DEFAULT (0) NOT NULL ,
1533
[user_id] [int] DEFAULT (0) NOT NULL ,
1534
[group_leader] [int] DEFAULT (0) NOT NULL ,
1535
[user_pending] [int] DEFAULT (1) NOT NULL
1539
CREATE INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY]
1542
CREATE INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY]
1545
CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY]
1550
Table: 'phpbb_users'
1552
CREATE TABLE [phpbb_users] (
1553
[user_id] [int] IDENTITY (1, 1) NOT NULL ,
1554
[user_type] [int] DEFAULT (0) NOT NULL ,
1555
[group_id] [int] DEFAULT (3) NOT NULL ,
1556
[user_permissions] [text] DEFAULT ('') NOT NULL ,
1557
[user_perm_from] [int] DEFAULT (0) NOT NULL ,
1558
[user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
1559
[user_regdate] [int] DEFAULT (0) NOT NULL ,
1560
[username] [varchar] (255) DEFAULT ('') NOT NULL ,
1561
[username_clean] [varchar] (255) DEFAULT ('') NOT NULL ,
1562
[user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
1563
[user_passchg] [int] DEFAULT (0) NOT NULL ,
1564
[user_pass_convert] [int] DEFAULT (0) NOT NULL ,
1565
[user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
1566
[user_email_hash] [float] DEFAULT (0) NOT NULL ,
1567
[user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
1568
[user_lastvisit] [int] DEFAULT (0) NOT NULL ,
1569
[user_lastmark] [int] DEFAULT (0) NOT NULL ,
1570
[user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
1571
[user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
1572
[user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
1573
[user_last_search] [int] DEFAULT (0) NOT NULL ,
1574
[user_warnings] [int] DEFAULT (0) NOT NULL ,
1575
[user_last_warning] [int] DEFAULT (0) NOT NULL ,
1576
[user_login_attempts] [int] DEFAULT (0) NOT NULL ,
1577
[user_inactive_reason] [int] DEFAULT (0) NOT NULL ,
1578
[user_inactive_time] [int] DEFAULT (0) NOT NULL ,
1579
[user_posts] [int] DEFAULT (0) NOT NULL ,
1580
[user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
1581
[user_timezone] [float] DEFAULT (0) NOT NULL ,
1582
[user_dst] [int] DEFAULT (0) NOT NULL ,
1583
[user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
1584
[user_style] [int] DEFAULT (0) NOT NULL ,
1585
[user_rank] [int] DEFAULT (0) NOT NULL ,
1586
[user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
1587
[user_new_privmsg] [int] DEFAULT (0) NOT NULL ,
1588
[user_unread_privmsg] [int] DEFAULT (0) NOT NULL ,
1589
[user_last_privmsg] [int] DEFAULT (0) NOT NULL ,
1590
[user_message_rules] [int] DEFAULT (0) NOT NULL ,
1591
[user_full_folder] [int] DEFAULT (-3) NOT NULL ,
1592
[user_emailtime] [int] DEFAULT (0) NOT NULL ,
1593
[user_topic_show_days] [int] DEFAULT (0) NOT NULL ,
1594
[user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
1595
[user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL ,
1596
[user_post_show_days] [int] DEFAULT (0) NOT NULL ,
1597
[user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
1598
[user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL ,
1599
[user_notify] [int] DEFAULT (0) NOT NULL ,
1600
[user_notify_pm] [int] DEFAULT (1) NOT NULL ,
1601
[user_notify_type] [int] DEFAULT (0) NOT NULL ,
1602
[user_allow_pm] [int] DEFAULT (1) NOT NULL ,
1603
[user_allow_viewonline] [int] DEFAULT (1) NOT NULL ,
1604
[user_allow_viewemail] [int] DEFAULT (1) NOT NULL ,
1605
[user_allow_massemail] [int] DEFAULT (1) NOT NULL ,
1606
[user_options] [int] DEFAULT (895) NOT NULL ,
1607
[user_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
1608
[user_avatar_type] [int] DEFAULT (0) NOT NULL ,
1609
[user_avatar_width] [int] DEFAULT (0) NOT NULL ,
1610
[user_avatar_height] [int] DEFAULT (0) NOT NULL ,
1611
[user_sig] [text] DEFAULT ('') NOT NULL ,
1612
[user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
1613
[user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
1614
[user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
1615
[user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
1616
[user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
1617
[user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
1618
[user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
1619
[user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
1620
[user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
1621
[user_occ] [varchar] (4000) DEFAULT ('') NOT NULL ,
1622
[user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
1623
[user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
1624
[user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
1625
[user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL
1626
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
1629
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
1630
CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
1636
CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY]
1639
CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY]
1642
CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY]
1645
CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY]
1650
Table: 'phpbb_warnings'
1652
CREATE TABLE [phpbb_warnings] (
1653
[warning_id] [int] IDENTITY (1, 1) NOT NULL ,
1654
[user_id] [int] DEFAULT (0) NOT NULL ,
1655
[post_id] [int] DEFAULT (0) NOT NULL ,
1656
[log_id] [int] DEFAULT (0) NOT NULL ,
1657
[warning_time] [int] DEFAULT (0) NOT NULL
1661
ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD
1662
CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED
1670
Table: 'phpbb_words'
1672
CREATE TABLE [phpbb_words] (
1673
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
1674
[word] [varchar] (255) DEFAULT ('') NOT NULL ,
1675
[replacement] [varchar] (255) DEFAULT ('') NOT NULL
1679
ALTER TABLE [phpbb_words] WITH NOCHECK ADD
1680
CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
1688
Table: 'phpbb_zebra'
1690
CREATE TABLE [phpbb_zebra] (
1691
[user_id] [int] DEFAULT (0) NOT NULL ,
1692
[zebra_id] [int] DEFAULT (0) NOT NULL ,
1693
[friend] [int] DEFAULT (0) NOT NULL ,
1694
[foe] [int] DEFAULT (0) NOT NULL
1698
ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD
1699
CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED