2 * DO NOT EDIT THIS FILE, IT IS GENERATED
4 * To change the contents of this file, edit
5 * phpBB/develop/create_schema_files.php and
10 This first section is optional, however its probably the best method
11 of running phpBB on Oracle. If you already have a tablespace and user created
12 for phpBB you can leave this section commented out!
14 The first set of statements create a phpBB tablespace and a phpBB user,
15 make sure you change the password of the phpBB user before you run this script!!
19 CREATE TABLESPACE "PHPBB"
21 DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
23 AUTOEXTEND ON NEXT 10M
28 IDENTIFIED BY "phpbb_password"
29 DEFAULT TABLESPACE "PHPBB"
30 QUOTA UNLIMITED ON "PHPBB"
33 GRANT ANALYZE ANY TO "PHPBB";
34 GRANT CREATE SEQUENCE TO "PHPBB";
35 GRANT CREATE SESSION TO "PHPBB";
36 GRANT CREATE TABLE TO "PHPBB";
37 GRANT CREATE TRIGGER TO "PHPBB";
38 GRANT CREATE VIEW TO "PHPBB";
39 GRANT "CONNECT" TO "PHPBB";
44 CONNECT phpbb/phpbb_password;
47 Table: 'phpbb_attachments'
49 CREATE TABLE phpbb_attachments (
50 attach_id number(8) NOT NULL,
51 post_msg_id number(8) DEFAULT '0' NOT NULL,
52 topic_id number(8) DEFAULT '0' NOT NULL,
53 in_message number(1) DEFAULT '0' NOT NULL,
54 poster_id number(8) DEFAULT '0' NOT NULL,
55 is_orphan number(1) DEFAULT '1' NOT NULL,
56 physical_filename varchar2(255) DEFAULT '' ,
57 real_filename varchar2(255) DEFAULT '' ,
58 download_count number(8) DEFAULT '0' NOT NULL,
59 attach_comment clob DEFAULT '' ,
60 extension varchar2(100) DEFAULT '' ,
61 mimetype varchar2(100) DEFAULT '' ,
62 filesize number(20) DEFAULT '0' NOT NULL,
63 filetime number(11) DEFAULT '0' NOT NULL,
64 thumbnail number(1) DEFAULT '0' NOT NULL,
65 CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id)
69 CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime)
71 CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id)
73 CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id)
75 CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id)
77 CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan)
80 CREATE SEQUENCE phpbb_attachments_seq
83 CREATE OR REPLACE TRIGGER t_phpbb_attachments
84 BEFORE INSERT ON phpbb_attachments
86 new.attach_id IS NULL OR new.attach_id = 0
89 SELECT phpbb_attachments_seq.nextval
97 Table: 'phpbb_acl_groups'
99 CREATE TABLE phpbb_acl_groups (
100 group_id number(8) DEFAULT '0' NOT NULL,
101 forum_id number(8) DEFAULT '0' NOT NULL,
102 auth_option_id number(8) DEFAULT '0' NOT NULL,
103 auth_role_id number(8) DEFAULT '0' NOT NULL,
104 auth_setting number(2) DEFAULT '0' NOT NULL
108 CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id)
110 CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id)
112 CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id)
116 Table: 'phpbb_acl_options'
118 CREATE TABLE phpbb_acl_options (
119 auth_option_id number(8) NOT NULL,
120 auth_option varchar2(50) DEFAULT '' ,
121 is_global number(1) DEFAULT '0' NOT NULL,
122 is_local number(1) DEFAULT '0' NOT NULL,
123 founder_only number(1) DEFAULT '0' NOT NULL,
124 CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id),
125 CONSTRAINT u_phpbb_auth_option UNIQUE (auth_option)
130 CREATE SEQUENCE phpbb_acl_options_seq
133 CREATE OR REPLACE TRIGGER t_phpbb_acl_options
134 BEFORE INSERT ON phpbb_acl_options
136 new.auth_option_id IS NULL OR new.auth_option_id = 0
139 SELECT phpbb_acl_options_seq.nextval
140 INTO :new.auth_option_id
147 Table: 'phpbb_acl_roles'
149 CREATE TABLE phpbb_acl_roles (
150 role_id number(8) NOT NULL,
151 role_name varchar2(765) DEFAULT '' ,
152 role_description clob DEFAULT '' ,
153 role_type varchar2(10) DEFAULT '' ,
154 role_order number(4) DEFAULT '0' NOT NULL,
155 CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id)
159 CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type)
161 CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order)
164 CREATE SEQUENCE phpbb_acl_roles_seq
167 CREATE OR REPLACE TRIGGER t_phpbb_acl_roles
168 BEFORE INSERT ON phpbb_acl_roles
170 new.role_id IS NULL OR new.role_id = 0
173 SELECT phpbb_acl_roles_seq.nextval
181 Table: 'phpbb_acl_roles_data'
183 CREATE TABLE phpbb_acl_roles_data (
184 role_id number(8) DEFAULT '0' NOT NULL,
185 auth_option_id number(8) DEFAULT '0' NOT NULL,
186 auth_setting number(2) DEFAULT '0' NOT NULL,
187 CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id)
191 CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id)
195 Table: 'phpbb_acl_users'
197 CREATE TABLE phpbb_acl_users (
198 user_id number(8) DEFAULT '0' NOT NULL,
199 forum_id number(8) DEFAULT '0' NOT NULL,
200 auth_option_id number(8) DEFAULT '0' NOT NULL,
201 auth_role_id number(8) DEFAULT '0' NOT NULL,
202 auth_setting number(2) DEFAULT '0' NOT NULL
206 CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id)
208 CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
210 CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
214 Table: 'phpbb_banlist'
216 CREATE TABLE phpbb_banlist (
217 ban_id number(8) NOT NULL,
218 ban_userid number(8) DEFAULT '0' NOT NULL,
219 ban_ip varchar2(40) DEFAULT '' ,
220 ban_email varchar2(300) DEFAULT '' ,
221 ban_start number(11) DEFAULT '0' NOT NULL,
222 ban_end number(11) DEFAULT '0' NOT NULL,
223 ban_exclude number(1) DEFAULT '0' NOT NULL,
224 ban_reason varchar2(765) DEFAULT '' ,
225 ban_give_reason varchar2(765) DEFAULT '' ,
226 CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
230 CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end)
232 CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude)
234 CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude)
236 CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude)
239 CREATE SEQUENCE phpbb_banlist_seq
242 CREATE OR REPLACE TRIGGER t_phpbb_banlist
243 BEFORE INSERT ON phpbb_banlist
245 new.ban_id IS NULL OR new.ban_id = 0
248 SELECT phpbb_banlist_seq.nextval
256 Table: 'phpbb_bbcodes'
258 CREATE TABLE phpbb_bbcodes (
259 bbcode_id number(4) DEFAULT '0' NOT NULL,
260 bbcode_tag varchar2(16) DEFAULT '' ,
261 bbcode_helpline varchar2(765) DEFAULT '' ,
262 display_on_posting number(1) DEFAULT '0' NOT NULL,
263 bbcode_match clob DEFAULT '' ,
264 bbcode_tpl clob DEFAULT '' ,
265 first_pass_match clob DEFAULT '' ,
266 first_pass_replace clob DEFAULT '' ,
267 second_pass_match clob DEFAULT '' ,
268 second_pass_replace clob DEFAULT '' ,
269 CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
273 CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
277 Table: 'phpbb_bookmarks'
279 CREATE TABLE phpbb_bookmarks (
280 topic_id number(8) DEFAULT '0' NOT NULL,
281 user_id number(8) DEFAULT '0' NOT NULL,
282 CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id)
290 CREATE TABLE phpbb_bots (
291 bot_id number(8) NOT NULL,
292 bot_active number(1) DEFAULT '1' NOT NULL,
293 bot_name varchar2(765) DEFAULT '' ,
294 user_id number(8) DEFAULT '0' NOT NULL,
295 bot_agent varchar2(255) DEFAULT '' ,
296 bot_ip varchar2(255) DEFAULT '' ,
297 CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id)
301 CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active)
304 CREATE SEQUENCE phpbb_bots_seq
307 CREATE OR REPLACE TRIGGER t_phpbb_bots
308 BEFORE INSERT ON phpbb_bots
310 new.bot_id IS NULL OR new.bot_id = 0
313 SELECT phpbb_bots_seq.nextval
321 Table: 'phpbb_config'
323 CREATE TABLE phpbb_config (
324 config_name varchar2(255) DEFAULT '' ,
325 config_value varchar2(765) DEFAULT '' ,
326 is_dynamic number(1) DEFAULT '0' NOT NULL,
327 CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name)
331 CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic)
335 Table: 'phpbb_confirm'
337 CREATE TABLE phpbb_confirm (
338 confirm_id char(32) DEFAULT '' ,
339 session_id char(32) DEFAULT '' ,
340 confirm_type number(3) DEFAULT '0' NOT NULL,
341 code varchar2(8) DEFAULT '' ,
342 seed number(10) DEFAULT '0' NOT NULL,
343 attempts number(8) DEFAULT '0' NOT NULL,
344 CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id)
348 CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type)
352 Table: 'phpbb_disallow'
354 CREATE TABLE phpbb_disallow (
355 disallow_id number(8) NOT NULL,
356 disallow_username varchar2(765) DEFAULT '' ,
357 CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id)
362 CREATE SEQUENCE phpbb_disallow_seq
365 CREATE OR REPLACE TRIGGER t_phpbb_disallow
366 BEFORE INSERT ON phpbb_disallow
368 new.disallow_id IS NULL OR new.disallow_id = 0
371 SELECT phpbb_disallow_seq.nextval
372 INTO :new.disallow_id
379 Table: 'phpbb_drafts'
381 CREATE TABLE phpbb_drafts (
382 draft_id number(8) NOT NULL,
383 user_id number(8) DEFAULT '0' NOT NULL,
384 topic_id number(8) DEFAULT '0' NOT NULL,
385 forum_id number(8) DEFAULT '0' NOT NULL,
386 save_time number(11) DEFAULT '0' NOT NULL,
387 draft_subject varchar2(765) DEFAULT '' ,
388 draft_message clob DEFAULT '' ,
389 CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id)
393 CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time)
396 CREATE SEQUENCE phpbb_drafts_seq
399 CREATE OR REPLACE TRIGGER t_phpbb_drafts
400 BEFORE INSERT ON phpbb_drafts
402 new.draft_id IS NULL OR new.draft_id = 0
405 SELECT phpbb_drafts_seq.nextval
413 Table: 'phpbb_extensions'
415 CREATE TABLE phpbb_extensions (
416 extension_id number(8) NOT NULL,
417 group_id number(8) DEFAULT '0' NOT NULL,
418 extension varchar2(100) DEFAULT '' ,
419 CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id)
424 CREATE SEQUENCE phpbb_extensions_seq
427 CREATE OR REPLACE TRIGGER t_phpbb_extensions
428 BEFORE INSERT ON phpbb_extensions
430 new.extension_id IS NULL OR new.extension_id = 0
433 SELECT phpbb_extensions_seq.nextval
434 INTO :new.extension_id
441 Table: 'phpbb_extension_groups'
443 CREATE TABLE phpbb_extension_groups (
444 group_id number(8) NOT NULL,
445 group_name varchar2(765) DEFAULT '' ,
446 cat_id number(2) DEFAULT '0' NOT NULL,
447 allow_group number(1) DEFAULT '0' NOT NULL,
448 download_mode number(1) DEFAULT '1' NOT NULL,
449 upload_icon varchar2(255) DEFAULT '' ,
450 max_filesize number(20) DEFAULT '0' NOT NULL,
451 allowed_forums clob DEFAULT '' ,
452 allow_in_pm number(1) DEFAULT '0' NOT NULL,
453 CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id)
458 CREATE SEQUENCE phpbb_extension_groups_seq
461 CREATE OR REPLACE TRIGGER t_phpbb_extension_groups
462 BEFORE INSERT ON phpbb_extension_groups
464 new.group_id IS NULL OR new.group_id = 0
467 SELECT phpbb_extension_groups_seq.nextval
475 Table: 'phpbb_forums'
477 CREATE TABLE phpbb_forums (
478 forum_id number(8) NOT NULL,
479 parent_id number(8) DEFAULT '0' NOT NULL,
480 left_id number(8) DEFAULT '0' NOT NULL,
481 right_id number(8) DEFAULT '0' NOT NULL,
482 forum_parents clob DEFAULT '' ,
483 forum_name varchar2(765) DEFAULT '' ,
484 forum_desc clob DEFAULT '' ,
485 forum_desc_bitfield varchar2(255) DEFAULT '' ,
486 forum_desc_options number(11) DEFAULT '7' NOT NULL,
487 forum_desc_uid varchar2(8) DEFAULT '' ,
488 forum_link varchar2(765) DEFAULT '' ,
489 forum_password varchar2(120) DEFAULT '' ,
490 forum_style number(8) DEFAULT '0' NOT NULL,
491 forum_image varchar2(255) DEFAULT '' ,
492 forum_rules clob DEFAULT '' ,
493 forum_rules_link varchar2(765) DEFAULT '' ,
494 forum_rules_bitfield varchar2(255) DEFAULT '' ,
495 forum_rules_options number(11) DEFAULT '7' NOT NULL,
496 forum_rules_uid varchar2(8) DEFAULT '' ,
497 forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
498 forum_type number(4) DEFAULT '0' NOT NULL,
499 forum_status number(4) DEFAULT '0' NOT NULL,
500 forum_posts number(8) DEFAULT '0' NOT NULL,
501 forum_topics number(8) DEFAULT '0' NOT NULL,
502 forum_topics_real number(8) DEFAULT '0' NOT NULL,
503 forum_last_post_id number(8) DEFAULT '0' NOT NULL,
504 forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
505 forum_last_post_subject varchar2(765) DEFAULT '' ,
506 forum_last_post_time number(11) DEFAULT '0' NOT NULL,
507 forum_last_poster_name varchar2(765) DEFAULT '' ,
508 forum_last_poster_colour varchar2(6) DEFAULT '' ,
509 forum_flags number(4) DEFAULT '32' NOT NULL,
510 forum_options number(20) DEFAULT '0' NOT NULL,
511 display_subforum_list number(1) DEFAULT '1' NOT NULL,
512 display_on_index number(1) DEFAULT '1' NOT NULL,
513 enable_indexing number(1) DEFAULT '1' NOT NULL,
514 enable_icons number(1) DEFAULT '1' NOT NULL,
515 enable_prune number(1) DEFAULT '0' NOT NULL,
516 prune_next number(11) DEFAULT '0' NOT NULL,
517 prune_days number(8) DEFAULT '0' NOT NULL,
518 prune_viewed number(8) DEFAULT '0' NOT NULL,
519 prune_freq number(8) DEFAULT '0' NOT NULL,
520 CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id)
524 CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id)
526 CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id)
529 CREATE SEQUENCE phpbb_forums_seq
532 CREATE OR REPLACE TRIGGER t_phpbb_forums
533 BEFORE INSERT ON phpbb_forums
535 new.forum_id IS NULL OR new.forum_id = 0
538 SELECT phpbb_forums_seq.nextval
546 Table: 'phpbb_forums_access'
548 CREATE TABLE phpbb_forums_access (
549 forum_id number(8) DEFAULT '0' NOT NULL,
550 user_id number(8) DEFAULT '0' NOT NULL,
551 session_id char(32) DEFAULT '' ,
552 CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id)
558 Table: 'phpbb_forums_track'
560 CREATE TABLE phpbb_forums_track (
561 user_id number(8) DEFAULT '0' NOT NULL,
562 forum_id number(8) DEFAULT '0' NOT NULL,
563 mark_time number(11) DEFAULT '0' NOT NULL,
564 CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id)
570 Table: 'phpbb_forums_watch'
572 CREATE TABLE phpbb_forums_watch (
573 forum_id number(8) DEFAULT '0' NOT NULL,
574 user_id number(8) DEFAULT '0' NOT NULL,
575 notify_status number(1) DEFAULT '0' NOT NULL
579 CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id)
581 CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id)
583 CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status)
587 Table: 'phpbb_groups'
589 CREATE TABLE phpbb_groups (
590 group_id number(8) NOT NULL,
591 group_type number(4) DEFAULT '1' NOT NULL,
592 group_founder_manage number(1) DEFAULT '0' NOT NULL,
593 group_skip_auth number(1) DEFAULT '0' NOT NULL,
594 group_name varchar2(255) DEFAULT '' ,
595 group_desc clob DEFAULT '' ,
596 group_desc_bitfield varchar2(255) DEFAULT '' ,
597 group_desc_options number(11) DEFAULT '7' NOT NULL,
598 group_desc_uid varchar2(8) DEFAULT '' ,
599 group_display number(1) DEFAULT '0' NOT NULL,
600 group_avatar varchar2(255) DEFAULT '' ,
601 group_avatar_type number(2) DEFAULT '0' NOT NULL,
602 group_avatar_width number(4) DEFAULT '0' NOT NULL,
603 group_avatar_height number(4) DEFAULT '0' NOT NULL,
604 group_rank number(8) DEFAULT '0' NOT NULL,
605 group_colour varchar2(6) DEFAULT '' ,
606 group_sig_chars number(8) DEFAULT '0' NOT NULL,
607 group_receive_pm number(1) DEFAULT '0' NOT NULL,
608 group_message_limit number(8) DEFAULT '0' NOT NULL,
609 group_max_recipients number(8) DEFAULT '0' NOT NULL,
610 group_legend number(1) DEFAULT '1' NOT NULL,
611 CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id)
615 CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name)
618 CREATE SEQUENCE phpbb_groups_seq
621 CREATE OR REPLACE TRIGGER t_phpbb_groups
622 BEFORE INSERT ON phpbb_groups
624 new.group_id IS NULL OR new.group_id = 0
627 SELECT phpbb_groups_seq.nextval
637 CREATE TABLE phpbb_icons (
638 icons_id number(8) NOT NULL,
639 icons_url varchar2(255) DEFAULT '' ,
640 icons_width number(4) DEFAULT '0' NOT NULL,
641 icons_height number(4) DEFAULT '0' NOT NULL,
642 icons_order number(8) DEFAULT '0' NOT NULL,
643 display_on_posting number(1) DEFAULT '1' NOT NULL,
644 CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id)
648 CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting)
651 CREATE SEQUENCE phpbb_icons_seq
654 CREATE OR REPLACE TRIGGER t_phpbb_icons
655 BEFORE INSERT ON phpbb_icons
657 new.icons_id IS NULL OR new.icons_id = 0
660 SELECT phpbb_icons_seq.nextval
670 CREATE TABLE phpbb_lang (
671 lang_id number(4) NOT NULL,
672 lang_iso varchar2(30) DEFAULT '' ,
673 lang_dir varchar2(30) DEFAULT '' ,
674 lang_english_name varchar2(300) DEFAULT '' ,
675 lang_local_name varchar2(765) DEFAULT '' ,
676 lang_author varchar2(765) DEFAULT '' ,
677 CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id)
681 CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso)
684 CREATE SEQUENCE phpbb_lang_seq
687 CREATE OR REPLACE TRIGGER t_phpbb_lang
688 BEFORE INSERT ON phpbb_lang
690 new.lang_id IS NULL OR new.lang_id = 0
693 SELECT phpbb_lang_seq.nextval
703 CREATE TABLE phpbb_log (
704 log_id number(8) NOT NULL,
705 log_type number(4) DEFAULT '0' NOT NULL,
706 user_id number(8) DEFAULT '0' NOT NULL,
707 forum_id number(8) DEFAULT '0' NOT NULL,
708 topic_id number(8) DEFAULT '0' NOT NULL,
709 reportee_id number(8) DEFAULT '0' NOT NULL,
710 log_ip varchar2(40) DEFAULT '' ,
711 log_time number(11) DEFAULT '0' NOT NULL,
712 log_operation clob DEFAULT '' ,
713 log_data clob DEFAULT '' ,
714 CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id)
718 CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
720 CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
722 CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
724 CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id)
726 CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id)
729 CREATE SEQUENCE phpbb_log_seq
732 CREATE OR REPLACE TRIGGER t_phpbb_log
733 BEFORE INSERT ON phpbb_log
735 new.log_id IS NULL OR new.log_id = 0
738 SELECT phpbb_log_seq.nextval
746 Table: 'phpbb_login_attempts'
748 CREATE TABLE phpbb_login_attempts (
749 attempt_ip varchar2(40) DEFAULT '' ,
750 attempt_browser varchar2(150) DEFAULT '' ,
751 attempt_forwarded_for varchar2(255) DEFAULT '' ,
752 attempt_time number(11) DEFAULT '0' NOT NULL,
753 user_id number(8) DEFAULT '0' NOT NULL,
754 username varchar2(765) DEFAULT '0' NOT NULL,
755 username_clean varchar2(255) DEFAULT '0' NOT NULL
759 CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time)
761 CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time)
763 CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time)
765 CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id)
769 Table: 'phpbb_moderator_cache'
771 CREATE TABLE phpbb_moderator_cache (
772 forum_id number(8) DEFAULT '0' NOT NULL,
773 user_id number(8) DEFAULT '0' NOT NULL,
774 username varchar2(765) DEFAULT '' ,
775 group_id number(8) DEFAULT '0' NOT NULL,
776 group_name varchar2(765) DEFAULT '' ,
777 display_on_index number(1) DEFAULT '1' NOT NULL
781 CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index)
783 CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id)
787 Table: 'phpbb_modules'
789 CREATE TABLE phpbb_modules (
790 module_id number(8) NOT NULL,
791 module_enabled number(1) DEFAULT '1' NOT NULL,
792 module_display number(1) DEFAULT '1' NOT NULL,
793 module_basename varchar2(255) DEFAULT '' ,
794 module_class varchar2(10) DEFAULT '' ,
795 parent_id number(8) DEFAULT '0' NOT NULL,
796 left_id number(8) DEFAULT '0' NOT NULL,
797 right_id number(8) DEFAULT '0' NOT NULL,
798 module_langname varchar2(255) DEFAULT '' ,
799 module_mode varchar2(255) DEFAULT '' ,
800 module_auth varchar2(255) DEFAULT '' ,
801 CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id)
805 CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id)
807 CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled)
809 CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id)
812 CREATE SEQUENCE phpbb_modules_seq
815 CREATE OR REPLACE TRIGGER t_phpbb_modules
816 BEFORE INSERT ON phpbb_modules
818 new.module_id IS NULL OR new.module_id = 0
821 SELECT phpbb_modules_seq.nextval
829 Table: 'phpbb_poll_options'
831 CREATE TABLE phpbb_poll_options (
832 poll_option_id number(4) DEFAULT '0' NOT NULL,
833 topic_id number(8) DEFAULT '0' NOT NULL,
834 poll_option_text clob DEFAULT '' ,
835 poll_option_total number(8) DEFAULT '0' NOT NULL
839 CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id)
841 CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id)
845 Table: 'phpbb_poll_votes'
847 CREATE TABLE phpbb_poll_votes (
848 topic_id number(8) DEFAULT '0' NOT NULL,
849 poll_option_id number(4) DEFAULT '0' NOT NULL,
850 vote_user_id number(8) DEFAULT '0' NOT NULL,
851 vote_user_ip varchar2(40) DEFAULT ''
855 CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id)
857 CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id)
859 CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip)
865 CREATE TABLE phpbb_posts (
866 post_id number(8) NOT NULL,
867 topic_id number(8) DEFAULT '0' NOT NULL,
868 forum_id number(8) DEFAULT '0' NOT NULL,
869 poster_id number(8) DEFAULT '0' NOT NULL,
870 icon_id number(8) DEFAULT '0' NOT NULL,
871 poster_ip varchar2(40) DEFAULT '' ,
872 post_time number(11) DEFAULT '0' NOT NULL,
873 post_approved number(1) DEFAULT '1' NOT NULL,
874 post_reported number(1) DEFAULT '0' NOT NULL,
875 enable_bbcode number(1) DEFAULT '1' NOT NULL,
876 enable_smilies number(1) DEFAULT '1' NOT NULL,
877 enable_magic_url number(1) DEFAULT '1' NOT NULL,
878 enable_sig number(1) DEFAULT '1' NOT NULL,
879 post_username varchar2(765) DEFAULT '' ,
880 post_subject varchar2(765) DEFAULT '' ,
881 post_text clob DEFAULT '' ,
882 post_checksum varchar2(32) DEFAULT '' ,
883 post_attachment number(1) DEFAULT '0' NOT NULL,
884 bbcode_bitfield varchar2(255) DEFAULT '' ,
885 bbcode_uid varchar2(8) DEFAULT '' ,
886 post_postcount number(1) DEFAULT '1' NOT NULL,
887 post_edit_time number(11) DEFAULT '0' NOT NULL,
888 post_edit_reason varchar2(765) DEFAULT '' ,
889 post_edit_user number(8) DEFAULT '0' NOT NULL,
890 post_edit_count number(4) DEFAULT '0' NOT NULL,
891 post_edit_locked number(1) DEFAULT '0' NOT NULL,
892 CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
896 CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id)
898 CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id)
900 CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip)
902 CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
904 CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
906 CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username)
908 CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time)
911 CREATE SEQUENCE phpbb_posts_seq
914 CREATE OR REPLACE TRIGGER t_phpbb_posts
915 BEFORE INSERT ON phpbb_posts
917 new.post_id IS NULL OR new.post_id = 0
920 SELECT phpbb_posts_seq.nextval
928 Table: 'phpbb_privmsgs'
930 CREATE TABLE phpbb_privmsgs (
931 msg_id number(8) NOT NULL,
932 root_level number(8) DEFAULT '0' NOT NULL,
933 author_id number(8) DEFAULT '0' NOT NULL,
934 icon_id number(8) DEFAULT '0' NOT NULL,
935 author_ip varchar2(40) DEFAULT '' ,
936 message_time number(11) DEFAULT '0' NOT NULL,
937 enable_bbcode number(1) DEFAULT '1' NOT NULL,
938 enable_smilies number(1) DEFAULT '1' NOT NULL,
939 enable_magic_url number(1) DEFAULT '1' NOT NULL,
940 enable_sig number(1) DEFAULT '1' NOT NULL,
941 message_subject varchar2(765) DEFAULT '' ,
942 message_text clob DEFAULT '' ,
943 message_edit_reason varchar2(765) DEFAULT '' ,
944 message_edit_user number(8) DEFAULT '0' NOT NULL,
945 message_attachment number(1) DEFAULT '0' NOT NULL,
946 bbcode_bitfield varchar2(255) DEFAULT '' ,
947 bbcode_uid varchar2(8) DEFAULT '' ,
948 message_edit_time number(11) DEFAULT '0' NOT NULL,
949 message_edit_count number(4) DEFAULT '0' NOT NULL,
950 to_address clob DEFAULT '' ,
951 bcc_address clob DEFAULT '' ,
952 message_reported number(1) DEFAULT '0' NOT NULL,
953 CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id)
957 CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip)
959 CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time)
961 CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id)
963 CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level)
966 CREATE SEQUENCE phpbb_privmsgs_seq
969 CREATE OR REPLACE TRIGGER t_phpbb_privmsgs
970 BEFORE INSERT ON phpbb_privmsgs
972 new.msg_id IS NULL OR new.msg_id = 0
975 SELECT phpbb_privmsgs_seq.nextval
983 Table: 'phpbb_privmsgs_folder'
985 CREATE TABLE phpbb_privmsgs_folder (
986 folder_id number(8) NOT NULL,
987 user_id number(8) DEFAULT '0' NOT NULL,
988 folder_name varchar2(765) DEFAULT '' ,
989 pm_count number(8) DEFAULT '0' NOT NULL,
990 CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id)
994 CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id)
997 CREATE SEQUENCE phpbb_privmsgs_folder_seq
1000 CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder
1001 BEFORE INSERT ON phpbb_privmsgs_folder
1003 new.folder_id IS NULL OR new.folder_id = 0
1006 SELECT phpbb_privmsgs_folder_seq.nextval
1014 Table: 'phpbb_privmsgs_rules'
1016 CREATE TABLE phpbb_privmsgs_rules (
1017 rule_id number(8) NOT NULL,
1018 user_id number(8) DEFAULT '0' NOT NULL,
1019 rule_check number(8) DEFAULT '0' NOT NULL,
1020 rule_connection number(8) DEFAULT '0' NOT NULL,
1021 rule_string varchar2(765) DEFAULT '' ,
1022 rule_user_id number(8) DEFAULT '0' NOT NULL,
1023 rule_group_id number(8) DEFAULT '0' NOT NULL,
1024 rule_action number(8) DEFAULT '0' NOT NULL,
1025 rule_folder_id number(11) DEFAULT '0' NOT NULL,
1026 CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id)
1030 CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id)
1033 CREATE SEQUENCE phpbb_privmsgs_rules_seq
1036 CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules
1037 BEFORE INSERT ON phpbb_privmsgs_rules
1039 new.rule_id IS NULL OR new.rule_id = 0
1042 SELECT phpbb_privmsgs_rules_seq.nextval
1050 Table: 'phpbb_privmsgs_to'
1052 CREATE TABLE phpbb_privmsgs_to (
1053 msg_id number(8) DEFAULT '0' NOT NULL,
1054 user_id number(8) DEFAULT '0' NOT NULL,
1055 author_id number(8) DEFAULT '0' NOT NULL,
1056 pm_deleted number(1) DEFAULT '0' NOT NULL,
1057 pm_new number(1) DEFAULT '1' NOT NULL,
1058 pm_unread number(1) DEFAULT '1' NOT NULL,
1059 pm_replied number(1) DEFAULT '0' NOT NULL,
1060 pm_marked number(1) DEFAULT '0' NOT NULL,
1061 pm_forwarded number(1) DEFAULT '0' NOT NULL,
1062 folder_id number(11) DEFAULT '0' NOT NULL
1066 CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id)
1068 CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id)
1070 CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id)
1074 Table: 'phpbb_profile_fields'
1076 CREATE TABLE phpbb_profile_fields (
1077 field_id number(8) NOT NULL,
1078 field_name varchar2(765) DEFAULT '' ,
1079 field_type number(4) DEFAULT '0' NOT NULL,
1080 field_ident varchar2(20) DEFAULT '' ,
1081 field_length varchar2(20) DEFAULT '' ,
1082 field_minlen varchar2(255) DEFAULT '' ,
1083 field_maxlen varchar2(255) DEFAULT '' ,
1084 field_novalue varchar2(765) DEFAULT '' ,
1085 field_default_value varchar2(765) DEFAULT '' ,
1086 field_validation varchar2(60) DEFAULT '' ,
1087 field_required number(1) DEFAULT '0' NOT NULL,
1088 field_show_on_reg number(1) DEFAULT '0' NOT NULL,
1089 field_show_on_vt number(1) DEFAULT '0' NOT NULL,
1090 field_show_profile number(1) DEFAULT '0' NOT NULL,
1091 field_hide number(1) DEFAULT '0' NOT NULL,
1092 field_no_view number(1) DEFAULT '0' NOT NULL,
1093 field_active number(1) DEFAULT '0' NOT NULL,
1094 field_order number(8) DEFAULT '0' NOT NULL,
1095 CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id)
1099 CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type)
1101 CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
1104 CREATE SEQUENCE phpbb_profile_fields_seq
1107 CREATE OR REPLACE TRIGGER t_phpbb_profile_fields
1108 BEFORE INSERT ON phpbb_profile_fields
1110 new.field_id IS NULL OR new.field_id = 0
1113 SELECT phpbb_profile_fields_seq.nextval
1121 Table: 'phpbb_profile_fields_data'
1123 CREATE TABLE phpbb_profile_fields_data (
1124 user_id number(8) DEFAULT '0' NOT NULL,
1125 CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
1131 Table: 'phpbb_profile_fields_lang'
1133 CREATE TABLE phpbb_profile_fields_lang (
1134 field_id number(8) DEFAULT '0' NOT NULL,
1135 lang_id number(8) DEFAULT '0' NOT NULL,
1136 option_id number(8) DEFAULT '0' NOT NULL,
1137 field_type number(4) DEFAULT '0' NOT NULL,
1138 lang_value varchar2(765) DEFAULT '' ,
1139 CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
1145 Table: 'phpbb_profile_lang'
1147 CREATE TABLE phpbb_profile_lang (
1148 field_id number(8) DEFAULT '0' NOT NULL,
1149 lang_id number(8) DEFAULT '0' NOT NULL,
1150 lang_name varchar2(765) DEFAULT '' ,
1151 lang_explain clob DEFAULT '' ,
1152 lang_default_value varchar2(765) DEFAULT '' ,
1153 CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id)
1159 Table: 'phpbb_ranks'
1161 CREATE TABLE phpbb_ranks (
1162 rank_id number(8) NOT NULL,
1163 rank_title varchar2(765) DEFAULT '' ,
1164 rank_min number(8) DEFAULT '0' NOT NULL,
1165 rank_special number(1) DEFAULT '0' NOT NULL,
1166 rank_image varchar2(255) DEFAULT '' ,
1167 CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id)
1172 CREATE SEQUENCE phpbb_ranks_seq
1175 CREATE OR REPLACE TRIGGER t_phpbb_ranks
1176 BEFORE INSERT ON phpbb_ranks
1178 new.rank_id IS NULL OR new.rank_id = 0
1181 SELECT phpbb_ranks_seq.nextval
1189 Table: 'phpbb_reports'
1191 CREATE TABLE phpbb_reports (
1192 report_id number(8) NOT NULL,
1193 reason_id number(4) DEFAULT '0' NOT NULL,
1194 post_id number(8) DEFAULT '0' NOT NULL,
1195 pm_id number(8) DEFAULT '0' NOT NULL,
1196 user_id number(8) DEFAULT '0' NOT NULL,
1197 user_notify number(1) DEFAULT '0' NOT NULL,
1198 report_closed number(1) DEFAULT '0' NOT NULL,
1199 report_time number(11) DEFAULT '0' NOT NULL,
1200 report_text clob DEFAULT '' ,
1201 CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
1205 CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id)
1207 CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id)
1210 CREATE SEQUENCE phpbb_reports_seq
1213 CREATE OR REPLACE TRIGGER t_phpbb_reports
1214 BEFORE INSERT ON phpbb_reports
1216 new.report_id IS NULL OR new.report_id = 0
1219 SELECT phpbb_reports_seq.nextval
1227 Table: 'phpbb_reports_reasons'
1229 CREATE TABLE phpbb_reports_reasons (
1230 reason_id number(4) NOT NULL,
1231 reason_title varchar2(765) DEFAULT '' ,
1232 reason_description clob DEFAULT '' ,
1233 reason_order number(4) DEFAULT '0' NOT NULL,
1234 CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
1239 CREATE SEQUENCE phpbb_reports_reasons_seq
1242 CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons
1243 BEFORE INSERT ON phpbb_reports_reasons
1245 new.reason_id IS NULL OR new.reason_id = 0
1248 SELECT phpbb_reports_reasons_seq.nextval
1256 Table: 'phpbb_search_results'
1258 CREATE TABLE phpbb_search_results (
1259 search_key varchar2(32) DEFAULT '' ,
1260 search_time number(11) DEFAULT '0' NOT NULL,
1261 search_keywords clob DEFAULT '' ,
1262 search_authors clob DEFAULT '' ,
1263 CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key)
1269 Table: 'phpbb_search_wordlist'
1271 CREATE TABLE phpbb_search_wordlist (
1272 word_id number(8) NOT NULL,
1273 word_text varchar2(765) DEFAULT '' ,
1274 word_common number(1) DEFAULT '0' NOT NULL,
1275 word_count number(8) DEFAULT '0' NOT NULL,
1276 CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id),
1277 CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text)
1281 CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count)
1284 CREATE SEQUENCE phpbb_search_wordlist_seq
1287 CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist
1288 BEFORE INSERT ON phpbb_search_wordlist
1290 new.word_id IS NULL OR new.word_id = 0
1293 SELECT phpbb_search_wordlist_seq.nextval
1301 Table: 'phpbb_search_wordmatch'
1303 CREATE TABLE phpbb_search_wordmatch (
1304 post_id number(8) DEFAULT '0' NOT NULL,
1305 word_id number(8) DEFAULT '0' NOT NULL,
1306 title_match number(1) DEFAULT '0' NOT NULL,
1307 CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match)
1311 CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id)
1313 CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id)
1317 Table: 'phpbb_sessions'
1319 CREATE TABLE phpbb_sessions (
1320 session_id char(32) DEFAULT '' ,
1321 session_user_id number(8) DEFAULT '0' NOT NULL,
1322 session_forum_id number(8) DEFAULT '0' NOT NULL,
1323 session_last_visit number(11) DEFAULT '0' NOT NULL,
1324 session_start number(11) DEFAULT '0' NOT NULL,
1325 session_time number(11) DEFAULT '0' NOT NULL,
1326 session_ip varchar2(40) DEFAULT '' ,
1327 session_browser varchar2(150) DEFAULT '' ,
1328 session_forwarded_for varchar2(255) DEFAULT '' ,
1329 session_page varchar2(765) DEFAULT '' ,
1330 session_viewonline number(1) DEFAULT '1' NOT NULL,
1331 session_autologin number(1) DEFAULT '0' NOT NULL,
1332 session_admin number(1) DEFAULT '0' NOT NULL,
1333 CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id)
1337 CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time)
1339 CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id)
1341 CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id)
1345 Table: 'phpbb_sessions_keys'
1347 CREATE TABLE phpbb_sessions_keys (
1348 key_id char(32) DEFAULT '' ,
1349 user_id number(8) DEFAULT '0' NOT NULL,
1350 last_ip varchar2(40) DEFAULT '' ,
1351 last_login number(11) DEFAULT '0' NOT NULL,
1352 CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id)
1356 CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login)
1360 Table: 'phpbb_sitelist'
1362 CREATE TABLE phpbb_sitelist (
1363 site_id number(8) NOT NULL,
1364 site_ip varchar2(40) DEFAULT '' ,
1365 site_hostname varchar2(255) DEFAULT '' ,
1366 ip_exclude number(1) DEFAULT '0' NOT NULL,
1367 CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id)
1372 CREATE SEQUENCE phpbb_sitelist_seq
1375 CREATE OR REPLACE TRIGGER t_phpbb_sitelist
1376 BEFORE INSERT ON phpbb_sitelist
1378 new.site_id IS NULL OR new.site_id = 0
1381 SELECT phpbb_sitelist_seq.nextval
1389 Table: 'phpbb_smilies'
1391 CREATE TABLE phpbb_smilies (
1392 smiley_id number(8) NOT NULL,
1393 code varchar2(150) DEFAULT '' ,
1394 emotion varchar2(150) DEFAULT '' ,
1395 smiley_url varchar2(50) DEFAULT '' ,
1396 smiley_width number(4) DEFAULT '0' NOT NULL,
1397 smiley_height number(4) DEFAULT '0' NOT NULL,
1398 smiley_order number(8) DEFAULT '0' NOT NULL,
1399 display_on_posting number(1) DEFAULT '1' NOT NULL,
1400 CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id)
1404 CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting)
1407 CREATE SEQUENCE phpbb_smilies_seq
1410 CREATE OR REPLACE TRIGGER t_phpbb_smilies
1411 BEFORE INSERT ON phpbb_smilies
1413 new.smiley_id IS NULL OR new.smiley_id = 0
1416 SELECT phpbb_smilies_seq.nextval
1424 Table: 'phpbb_styles'
1426 CREATE TABLE phpbb_styles (
1427 style_id number(8) NOT NULL,
1428 style_name varchar2(765) DEFAULT '' ,
1429 style_copyright varchar2(765) DEFAULT '' ,
1430 style_active number(1) DEFAULT '1' NOT NULL,
1431 template_id number(8) DEFAULT '0' NOT NULL,
1432 theme_id number(8) DEFAULT '0' NOT NULL,
1433 imageset_id number(8) DEFAULT '0' NOT NULL,
1434 CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
1435 CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
1439 CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id)
1441 CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id)
1443 CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id)
1446 CREATE SEQUENCE phpbb_styles_seq
1449 CREATE OR REPLACE TRIGGER t_phpbb_styles
1450 BEFORE INSERT ON phpbb_styles
1452 new.style_id IS NULL OR new.style_id = 0
1455 SELECT phpbb_styles_seq.nextval
1463 Table: 'phpbb_styles_template'
1465 CREATE TABLE phpbb_styles_template (
1466 template_id number(8) NOT NULL,
1467 template_name varchar2(765) DEFAULT '' ,
1468 template_copyright varchar2(765) DEFAULT '' ,
1469 template_path varchar2(100) DEFAULT '' ,
1470 bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
1471 template_storedb number(1) DEFAULT '0' NOT NULL,
1472 template_inherits_id number(4) DEFAULT '0' NOT NULL,
1473 template_inherit_path varchar2(255) DEFAULT '' ,
1474 CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
1475 CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name)
1480 CREATE SEQUENCE phpbb_styles_template_seq
1483 CREATE OR REPLACE TRIGGER t_phpbb_styles_template
1484 BEFORE INSERT ON phpbb_styles_template
1486 new.template_id IS NULL OR new.template_id = 0
1489 SELECT phpbb_styles_template_seq.nextval
1490 INTO :new.template_id
1497 Table: 'phpbb_styles_template_data'
1499 CREATE TABLE phpbb_styles_template_data (
1500 template_id number(8) DEFAULT '0' NOT NULL,
1501 template_filename varchar2(100) DEFAULT '' ,
1502 template_included clob DEFAULT '' ,
1503 template_mtime number(11) DEFAULT '0' NOT NULL,
1504 template_data clob DEFAULT ''
1508 CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id)
1510 CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename)
1514 Table: 'phpbb_styles_theme'
1516 CREATE TABLE phpbb_styles_theme (
1517 theme_id number(8) NOT NULL,
1518 theme_name varchar2(765) DEFAULT '' ,
1519 theme_copyright varchar2(765) DEFAULT '' ,
1520 theme_path varchar2(100) DEFAULT '' ,
1521 theme_storedb number(1) DEFAULT '0' NOT NULL,
1522 theme_mtime number(11) DEFAULT '0' NOT NULL,
1523 theme_data clob DEFAULT '' ,
1524 CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id),
1525 CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name)
1530 CREATE SEQUENCE phpbb_styles_theme_seq
1533 CREATE OR REPLACE TRIGGER t_phpbb_styles_theme
1534 BEFORE INSERT ON phpbb_styles_theme
1536 new.theme_id IS NULL OR new.theme_id = 0
1539 SELECT phpbb_styles_theme_seq.nextval
1547 Table: 'phpbb_styles_imageset'
1549 CREATE TABLE phpbb_styles_imageset (
1550 imageset_id number(8) NOT NULL,
1551 imageset_name varchar2(765) DEFAULT '' ,
1552 imageset_copyright varchar2(765) DEFAULT '' ,
1553 imageset_path varchar2(100) DEFAULT '' ,
1554 CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id),
1555 CONSTRAINT u_phpbb_imgset_nm UNIQUE (imageset_name)
1560 CREATE SEQUENCE phpbb_styles_imageset_seq
1563 CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset
1564 BEFORE INSERT ON phpbb_styles_imageset
1566 new.imageset_id IS NULL OR new.imageset_id = 0
1569 SELECT phpbb_styles_imageset_seq.nextval
1570 INTO :new.imageset_id
1577 Table: 'phpbb_styles_imageset_data'
1579 CREATE TABLE phpbb_styles_imageset_data (
1580 image_id number(8) NOT NULL,
1581 image_name varchar2(200) DEFAULT '' ,
1582 image_filename varchar2(200) DEFAULT '' ,
1583 image_lang varchar2(30) DEFAULT '' ,
1584 image_height number(4) DEFAULT '0' NOT NULL,
1585 image_width number(4) DEFAULT '0' NOT NULL,
1586 imageset_id number(8) DEFAULT '0' NOT NULL,
1587 CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id)
1591 CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id)
1594 CREATE SEQUENCE phpbb_styles_imageset_data_seq
1597 CREATE OR REPLACE TRIGGER t_phpbb_styles_imageset_data
1598 BEFORE INSERT ON phpbb_styles_imageset_data
1600 new.image_id IS NULL OR new.image_id = 0
1603 SELECT phpbb_styles_imageset_data_seq.nextval
1611 Table: 'phpbb_topics'
1613 CREATE TABLE phpbb_topics (
1614 topic_id number(8) NOT NULL,
1615 forum_id number(8) DEFAULT '0' NOT NULL,
1616 icon_id number(8) DEFAULT '0' NOT NULL,
1617 topic_attachment number(1) DEFAULT '0' NOT NULL,
1618 topic_approved number(1) DEFAULT '1' NOT NULL,
1619 topic_reported number(1) DEFAULT '0' NOT NULL,
1620 topic_title varchar2(765) DEFAULT '' ,
1621 topic_poster number(8) DEFAULT '0' NOT NULL,
1622 topic_time number(11) DEFAULT '0' NOT NULL,
1623 topic_time_limit number(11) DEFAULT '0' NOT NULL,
1624 topic_views number(8) DEFAULT '0' NOT NULL,
1625 topic_replies number(8) DEFAULT '0' NOT NULL,
1626 topic_replies_real number(8) DEFAULT '0' NOT NULL,
1627 topic_status number(3) DEFAULT '0' NOT NULL,
1628 topic_type number(3) DEFAULT '0' NOT NULL,
1629 topic_first_post_id number(8) DEFAULT '0' NOT NULL,
1630 topic_first_poster_name varchar2(765) DEFAULT '' ,
1631 topic_first_poster_colour varchar2(6) DEFAULT '' ,
1632 topic_last_post_id number(8) DEFAULT '0' NOT NULL,
1633 topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
1634 topic_last_poster_name varchar2(765) DEFAULT '' ,
1635 topic_last_poster_colour varchar2(6) DEFAULT '' ,
1636 topic_last_post_subject varchar2(765) DEFAULT '' ,
1637 topic_last_post_time number(11) DEFAULT '0' NOT NULL,
1638 topic_last_view_time number(11) DEFAULT '0' NOT NULL,
1639 topic_moved_id number(8) DEFAULT '0' NOT NULL,
1640 topic_bumped number(1) DEFAULT '0' NOT NULL,
1641 topic_bumper number(8) DEFAULT '0' NOT NULL,
1642 poll_title varchar2(765) DEFAULT '' ,
1643 poll_start number(11) DEFAULT '0' NOT NULL,
1644 poll_length number(11) DEFAULT '0' NOT NULL,
1645 poll_max_options number(4) DEFAULT '1' NOT NULL,
1646 poll_last_vote number(11) DEFAULT '0' NOT NULL,
1647 poll_vote_change number(1) DEFAULT '0' NOT NULL,
1648 CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
1652 CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id)
1654 CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type)
1656 CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time)
1658 CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved)
1660 CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id)
1662 CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id)
1665 CREATE SEQUENCE phpbb_topics_seq
1668 CREATE OR REPLACE TRIGGER t_phpbb_topics
1669 BEFORE INSERT ON phpbb_topics
1671 new.topic_id IS NULL OR new.topic_id = 0
1674 SELECT phpbb_topics_seq.nextval
1682 Table: 'phpbb_topics_track'
1684 CREATE TABLE phpbb_topics_track (
1685 user_id number(8) DEFAULT '0' NOT NULL,
1686 topic_id number(8) DEFAULT '0' NOT NULL,
1687 forum_id number(8) DEFAULT '0' NOT NULL,
1688 mark_time number(11) DEFAULT '0' NOT NULL,
1689 CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id)
1693 CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id)
1695 CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
1699 Table: 'phpbb_topics_posted'
1701 CREATE TABLE phpbb_topics_posted (
1702 user_id number(8) DEFAULT '0' NOT NULL,
1703 topic_id number(8) DEFAULT '0' NOT NULL,
1704 topic_posted number(1) DEFAULT '0' NOT NULL,
1705 CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id)
1711 Table: 'phpbb_topics_watch'
1713 CREATE TABLE phpbb_topics_watch (
1714 topic_id number(8) DEFAULT '0' NOT NULL,
1715 user_id number(8) DEFAULT '0' NOT NULL,
1716 notify_status number(1) DEFAULT '0' NOT NULL
1720 CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id)
1722 CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id)
1724 CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status)
1728 Table: 'phpbb_user_group'
1730 CREATE TABLE phpbb_user_group (
1731 group_id number(8) DEFAULT '0' NOT NULL,
1732 user_id number(8) DEFAULT '0' NOT NULL,
1733 group_leader number(1) DEFAULT '0' NOT NULL,
1734 user_pending number(1) DEFAULT '1' NOT NULL
1738 CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id)
1740 CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id)
1742 CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader)
1746 Table: 'phpbb_users'
1748 CREATE TABLE phpbb_users (
1749 user_id number(8) NOT NULL,
1750 user_type number(2) DEFAULT '0' NOT NULL,
1751 group_id number(8) DEFAULT '3' NOT NULL,
1752 user_permissions clob DEFAULT '' ,
1753 user_perm_from number(8) DEFAULT '0' NOT NULL,
1754 user_ip varchar2(40) DEFAULT '' ,
1755 user_regdate number(11) DEFAULT '0' NOT NULL,
1756 username varchar2(255) DEFAULT '' ,
1757 username_clean varchar2(255) DEFAULT '' ,
1758 user_password varchar2(120) DEFAULT '' ,
1759 user_passchg number(11) DEFAULT '0' NOT NULL,
1760 user_pass_convert number(1) DEFAULT '0' NOT NULL,
1761 user_email varchar2(300) DEFAULT '' ,
1762 user_email_hash number(20) DEFAULT '0' NOT NULL,
1763 user_birthday varchar2(10) DEFAULT '' ,
1764 user_lastvisit number(11) DEFAULT '0' NOT NULL,
1765 user_lastmark number(11) DEFAULT '0' NOT NULL,
1766 user_lastpost_time number(11) DEFAULT '0' NOT NULL,
1767 user_lastpage varchar2(600) DEFAULT '' ,
1768 user_last_confirm_key varchar2(10) DEFAULT '' ,
1769 user_last_search number(11) DEFAULT '0' NOT NULL,
1770 user_warnings number(4) DEFAULT '0' NOT NULL,
1771 user_last_warning number(11) DEFAULT '0' NOT NULL,
1772 user_login_attempts number(4) DEFAULT '0' NOT NULL,
1773 user_inactive_reason number(2) DEFAULT '0' NOT NULL,
1774 user_inactive_time number(11) DEFAULT '0' NOT NULL,
1775 user_posts number(8) DEFAULT '0' NOT NULL,
1776 user_lang varchar2(30) DEFAULT '' ,
1777 user_timezone number(5, 2) DEFAULT '0' NOT NULL,
1778 user_dst number(1) DEFAULT '0' NOT NULL,
1779 user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL,
1780 user_style number(8) DEFAULT '0' NOT NULL,
1781 user_rank number(8) DEFAULT '0' NOT NULL,
1782 user_colour varchar2(6) DEFAULT '' ,
1783 user_new_privmsg number(4) DEFAULT '0' NOT NULL,
1784 user_unread_privmsg number(4) DEFAULT '0' NOT NULL,
1785 user_last_privmsg number(11) DEFAULT '0' NOT NULL,
1786 user_message_rules number(1) DEFAULT '0' NOT NULL,
1787 user_full_folder number(11) DEFAULT '-3' NOT NULL,
1788 user_emailtime number(11) DEFAULT '0' NOT NULL,
1789 user_topic_show_days number(4) DEFAULT '0' NOT NULL,
1790 user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
1791 user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL,
1792 user_post_show_days number(4) DEFAULT '0' NOT NULL,
1793 user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
1794 user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL,
1795 user_notify number(1) DEFAULT '0' NOT NULL,
1796 user_notify_pm number(1) DEFAULT '1' NOT NULL,
1797 user_notify_type number(4) DEFAULT '0' NOT NULL,
1798 user_allow_pm number(1) DEFAULT '1' NOT NULL,
1799 user_allow_viewonline number(1) DEFAULT '1' NOT NULL,
1800 user_allow_viewemail number(1) DEFAULT '1' NOT NULL,
1801 user_allow_massemail number(1) DEFAULT '1' NOT NULL,
1802 user_options number(11) DEFAULT '230271' NOT NULL,
1803 user_avatar varchar2(255) DEFAULT '' ,
1804 user_avatar_type number(2) DEFAULT '0' NOT NULL,
1805 user_avatar_width number(4) DEFAULT '0' NOT NULL,
1806 user_avatar_height number(4) DEFAULT '0' NOT NULL,
1807 user_sig clob DEFAULT '' ,
1808 user_sig_bbcode_uid varchar2(8) DEFAULT '' ,
1809 user_sig_bbcode_bitfield varchar2(255) DEFAULT '' ,
1810 user_from varchar2(300) DEFAULT '' ,
1811 user_icq varchar2(15) DEFAULT '' ,
1812 user_aim varchar2(765) DEFAULT '' ,
1813 user_yim varchar2(765) DEFAULT '' ,
1814 user_msnm varchar2(765) DEFAULT '' ,
1815 user_jabber varchar2(765) DEFAULT '' ,
1816 user_website varchar2(600) DEFAULT '' ,
1817 user_occ clob DEFAULT '' ,
1818 user_interests clob DEFAULT '' ,
1819 user_actkey varchar2(32) DEFAULT '' ,
1820 user_newpasswd varchar2(120) DEFAULT '' ,
1821 user_form_salt varchar2(96) DEFAULT '' ,
1822 user_new number(1) DEFAULT '1' NOT NULL,
1823 user_reminded number(4) DEFAULT '0' NOT NULL,
1824 user_reminded_time number(11) DEFAULT '0' NOT NULL,
1825 CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id),
1826 CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean)
1830 CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday)
1832 CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash)
1834 CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type)
1837 CREATE SEQUENCE phpbb_users_seq
1840 CREATE OR REPLACE TRIGGER t_phpbb_users
1841 BEFORE INSERT ON phpbb_users
1843 new.user_id IS NULL OR new.user_id = 0
1846 SELECT phpbb_users_seq.nextval
1854 Table: 'phpbb_warnings'
1856 CREATE TABLE phpbb_warnings (
1857 warning_id number(8) NOT NULL,
1858 user_id number(8) DEFAULT '0' NOT NULL,
1859 post_id number(8) DEFAULT '0' NOT NULL,
1860 log_id number(8) DEFAULT '0' NOT NULL,
1861 warning_time number(11) DEFAULT '0' NOT NULL,
1862 CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id)
1867 CREATE SEQUENCE phpbb_warnings_seq
1870 CREATE OR REPLACE TRIGGER t_phpbb_warnings
1871 BEFORE INSERT ON phpbb_warnings
1873 new.warning_id IS NULL OR new.warning_id = 0
1876 SELECT phpbb_warnings_seq.nextval
1877 INTO :new.warning_id
1884 Table: 'phpbb_words'
1886 CREATE TABLE phpbb_words (
1887 word_id number(8) NOT NULL,
1888 word varchar2(765) DEFAULT '' ,
1889 replacement varchar2(765) DEFAULT '' ,
1890 CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id)
1895 CREATE SEQUENCE phpbb_words_seq
1898 CREATE OR REPLACE TRIGGER t_phpbb_words
1899 BEFORE INSERT ON phpbb_words
1901 new.word_id IS NULL OR new.word_id = 0
1904 SELECT phpbb_words_seq.nextval
1912 Table: 'phpbb_zebra'
1914 CREATE TABLE phpbb_zebra (
1915 user_id number(8) DEFAULT '0' NOT NULL,
1916 zebra_id number(8) DEFAULT '0' NOT NULL,
1917 friend number(1) DEFAULT '0' NOT NULL,
1918 foe number(1) DEFAULT '0' NOT NULL,
1919 CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id)