diff options
Diffstat (limited to 'phpBB/install/schemas')
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 2732 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 3312 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 1954 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 1954 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 3572 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 2476 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 1898 |
8 files changed, 8942 insertions, 8958 deletions
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 588557b92a..d83fe4c2da 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1,1367 +1,1365 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. - -# Table: 'phpbb_attachments' -CREATE TABLE phpbb_attachments ( - attach_id INTEGER NOT NULL, - post_msg_id INTEGER DEFAULT 0 NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - in_message INTEGER DEFAULT 0 NOT NULL, - poster_id INTEGER DEFAULT 0 NOT NULL, - is_orphan INTEGER DEFAULT 1 NOT NULL, - physical_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - real_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - download_count INTEGER DEFAULT 0 NOT NULL, - attach_comment BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, - mimetype VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, - filesize INTEGER DEFAULT 0 NOT NULL, - filetime INTEGER DEFAULT 0 NOT NULL, - thumbnail INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_attachments ADD PRIMARY KEY (attach_id);; - -CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments(filetime);; -CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments(post_msg_id);; -CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments(topic_id);; -CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments(poster_id);; -CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments(is_orphan);; - -CREATE GENERATOR phpbb_attachments_gen;; -SET GENERATOR phpbb_attachments_gen TO 0;; - -CREATE TRIGGER t_phpbb_attachments FOR phpbb_attachments -BEFORE INSERT -AS -BEGIN - NEW.attach_id = GEN_ID(phpbb_attachments_gen, 1); -END;; - - -# Table: 'phpbb_acl_groups' -CREATE TABLE phpbb_acl_groups ( - group_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - auth_option_id INTEGER DEFAULT 0 NOT NULL, - auth_role_id INTEGER DEFAULT 0 NOT NULL, - auth_setting INTEGER DEFAULT 0 NOT NULL -);; - -CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);; -CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);; -CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);; - -# Table: 'phpbb_acl_options' -CREATE TABLE phpbb_acl_options ( - auth_option_id INTEGER NOT NULL, - auth_option VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL, - is_global INTEGER DEFAULT 0 NOT NULL, - is_local INTEGER DEFAULT 0 NOT NULL, - founder_only INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_acl_options ADD PRIMARY KEY (auth_option_id);; - -CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options(auth_option);; - -CREATE GENERATOR phpbb_acl_options_gen;; -SET GENERATOR phpbb_acl_options_gen TO 0;; - -CREATE TRIGGER t_phpbb_acl_options FOR phpbb_acl_options -BEFORE INSERT -AS -BEGIN - NEW.auth_option_id = GEN_ID(phpbb_acl_options_gen, 1); -END;; - - -# Table: 'phpbb_acl_roles' -CREATE TABLE phpbb_acl_roles ( - role_id INTEGER NOT NULL, - role_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - role_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - role_type VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, - role_order INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_acl_roles ADD PRIMARY KEY (role_id);; - -CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles(role_type);; -CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles(role_order);; - -CREATE GENERATOR phpbb_acl_roles_gen;; -SET GENERATOR phpbb_acl_roles_gen TO 0;; - -CREATE TRIGGER t_phpbb_acl_roles FOR phpbb_acl_roles -BEFORE INSERT -AS -BEGIN - NEW.role_id = GEN_ID(phpbb_acl_roles_gen, 1); -END;; - - -# Table: 'phpbb_acl_roles_data' -CREATE TABLE phpbb_acl_roles_data ( - role_id INTEGER DEFAULT 0 NOT NULL, - auth_option_id INTEGER DEFAULT 0 NOT NULL, - auth_setting INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);; - -CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);; - -# Table: 'phpbb_acl_users' -CREATE TABLE phpbb_acl_users ( - user_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - auth_option_id INTEGER DEFAULT 0 NOT NULL, - auth_role_id INTEGER DEFAULT 0 NOT NULL, - auth_setting INTEGER DEFAULT 0 NOT NULL -);; - -CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);; -CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);; -CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);; - -# Table: 'phpbb_banlist' -CREATE TABLE phpbb_banlist ( - ban_id INTEGER NOT NULL, - ban_userid INTEGER DEFAULT 0 NOT NULL, - ban_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - ban_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - ban_start INTEGER DEFAULT 0 NOT NULL, - ban_end INTEGER DEFAULT 0 NOT NULL, - ban_exclude INTEGER DEFAULT 0 NOT NULL, - ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE -);; - -ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);; - -CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist(ban_end);; -CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist(ban_userid, ban_exclude);; -CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist(ban_email, ban_exclude);; -CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist(ban_ip, ban_exclude);; - -CREATE GENERATOR phpbb_banlist_gen;; -SET GENERATOR phpbb_banlist_gen TO 0;; - -CREATE TRIGGER t_phpbb_banlist FOR phpbb_banlist -BEFORE INSERT -AS -BEGIN - NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1); -END;; - - -# Table: 'phpbb_bbcodes' -CREATE TABLE phpbb_bbcodes ( - bbcode_id INTEGER DEFAULT 0 NOT NULL, - bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - display_on_posting INTEGER DEFAULT 0 NOT NULL, - bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - first_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - first_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - second_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - second_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);; - -CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);; - -# Table: 'phpbb_bookmarks' -CREATE TABLE phpbb_bookmarks ( - topic_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);; - - -# Table: 'phpbb_bots' -CREATE TABLE phpbb_bots ( - bot_id INTEGER NOT NULL, - bot_active INTEGER DEFAULT 1 NOT NULL, - bot_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_id INTEGER DEFAULT 0 NOT NULL, - bot_agent VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - bot_ip VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);; - -CREATE INDEX phpbb_bots_bot_active ON phpbb_bots(bot_active);; - -CREATE GENERATOR phpbb_bots_gen;; -SET GENERATOR phpbb_bots_gen TO 0;; - -CREATE TRIGGER t_phpbb_bots FOR phpbb_bots -BEFORE INSERT -AS -BEGIN - NEW.bot_id = GEN_ID(phpbb_bots_gen, 1); -END;; - - -# Table: 'phpbb_config' -CREATE TABLE phpbb_config ( - config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - is_dynamic INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_config ADD PRIMARY KEY (config_name);; - -CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);; - -# Table: 'phpbb_confirm' -CREATE TABLE phpbb_confirm ( - confirm_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - confirm_type INTEGER DEFAULT 0 NOT NULL, - code VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - seed INTEGER DEFAULT 0 NOT NULL, - attempts INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);; - -CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);; - -# Table: 'phpbb_disallow' -CREATE TABLE phpbb_disallow ( - disallow_id INTEGER NOT NULL, - disallow_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE -);; - -ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);; - - -CREATE GENERATOR phpbb_disallow_gen;; -SET GENERATOR phpbb_disallow_gen TO 0;; - -CREATE TRIGGER t_phpbb_disallow FOR phpbb_disallow -BEFORE INSERT -AS -BEGIN - NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1); -END;; - - -# Table: 'phpbb_drafts' -CREATE TABLE phpbb_drafts ( - draft_id INTEGER NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - save_time INTEGER DEFAULT 0 NOT NULL, - draft_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_drafts ADD PRIMARY KEY (draft_id);; - -CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts(save_time);; - -CREATE GENERATOR phpbb_drafts_gen;; -SET GENERATOR phpbb_drafts_gen TO 0;; - -CREATE TRIGGER t_phpbb_drafts FOR phpbb_drafts -BEFORE INSERT -AS -BEGIN - NEW.draft_id = GEN_ID(phpbb_drafts_gen, 1); -END;; - - -# Table: 'phpbb_ext' -CREATE TABLE phpbb_ext ( - ext_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - ext_active INTEGER DEFAULT 0 NOT NULL, - ext_state BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -CREATE UNIQUE INDEX phpbb_ext_ext_name ON phpbb_ext(ext_name);; - -# Table: 'phpbb_extensions' -CREATE TABLE phpbb_extensions ( - extension_id INTEGER NOT NULL, - group_id INTEGER DEFAULT 0 NOT NULL, - extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);; - - -CREATE GENERATOR phpbb_extensions_gen;; -SET GENERATOR phpbb_extensions_gen TO 0;; - -CREATE TRIGGER t_phpbb_extensions FOR phpbb_extensions -BEFORE INSERT -AS -BEGIN - NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1); -END;; - - -# Table: 'phpbb_extension_groups' -CREATE TABLE phpbb_extension_groups ( - group_id INTEGER NOT NULL, - group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - cat_id INTEGER DEFAULT 0 NOT NULL, - allow_group INTEGER DEFAULT 0 NOT NULL, - download_mode INTEGER DEFAULT 1 NOT NULL, - upload_icon VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - max_filesize INTEGER DEFAULT 0 NOT NULL, - allowed_forums BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, - allow_in_pm INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_extension_groups ADD PRIMARY KEY (group_id);; - - -CREATE GENERATOR phpbb_extension_groups_gen;; -SET GENERATOR phpbb_extension_groups_gen TO 0;; - -CREATE TRIGGER t_phpbb_extension_groups FOR phpbb_extension_groups -BEFORE INSERT -AS -BEGIN - NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1); -END;; - - -# Table: 'phpbb_forums' -CREATE TABLE phpbb_forums ( - forum_id INTEGER NOT NULL, - parent_id INTEGER DEFAULT 0 NOT NULL, - left_id INTEGER DEFAULT 0 NOT NULL, - right_id INTEGER DEFAULT 0 NOT NULL, - forum_parents BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - forum_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - forum_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_desc_options INTEGER DEFAULT 7 NOT NULL, - forum_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - forum_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - forum_style INTEGER DEFAULT 0 NOT NULL, - forum_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_rules BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - forum_rules_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - forum_rules_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_rules_options INTEGER DEFAULT 7 NOT NULL, - forum_rules_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_topics_per_page INTEGER DEFAULT 0 NOT NULL, - forum_type INTEGER DEFAULT 0 NOT NULL, - forum_status INTEGER DEFAULT 0 NOT NULL, - forum_posts INTEGER DEFAULT 0 NOT NULL, - forum_topics INTEGER DEFAULT 0 NOT NULL, - forum_topics_real INTEGER DEFAULT 0 NOT NULL, - forum_last_post_id INTEGER DEFAULT 0 NOT NULL, - forum_last_poster_id INTEGER DEFAULT 0 NOT NULL, - forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - forum_last_post_time INTEGER DEFAULT 0 NOT NULL, - forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, - forum_flags INTEGER DEFAULT 32 NOT NULL, - forum_options INTEGER DEFAULT 0 NOT NULL, - display_subforum_list INTEGER DEFAULT 1 NOT NULL, - display_on_index INTEGER DEFAULT 1 NOT NULL, - enable_indexing INTEGER DEFAULT 1 NOT NULL, - enable_icons INTEGER DEFAULT 1 NOT NULL, - enable_prune INTEGER DEFAULT 0 NOT NULL, - prune_next INTEGER DEFAULT 0 NOT NULL, - prune_days INTEGER DEFAULT 0 NOT NULL, - prune_viewed INTEGER DEFAULT 0 NOT NULL, - prune_freq INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);; - -CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);; -CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums(forum_last_post_id);; - -CREATE GENERATOR phpbb_forums_gen;; -SET GENERATOR phpbb_forums_gen TO 0;; - -CREATE TRIGGER t_phpbb_forums FOR phpbb_forums -BEFORE INSERT -AS -BEGIN - NEW.forum_id = GEN_ID(phpbb_forums_gen, 1); -END;; - - -# Table: 'phpbb_forums_access' -CREATE TABLE phpbb_forums_access ( - forum_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_forums_access ADD PRIMARY KEY (forum_id, user_id, session_id);; - - -# Table: 'phpbb_forums_track' -CREATE TABLE phpbb_forums_track ( - user_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - mark_time INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_forums_track ADD PRIMARY KEY (user_id, forum_id);; - - -# Table: 'phpbb_forums_watch' -CREATE TABLE phpbb_forums_watch ( - forum_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - notify_status INTEGER DEFAULT 0 NOT NULL -);; - -CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);; -CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);; -CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);; - -# Table: 'phpbb_groups' -CREATE TABLE phpbb_groups ( - group_id INTEGER NOT NULL, - group_type INTEGER DEFAULT 1 NOT NULL, - group_founder_manage INTEGER DEFAULT 0 NOT NULL, - group_skip_auth INTEGER DEFAULT 0 NOT NULL, - group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - group_desc_options INTEGER DEFAULT 7 NOT NULL, - group_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - group_display INTEGER DEFAULT 0 NOT NULL, - group_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - group_avatar_type INTEGER DEFAULT 0 NOT NULL, - group_avatar_width INTEGER DEFAULT 0 NOT NULL, - group_avatar_height INTEGER DEFAULT 0 NOT NULL, - group_rank INTEGER DEFAULT 0 NOT NULL, - group_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, - group_sig_chars INTEGER DEFAULT 0 NOT NULL, - group_receive_pm INTEGER DEFAULT 0 NOT NULL, - group_message_limit INTEGER DEFAULT 0 NOT NULL, - group_max_recipients INTEGER DEFAULT 0 NOT NULL, - group_legend INTEGER DEFAULT 0 NOT NULL, - group_teampage INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);; - -CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups(group_legend, group_name);; - -CREATE GENERATOR phpbb_groups_gen;; -SET GENERATOR phpbb_groups_gen TO 0;; - -CREATE TRIGGER t_phpbb_groups FOR phpbb_groups -BEFORE INSERT -AS -BEGIN - NEW.group_id = GEN_ID(phpbb_groups_gen, 1); -END;; - - -# Table: 'phpbb_icons' -CREATE TABLE phpbb_icons ( - icons_id INTEGER NOT NULL, - icons_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - icons_width INTEGER DEFAULT 0 NOT NULL, - icons_height INTEGER DEFAULT 0 NOT NULL, - icons_order INTEGER DEFAULT 0 NOT NULL, - display_on_posting INTEGER DEFAULT 1 NOT NULL -);; - -ALTER TABLE phpbb_icons ADD PRIMARY KEY (icons_id);; - -CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons(display_on_posting);; - -CREATE GENERATOR phpbb_icons_gen;; -SET GENERATOR phpbb_icons_gen TO 0;; - -CREATE TRIGGER t_phpbb_icons FOR phpbb_icons -BEFORE INSERT -AS -BEGIN - NEW.icons_id = GEN_ID(phpbb_icons_gen, 1); -END;; - - -# Table: 'phpbb_lang' -CREATE TABLE phpbb_lang ( - lang_id INTEGER NOT NULL, - lang_iso VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, - lang_dir VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, - lang_english_name VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - lang_local_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - lang_author VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE -);; - -ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);; - -CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang(lang_iso);; - -CREATE GENERATOR phpbb_lang_gen;; -SET GENERATOR phpbb_lang_gen TO 0;; - -CREATE TRIGGER t_phpbb_lang FOR phpbb_lang -BEFORE INSERT -AS -BEGIN - NEW.lang_id = GEN_ID(phpbb_lang_gen, 1); -END;; - - -# Table: 'phpbb_log' -CREATE TABLE phpbb_log ( - log_id INTEGER NOT NULL, - log_type INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - reportee_id INTEGER DEFAULT 0 NOT NULL, - log_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - log_time INTEGER DEFAULT 0 NOT NULL, - log_operation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - log_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);; - -CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);; -CREATE INDEX phpbb_log_log_time ON phpbb_log(log_time);; -CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);; -CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);; -CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);; -CREATE INDEX phpbb_log_user_id ON phpbb_log(user_id);; - -CREATE GENERATOR phpbb_log_gen;; -SET GENERATOR phpbb_log_gen TO 0;; - -CREATE TRIGGER t_phpbb_log FOR phpbb_log -BEFORE INSERT -AS -BEGIN - NEW.log_id = GEN_ID(phpbb_log_gen, 1); -END;; - - -# Table: 'phpbb_login_attempts' -CREATE TABLE phpbb_login_attempts ( - attempt_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - attempt_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL, - attempt_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - attempt_time INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - username VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE, - username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE -);; - -CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts(attempt_ip, attempt_time);; -CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts(attempt_forwarded_for, attempt_time);; -CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts(attempt_time);; -CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts(user_id);; - -# Table: 'phpbb_moderator_cache' -CREATE TABLE phpbb_moderator_cache ( - forum_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - group_id INTEGER DEFAULT 0 NOT NULL, - group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - display_on_index INTEGER DEFAULT 1 NOT NULL -);; - -CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);; -CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);; - -# Table: 'phpbb_modules' -CREATE TABLE phpbb_modules ( - module_id INTEGER NOT NULL, - module_enabled INTEGER DEFAULT 1 NOT NULL, - module_display INTEGER DEFAULT 1 NOT NULL, - module_basename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - module_class VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, - parent_id INTEGER DEFAULT 0 NOT NULL, - left_id INTEGER DEFAULT 0 NOT NULL, - right_id INTEGER DEFAULT 0 NOT NULL, - module_langname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - module_mode VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - module_auth VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);; - -CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);; -CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);; -CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);; - -CREATE GENERATOR phpbb_modules_gen;; -SET GENERATOR phpbb_modules_gen TO 0;; - -CREATE TRIGGER t_phpbb_modules FOR phpbb_modules -BEFORE INSERT -AS -BEGIN - NEW.module_id = GEN_ID(phpbb_modules_gen, 1); -END;; - - -# Table: 'phpbb_poll_options' -CREATE TABLE phpbb_poll_options ( - poll_option_id INTEGER DEFAULT 0 NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - poll_option_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - poll_option_total INTEGER DEFAULT 0 NOT NULL -);; - -CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options(poll_option_id);; -CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options(topic_id);; - -# Table: 'phpbb_poll_votes' -CREATE TABLE phpbb_poll_votes ( - topic_id INTEGER DEFAULT 0 NOT NULL, - poll_option_id INTEGER DEFAULT 0 NOT NULL, - vote_user_id INTEGER DEFAULT 0 NOT NULL, - vote_user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes(topic_id);; -CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes(vote_user_id);; -CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes(vote_user_ip);; - -# Table: 'phpbb_posts' -CREATE TABLE phpbb_posts ( - post_id INTEGER NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - poster_id INTEGER DEFAULT 0 NOT NULL, - icon_id INTEGER DEFAULT 0 NOT NULL, - poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - post_time INTEGER DEFAULT 0 NOT NULL, - post_approved INTEGER DEFAULT 1 NOT NULL, - post_reported INTEGER DEFAULT 0 NOT NULL, - enable_bbcode INTEGER DEFAULT 1 NOT NULL, - enable_smilies INTEGER DEFAULT 1 NOT NULL, - enable_magic_url INTEGER DEFAULT 1 NOT NULL, - enable_sig INTEGER DEFAULT 1 NOT NULL, - post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - post_attachment INTEGER DEFAULT 0 NOT NULL, - bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - post_postcount INTEGER DEFAULT 1 NOT NULL, - post_edit_time INTEGER DEFAULT 0 NOT NULL, - post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - post_edit_user INTEGER DEFAULT 0 NOT NULL, - post_edit_count INTEGER DEFAULT 0 NOT NULL, - post_edit_locked INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);; - -CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);; -CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);; -CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);; -CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);; -CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);; -CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);; -CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);; - -CREATE GENERATOR phpbb_posts_gen;; -SET GENERATOR phpbb_posts_gen TO 0;; - -CREATE TRIGGER t_phpbb_posts FOR phpbb_posts -BEFORE INSERT -AS -BEGIN - NEW.post_id = GEN_ID(phpbb_posts_gen, 1); -END;; - - -# Table: 'phpbb_privmsgs' -CREATE TABLE phpbb_privmsgs ( - msg_id INTEGER NOT NULL, - root_level INTEGER DEFAULT 0 NOT NULL, - author_id INTEGER DEFAULT 0 NOT NULL, - icon_id INTEGER DEFAULT 0 NOT NULL, - author_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - message_time INTEGER DEFAULT 0 NOT NULL, - enable_bbcode INTEGER DEFAULT 1 NOT NULL, - enable_smilies INTEGER DEFAULT 1 NOT NULL, - enable_magic_url INTEGER DEFAULT 1 NOT NULL, - enable_sig INTEGER DEFAULT 1 NOT NULL, - message_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - message_edit_user INTEGER DEFAULT 0 NOT NULL, - message_attachment INTEGER DEFAULT 0 NOT NULL, - bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - message_edit_time INTEGER DEFAULT 0 NOT NULL, - message_edit_count INTEGER DEFAULT 0 NOT NULL, - to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - bcc_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - message_reported INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_privmsgs ADD PRIMARY KEY (msg_id);; - -CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs(author_ip);; -CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs(message_time);; -CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs(author_id);; -CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs(root_level);; - -CREATE GENERATOR phpbb_privmsgs_gen;; -SET GENERATOR phpbb_privmsgs_gen TO 0;; - -CREATE TRIGGER t_phpbb_privmsgs FOR phpbb_privmsgs -BEFORE INSERT -AS -BEGIN - NEW.msg_id = GEN_ID(phpbb_privmsgs_gen, 1); -END;; - - -# Table: 'phpbb_privmsgs_folder' -CREATE TABLE phpbb_privmsgs_folder ( - folder_id INTEGER NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - folder_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - pm_count INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_privmsgs_folder ADD PRIMARY KEY (folder_id);; - -CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder(user_id);; - -CREATE GENERATOR phpbb_privmsgs_folder_gen;; -SET GENERATOR phpbb_privmsgs_folder_gen TO 0;; - -CREATE TRIGGER t_phpbb_privmsgs_folder FOR phpbb_privmsgs_folder -BEFORE INSERT -AS -BEGIN - NEW.folder_id = GEN_ID(phpbb_privmsgs_folder_gen, 1); -END;; - - -# Table: 'phpbb_privmsgs_rules' -CREATE TABLE phpbb_privmsgs_rules ( - rule_id INTEGER NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - rule_check INTEGER DEFAULT 0 NOT NULL, - rule_connection INTEGER DEFAULT 0 NOT NULL, - rule_string VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - rule_user_id INTEGER DEFAULT 0 NOT NULL, - rule_group_id INTEGER DEFAULT 0 NOT NULL, - rule_action INTEGER DEFAULT 0 NOT NULL, - rule_folder_id INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_privmsgs_rules ADD PRIMARY KEY (rule_id);; - -CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules(user_id);; - -CREATE GENERATOR phpbb_privmsgs_rules_gen;; -SET GENERATOR phpbb_privmsgs_rules_gen TO 0;; - -CREATE TRIGGER t_phpbb_privmsgs_rules FOR phpbb_privmsgs_rules -BEFORE INSERT -AS -BEGIN - NEW.rule_id = GEN_ID(phpbb_privmsgs_rules_gen, 1); -END;; - - -# Table: 'phpbb_privmsgs_to' -CREATE TABLE phpbb_privmsgs_to ( - msg_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - author_id INTEGER DEFAULT 0 NOT NULL, - pm_deleted INTEGER DEFAULT 0 NOT NULL, - pm_new INTEGER DEFAULT 1 NOT NULL, - pm_unread INTEGER DEFAULT 1 NOT NULL, - pm_replied INTEGER DEFAULT 0 NOT NULL, - pm_marked INTEGER DEFAULT 0 NOT NULL, - pm_forwarded INTEGER DEFAULT 0 NOT NULL, - folder_id INTEGER DEFAULT 0 NOT NULL -);; - -CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to(msg_id);; -CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to(author_id);; -CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder_id);; - -# Table: 'phpbb_profile_fields' -CREATE TABLE phpbb_profile_fields ( - field_id INTEGER NOT NULL, - field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - field_type INTEGER DEFAULT 0 NOT NULL, - field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL, - field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL, - field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - field_maxlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - field_novalue VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - field_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - field_required INTEGER DEFAULT 0 NOT NULL, - field_show_novalue INTEGER DEFAULT 0 NOT NULL, - field_show_on_reg INTEGER DEFAULT 0 NOT NULL, - field_show_on_pm INTEGER DEFAULT 0 NOT NULL, - field_show_on_vt INTEGER DEFAULT 0 NOT NULL, - field_show_profile INTEGER DEFAULT 0 NOT NULL, - field_hide INTEGER DEFAULT 0 NOT NULL, - field_no_view INTEGER DEFAULT 0 NOT NULL, - field_active INTEGER DEFAULT 0 NOT NULL, - field_order INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);; - -CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields(field_type);; -CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields(field_order);; - -CREATE GENERATOR phpbb_profile_fields_gen;; -SET GENERATOR phpbb_profile_fields_gen TO 0;; - -CREATE TRIGGER t_phpbb_profile_fields FOR phpbb_profile_fields -BEFORE INSERT -AS -BEGIN - NEW.field_id = GEN_ID(phpbb_profile_fields_gen, 1); -END;; - - -# Table: 'phpbb_profile_fields_data' -CREATE TABLE phpbb_profile_fields_data ( - user_id INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; - - -# Table: 'phpbb_profile_fields_lang' -CREATE TABLE phpbb_profile_fields_lang ( - field_id INTEGER DEFAULT 0 NOT NULL, - lang_id INTEGER DEFAULT 0 NOT NULL, - option_id INTEGER DEFAULT 0 NOT NULL, - field_type INTEGER DEFAULT 0 NOT NULL, - lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE -);; - -ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);; - - -# Table: 'phpbb_profile_lang' -CREATE TABLE phpbb_profile_lang ( - field_id INTEGER DEFAULT 0 NOT NULL, - lang_id INTEGER DEFAULT 0 NOT NULL, - lang_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - lang_explain BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - lang_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE -);; - -ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);; - - -# Table: 'phpbb_ranks' -CREATE TABLE phpbb_ranks ( - rank_id INTEGER NOT NULL, - rank_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - rank_min INTEGER DEFAULT 0 NOT NULL, - rank_special INTEGER DEFAULT 0 NOT NULL, - rank_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_ranks ADD PRIMARY KEY (rank_id);; - - -CREATE GENERATOR phpbb_ranks_gen;; -SET GENERATOR phpbb_ranks_gen TO 0;; - -CREATE TRIGGER t_phpbb_ranks FOR phpbb_ranks -BEFORE INSERT -AS -BEGIN - NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1); -END;; - - -# Table: 'phpbb_reports' -CREATE TABLE phpbb_reports ( - report_id INTEGER NOT NULL, - reason_id INTEGER DEFAULT 0 NOT NULL, - post_id INTEGER DEFAULT 0 NOT NULL, - pm_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - user_notify INTEGER DEFAULT 0 NOT NULL, - report_closed INTEGER DEFAULT 0 NOT NULL, - report_time INTEGER DEFAULT 0 NOT NULL, - report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);; - -CREATE INDEX phpbb_reports_post_id ON phpbb_reports(post_id);; -CREATE INDEX phpbb_reports_pm_id ON phpbb_reports(pm_id);; - -CREATE GENERATOR phpbb_reports_gen;; -SET GENERATOR phpbb_reports_gen TO 0;; - -CREATE TRIGGER t_phpbb_reports FOR phpbb_reports -BEFORE INSERT -AS -BEGIN - NEW.report_id = GEN_ID(phpbb_reports_gen, 1); -END;; - - -# Table: 'phpbb_reports_reasons' -CREATE TABLE phpbb_reports_reasons ( - reason_id INTEGER NOT NULL, - reason_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - reason_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - reason_order INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_reports_reasons ADD PRIMARY KEY (reason_id);; - - -CREATE GENERATOR phpbb_reports_reasons_gen;; -SET GENERATOR phpbb_reports_reasons_gen TO 0;; - -CREATE TRIGGER t_phpbb_reports_reasons FOR phpbb_reports_reasons -BEFORE INSERT -AS -BEGIN - NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1); -END;; - - -# Table: 'phpbb_search_results' -CREATE TABLE phpbb_search_results ( - search_key VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - search_time INTEGER DEFAULT 0 NOT NULL, - search_keywords BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - search_authors BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);; - - -# Table: 'phpbb_search_wordlist' -CREATE TABLE phpbb_search_wordlist ( - word_id INTEGER NOT NULL, - word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - word_common INTEGER DEFAULT 0 NOT NULL, - word_count INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);; - -CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);; -CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);; - -CREATE GENERATOR phpbb_search_wordlist_gen;; -SET GENERATOR phpbb_search_wordlist_gen TO 0;; - -CREATE TRIGGER t_phpbb_search_wordlist FOR phpbb_search_wordlist -BEFORE INSERT -AS -BEGIN - NEW.word_id = GEN_ID(phpbb_search_wordlist_gen, 1); -END;; - - -# Table: 'phpbb_search_wordmatch' -CREATE TABLE phpbb_search_wordmatch ( - post_id INTEGER DEFAULT 0 NOT NULL, - word_id INTEGER DEFAULT 0 NOT NULL, - title_match INTEGER DEFAULT 0 NOT NULL -);; - -CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);; -CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);; -CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);; - -# Table: 'phpbb_sessions' -CREATE TABLE phpbb_sessions ( - session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - session_user_id INTEGER DEFAULT 0 NOT NULL, - session_forum_id INTEGER DEFAULT 0 NOT NULL, - session_last_visit INTEGER DEFAULT 0 NOT NULL, - session_start INTEGER DEFAULT 0 NOT NULL, - session_time INTEGER DEFAULT 0 NOT NULL, - session_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - session_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL, - session_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - session_page VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - session_viewonline INTEGER DEFAULT 1 NOT NULL, - session_autologin INTEGER DEFAULT 0 NOT NULL, - session_admin INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);; - -CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);; -CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);; -CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions(session_forum_id);; - -# Table: 'phpbb_sessions_keys' -CREATE TABLE phpbb_sessions_keys ( - key_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - last_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - last_login INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_sessions_keys ADD PRIMARY KEY (key_id, user_id);; - -CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);; - -# Table: 'phpbb_sitelist' -CREATE TABLE phpbb_sitelist ( - site_id INTEGER NOT NULL, - site_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - site_hostname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - ip_exclude INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_sitelist ADD PRIMARY KEY (site_id);; - - -CREATE GENERATOR phpbb_sitelist_gen;; -SET GENERATOR phpbb_sitelist_gen TO 0;; - -CREATE TRIGGER t_phpbb_sitelist FOR phpbb_sitelist -BEFORE INSERT -AS -BEGIN - NEW.site_id = GEN_ID(phpbb_sitelist_gen, 1); -END;; - - -# Table: 'phpbb_smilies' -CREATE TABLE phpbb_smilies ( - smiley_id INTEGER NOT NULL, - code VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - emotion VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - smiley_url VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL, - smiley_width INTEGER DEFAULT 0 NOT NULL, - smiley_height INTEGER DEFAULT 0 NOT NULL, - smiley_order INTEGER DEFAULT 0 NOT NULL, - display_on_posting INTEGER DEFAULT 1 NOT NULL -);; - -ALTER TABLE phpbb_smilies ADD PRIMARY KEY (smiley_id);; - -CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies(display_on_posting);; - -CREATE GENERATOR phpbb_smilies_gen;; -SET GENERATOR phpbb_smilies_gen TO 0;; - -CREATE TRIGGER t_phpbb_smilies FOR phpbb_smilies -BEFORE INSERT -AS -BEGIN - NEW.smiley_id = GEN_ID(phpbb_smilies_gen, 1); -END;; - - -# Table: 'phpbb_styles' -CREATE TABLE phpbb_styles ( - style_id INTEGER NOT NULL, - style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - style_active INTEGER DEFAULT 1 NOT NULL, - style_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL, - style_parent_id INTEGER DEFAULT 0 NOT NULL, - style_parent_tree BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);; - -CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);; - -CREATE GENERATOR phpbb_styles_gen;; -SET GENERATOR phpbb_styles_gen TO 0;; - -CREATE TRIGGER t_phpbb_styles FOR phpbb_styles -BEFORE INSERT -AS -BEGIN - NEW.style_id = GEN_ID(phpbb_styles_gen, 1); -END;; - - -# Table: 'phpbb_topics' -CREATE TABLE phpbb_topics ( - topic_id INTEGER NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - icon_id INTEGER DEFAULT 0 NOT NULL, - topic_attachment INTEGER DEFAULT 0 NOT NULL, - topic_approved INTEGER DEFAULT 1 NOT NULL, - topic_reported INTEGER DEFAULT 0 NOT NULL, - topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - topic_poster INTEGER DEFAULT 0 NOT NULL, - topic_time INTEGER DEFAULT 0 NOT NULL, - topic_time_limit INTEGER DEFAULT 0 NOT NULL, - topic_views INTEGER DEFAULT 0 NOT NULL, - topic_replies INTEGER DEFAULT 0 NOT NULL, - topic_replies_real INTEGER DEFAULT 0 NOT NULL, - topic_status INTEGER DEFAULT 0 NOT NULL, - topic_type INTEGER DEFAULT 0 NOT NULL, - topic_first_post_id INTEGER DEFAULT 0 NOT NULL, - topic_first_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - topic_first_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_last_post_id INTEGER DEFAULT 0 NOT NULL, - topic_last_poster_id INTEGER DEFAULT 0 NOT NULL, - topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, - topic_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - topic_last_post_time INTEGER DEFAULT 0 NOT NULL, - topic_last_view_time INTEGER DEFAULT 0 NOT NULL, - topic_moved_id INTEGER DEFAULT 0 NOT NULL, - topic_bumped INTEGER DEFAULT 0 NOT NULL, - topic_bumper INTEGER DEFAULT 0 NOT NULL, - poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - poll_start INTEGER DEFAULT 0 NOT NULL, - poll_length INTEGER DEFAULT 0 NOT NULL, - poll_max_options INTEGER DEFAULT 1 NOT NULL, - poll_last_vote INTEGER DEFAULT 0 NOT NULL, - poll_vote_change INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);; - -CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);; -CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);; -CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);; -CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);; -CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);; -CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);; - -CREATE GENERATOR phpbb_topics_gen;; -SET GENERATOR phpbb_topics_gen TO 0;; - -CREATE TRIGGER t_phpbb_topics FOR phpbb_topics -BEFORE INSERT -AS -BEGIN - NEW.topic_id = GEN_ID(phpbb_topics_gen, 1); -END;; - - -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( - user_id INTEGER DEFAULT 0 NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - forum_id INTEGER DEFAULT 0 NOT NULL, - mark_time INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);; - -CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);; -CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);; - -# Table: 'phpbb_topics_posted' -CREATE TABLE phpbb_topics_posted ( - user_id INTEGER DEFAULT 0 NOT NULL, - topic_id INTEGER DEFAULT 0 NOT NULL, - topic_posted INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);; - - -# Table: 'phpbb_topics_watch' -CREATE TABLE phpbb_topics_watch ( - topic_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - notify_status INTEGER DEFAULT 0 NOT NULL -);; - -CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);; -CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);; -CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);; - -# Table: 'phpbb_user_group' -CREATE TABLE phpbb_user_group ( - group_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - group_leader INTEGER DEFAULT 0 NOT NULL, - user_pending INTEGER DEFAULT 1 NOT NULL -);; - -CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group(group_id);; -CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group(user_id);; -CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group(group_leader);; - -# Table: 'phpbb_users' -CREATE TABLE phpbb_users ( - user_id INTEGER NOT NULL, - user_type INTEGER DEFAULT 0 NOT NULL, - group_id INTEGER DEFAULT 3 NOT NULL, - user_permissions BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, - user_perm_from INTEGER DEFAULT 0 NOT NULL, - user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_regdate INTEGER DEFAULT 0 NOT NULL, - username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_passchg INTEGER DEFAULT 0 NOT NULL, - user_pass_convert INTEGER DEFAULT 0 NOT NULL, - user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL, - user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_lastvisit INTEGER DEFAULT 0 NOT NULL, - user_lastmark INTEGER DEFAULT 0 NOT NULL, - user_lastpost_time INTEGER DEFAULT 0 NOT NULL, - user_lastpage VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_last_confirm_key VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_last_search INTEGER DEFAULT 0 NOT NULL, - user_warnings INTEGER DEFAULT 0 NOT NULL, - user_last_warning INTEGER DEFAULT 0 NOT NULL, - user_login_attempts INTEGER DEFAULT 0 NOT NULL, - user_inactive_reason INTEGER DEFAULT 0 NOT NULL, - user_inactive_time INTEGER DEFAULT 0 NOT NULL, - user_posts INTEGER DEFAULT 0 NOT NULL, - user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_timezone VARCHAR(100) CHARACTER SET NONE DEFAULT 'UTC' NOT NULL, - user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE, - user_style INTEGER DEFAULT 0 NOT NULL, - user_rank INTEGER DEFAULT 0 NOT NULL, - user_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_new_privmsg INTEGER DEFAULT 0 NOT NULL, - user_unread_privmsg INTEGER DEFAULT 0 NOT NULL, - user_last_privmsg INTEGER DEFAULT 0 NOT NULL, - user_message_rules INTEGER DEFAULT 0 NOT NULL, - user_full_folder INTEGER DEFAULT -3 NOT NULL, - user_emailtime INTEGER DEFAULT 0 NOT NULL, - user_topic_show_days INTEGER DEFAULT 0 NOT NULL, - user_topic_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL, - user_topic_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'd' NOT NULL, - user_post_show_days INTEGER DEFAULT 0 NOT NULL, - user_post_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL, - user_post_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'a' NOT NULL, - user_notify INTEGER DEFAULT 0 NOT NULL, - user_notify_pm INTEGER DEFAULT 1 NOT NULL, - user_notify_type INTEGER DEFAULT 0 NOT NULL, - user_allow_pm INTEGER DEFAULT 1 NOT NULL, - user_allow_viewonline INTEGER DEFAULT 1 NOT NULL, - user_allow_viewemail INTEGER DEFAULT 1 NOT NULL, - user_allow_massemail INTEGER DEFAULT 1 NOT NULL, - user_options INTEGER DEFAULT 230271 NOT NULL, - user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_avatar_type INTEGER DEFAULT 0 NOT NULL, - user_avatar_width INTEGER DEFAULT 0 NOT NULL, - user_avatar_height INTEGER DEFAULT 0 NOT NULL, - user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_new INTEGER DEFAULT 1 NOT NULL, - user_reminded INTEGER DEFAULT 0 NOT NULL, - user_reminded_time INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; - -CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);; -CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);; -CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);; -CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);; - -CREATE GENERATOR phpbb_users_gen;; -SET GENERATOR phpbb_users_gen TO 0;; - -CREATE TRIGGER t_phpbb_users FOR phpbb_users -BEFORE INSERT -AS -BEGIN - NEW.user_id = GEN_ID(phpbb_users_gen, 1); -END;; - - -# Table: 'phpbb_warnings' -CREATE TABLE phpbb_warnings ( - warning_id INTEGER NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - post_id INTEGER DEFAULT 0 NOT NULL, - log_id INTEGER DEFAULT 0 NOT NULL, - warning_time INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);; - - -CREATE GENERATOR phpbb_warnings_gen;; -SET GENERATOR phpbb_warnings_gen TO 0;; - -CREATE TRIGGER t_phpbb_warnings FOR phpbb_warnings -BEFORE INSERT -AS -BEGIN - NEW.warning_id = GEN_ID(phpbb_warnings_gen, 1); -END;; - - -# Table: 'phpbb_words' -CREATE TABLE phpbb_words ( - word_id INTEGER NOT NULL, - word VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - replacement VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE -);; - -ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);; - - -CREATE GENERATOR phpbb_words_gen;; -SET GENERATOR phpbb_words_gen TO 0;; - -CREATE TRIGGER t_phpbb_words FOR phpbb_words -BEFORE INSERT -AS -BEGIN - NEW.word_id = GEN_ID(phpbb_words_gen, 1); -END;; - - -# Table: 'phpbb_zebra' -CREATE TABLE phpbb_zebra ( - user_id INTEGER DEFAULT 0 NOT NULL, - zebra_id INTEGER DEFAULT 0 NOT NULL, - friend INTEGER DEFAULT 0 NOT NULL, - foe INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_zebra ADD PRIMARY KEY (user_id, zebra_id);; - - +# DO NOT EDIT THIS FILE, IT IS GENERATED
+#
+# To change the contents of this file, edit
+# phpBB/develop/create_schema_files.php and
+# run it.
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id INTEGER NOT NULL,
+ post_msg_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ in_message INTEGER DEFAULT 0 NOT NULL,
+ poster_id INTEGER DEFAULT 0 NOT NULL,
+ is_orphan INTEGER DEFAULT 1 NOT NULL,
+ physical_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ real_filename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ download_count INTEGER DEFAULT 0 NOT NULL,
+ attach_comment BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ mimetype VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ filesize INTEGER DEFAULT 0 NOT NULL,
+ filetime INTEGER DEFAULT 0 NOT NULL,
+ thumbnail INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_attachments ADD PRIMARY KEY (attach_id);;
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments(filetime);;
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments(post_msg_id);;
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments(topic_id);;
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments(poster_id);;
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments(is_orphan);;
+
+CREATE GENERATOR phpbb_attachments_gen;;
+SET GENERATOR phpbb_attachments_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_attachments FOR phpbb_attachments
+BEFORE INSERT
+AS
+BEGIN
+ NEW.attach_id = GEN_ID(phpbb_attachments_gen, 1);
+END;;
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ auth_option_id INTEGER DEFAULT 0 NOT NULL,
+ auth_role_id INTEGER DEFAULT 0 NOT NULL,
+ auth_setting INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups(group_id);;
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups(auth_option_id);;
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups(auth_role_id);;
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id INTEGER NOT NULL,
+ auth_option VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ is_global INTEGER DEFAULT 0 NOT NULL,
+ is_local INTEGER DEFAULT 0 NOT NULL,
+ founder_only INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_acl_options ADD PRIMARY KEY (auth_option_id);;
+
+CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options(auth_option);;
+
+CREATE GENERATOR phpbb_acl_options_gen;;
+SET GENERATOR phpbb_acl_options_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_acl_options FOR phpbb_acl_options
+BEFORE INSERT
+AS
+BEGIN
+ NEW.auth_option_id = GEN_ID(phpbb_acl_options_gen, 1);
+END;;
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id INTEGER NOT NULL,
+ role_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ role_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ role_type VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ role_order INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_acl_roles ADD PRIMARY KEY (role_id);;
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles(role_type);;
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles(role_order);;
+
+CREATE GENERATOR phpbb_acl_roles_gen;;
+SET GENERATOR phpbb_acl_roles_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_acl_roles FOR phpbb_acl_roles
+BEFORE INSERT
+AS
+BEGIN
+ NEW.role_id = GEN_ID(phpbb_acl_roles_gen, 1);
+END;;
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id INTEGER DEFAULT 0 NOT NULL,
+ auth_option_id INTEGER DEFAULT 0 NOT NULL,
+ auth_setting INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_acl_roles_data ADD PRIMARY KEY (role_id, auth_option_id);;
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data(auth_option_id);;
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ auth_option_id INTEGER DEFAULT 0 NOT NULL,
+ auth_role_id INTEGER DEFAULT 0 NOT NULL,
+ auth_setting INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id INTEGER NOT NULL,
+ ban_userid INTEGER DEFAULT 0 NOT NULL,
+ ban_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ ban_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ ban_start INTEGER DEFAULT 0 NOT NULL,
+ ban_end INTEGER DEFAULT 0 NOT NULL,
+ ban_exclude INTEGER DEFAULT 0 NOT NULL,
+ ban_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ ban_give_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_banlist ADD PRIMARY KEY (ban_id);;
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist(ban_end);;
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist(ban_userid, ban_exclude);;
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist(ban_email, ban_exclude);;
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist(ban_ip, ban_exclude);;
+
+CREATE GENERATOR phpbb_banlist_gen;;
+SET GENERATOR phpbb_banlist_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_banlist FOR phpbb_banlist
+BEFORE INSERT
+AS
+BEGIN
+ NEW.ban_id = GEN_ID(phpbb_banlist_gen, 1);
+END;;
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id INTEGER DEFAULT 0 NOT NULL,
+ bbcode_tag VARCHAR(16) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_helpline VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ display_on_posting INTEGER DEFAULT 0 NOT NULL,
+ bbcode_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ bbcode_tpl BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ first_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ first_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ second_pass_match BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ second_pass_replace BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_bbcodes ADD PRIMARY KEY (bbcode_id);;
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes(display_on_posting);;
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_bookmarks ADD PRIMARY KEY (topic_id, user_id);;
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id INTEGER NOT NULL,
+ bot_active INTEGER DEFAULT 1 NOT NULL,
+ bot_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ bot_agent VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bot_ip VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);;
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots(bot_active);;
+
+CREATE GENERATOR phpbb_bots_gen;;
+SET GENERATOR phpbb_bots_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_bots FOR phpbb_bots
+BEFORE INSERT
+AS
+BEGIN
+ NEW.bot_id = GEN_ID(phpbb_bots_gen, 1);
+END;;
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ is_dynamic INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_config ADD PRIMARY KEY (config_name);;
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);;
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ confirm_type INTEGER DEFAULT 0 NOT NULL,
+ code VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ seed INTEGER DEFAULT 0 NOT NULL,
+ attempts INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);;
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);;
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id INTEGER NOT NULL,
+ disallow_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);;
+
+
+CREATE GENERATOR phpbb_disallow_gen;;
+SET GENERATOR phpbb_disallow_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_disallow FOR phpbb_disallow
+BEFORE INSERT
+AS
+BEGIN
+ NEW.disallow_id = GEN_ID(phpbb_disallow_gen, 1);
+END;;
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ save_time INTEGER DEFAULT 0 NOT NULL,
+ draft_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ draft_message BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_drafts ADD PRIMARY KEY (draft_id);;
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts(save_time);;
+
+CREATE GENERATOR phpbb_drafts_gen;;
+SET GENERATOR phpbb_drafts_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_drafts FOR phpbb_drafts
+BEFORE INSERT
+AS
+BEGIN
+ NEW.draft_id = GEN_ID(phpbb_drafts_gen, 1);
+END;;
+
+
+# Table: 'phpbb_ext'
+CREATE TABLE phpbb_ext (
+ ext_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ ext_active INTEGER DEFAULT 0 NOT NULL,
+ ext_state BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+CREATE UNIQUE INDEX phpbb_ext_ext_name ON phpbb_ext(ext_name);;
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id INTEGER NOT NULL,
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ extension VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);;
+
+
+CREATE GENERATOR phpbb_extensions_gen;;
+SET GENERATOR phpbb_extensions_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_extensions FOR phpbb_extensions
+BEFORE INSERT
+AS
+BEGIN
+ NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1);
+END;;
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id INTEGER NOT NULL,
+ group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ cat_id INTEGER DEFAULT 0 NOT NULL,
+ allow_group INTEGER DEFAULT 0 NOT NULL,
+ download_mode INTEGER DEFAULT 1 NOT NULL,
+ upload_icon VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ max_filesize INTEGER DEFAULT 0 NOT NULL,
+ allowed_forums BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ allow_in_pm INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_extension_groups ADD PRIMARY KEY (group_id);;
+
+
+CREATE GENERATOR phpbb_extension_groups_gen;;
+SET GENERATOR phpbb_extension_groups_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_extension_groups FOR phpbb_extension_groups
+BEFORE INSERT
+AS
+BEGIN
+ NEW.group_id = GEN_ID(phpbb_extension_groups_gen, 1);
+END;;
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id INTEGER NOT NULL,
+ parent_id INTEGER DEFAULT 0 NOT NULL,
+ left_id INTEGER DEFAULT 0 NOT NULL,
+ right_id INTEGER DEFAULT 0 NOT NULL,
+ forum_parents BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ forum_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_desc_options INTEGER DEFAULT 7 NOT NULL,
+ forum_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_style INTEGER DEFAULT 0 NOT NULL,
+ forum_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_rules BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ forum_rules_link VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_rules_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_rules_options INTEGER DEFAULT 7 NOT NULL,
+ forum_rules_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
+ forum_type INTEGER DEFAULT 0 NOT NULL,
+ forum_status INTEGER DEFAULT 0 NOT NULL,
+ forum_posts INTEGER DEFAULT 0 NOT NULL,
+ forum_topics INTEGER DEFAULT 0 NOT NULL,
+ forum_topics_real INTEGER DEFAULT 0 NOT NULL,
+ forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
+ forum_last_poster_id INTEGER DEFAULT 0 NOT NULL,
+ forum_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_last_post_time INTEGER DEFAULT 0 NOT NULL,
+ forum_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ forum_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ forum_flags INTEGER DEFAULT 32 NOT NULL,
+ forum_options INTEGER DEFAULT 0 NOT NULL,
+ display_subforum_list INTEGER DEFAULT 1 NOT NULL,
+ display_on_index INTEGER DEFAULT 1 NOT NULL,
+ enable_indexing INTEGER DEFAULT 1 NOT NULL,
+ enable_icons INTEGER DEFAULT 1 NOT NULL,
+ enable_prune INTEGER DEFAULT 0 NOT NULL,
+ prune_next INTEGER DEFAULT 0 NOT NULL,
+ prune_days INTEGER DEFAULT 0 NOT NULL,
+ prune_viewed INTEGER DEFAULT 0 NOT NULL,
+ prune_freq INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);;
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums(left_id, right_id);;
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums(forum_last_post_id);;
+
+CREATE GENERATOR phpbb_forums_gen;;
+SET GENERATOR phpbb_forums_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_forums FOR phpbb_forums
+BEFORE INSERT
+AS
+BEGIN
+ NEW.forum_id = GEN_ID(phpbb_forums_gen, 1);
+END;;
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_forums_access ADD PRIMARY KEY (forum_id, user_id, session_id);;
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ mark_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_forums_track ADD PRIMARY KEY (user_id, forum_id);;
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ notify_status INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch(forum_id);;
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);;
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status);;
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id INTEGER NOT NULL,
+ group_type INTEGER DEFAULT 1 NOT NULL,
+ group_founder_manage INTEGER DEFAULT 0 NOT NULL,
+ group_skip_auth INTEGER DEFAULT 0 NOT NULL,
+ group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_desc_options INTEGER DEFAULT 7 NOT NULL,
+ group_desc_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_display INTEGER DEFAULT 0 NOT NULL,
+ group_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_avatar_type INTEGER DEFAULT 0 NOT NULL,
+ group_avatar_width INTEGER DEFAULT 0 NOT NULL,
+ group_avatar_height INTEGER DEFAULT 0 NOT NULL,
+ group_rank INTEGER DEFAULT 0 NOT NULL,
+ group_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ group_sig_chars INTEGER DEFAULT 0 NOT NULL,
+ group_receive_pm INTEGER DEFAULT 0 NOT NULL,
+ group_message_limit INTEGER DEFAULT 0 NOT NULL,
+ group_max_recipients INTEGER DEFAULT 0 NOT NULL,
+ group_legend INTEGER DEFAULT 0 NOT NULL,
+ group_teampage INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);;
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups(group_legend, group_name);;
+
+CREATE GENERATOR phpbb_groups_gen;;
+SET GENERATOR phpbb_groups_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_groups FOR phpbb_groups
+BEFORE INSERT
+AS
+BEGIN
+ NEW.group_id = GEN_ID(phpbb_groups_gen, 1);
+END;;
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id INTEGER NOT NULL,
+ icons_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ icons_width INTEGER DEFAULT 0 NOT NULL,
+ icons_height INTEGER DEFAULT 0 NOT NULL,
+ icons_order INTEGER DEFAULT 0 NOT NULL,
+ display_on_posting INTEGER DEFAULT 1 NOT NULL
+);;
+
+ALTER TABLE phpbb_icons ADD PRIMARY KEY (icons_id);;
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons(display_on_posting);;
+
+CREATE GENERATOR phpbb_icons_gen;;
+SET GENERATOR phpbb_icons_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_icons FOR phpbb_icons
+BEFORE INSERT
+AS
+BEGIN
+ NEW.icons_id = GEN_ID(phpbb_icons_gen, 1);
+END;;
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id INTEGER NOT NULL,
+ lang_iso VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ lang_dir VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ lang_english_name VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ lang_local_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ lang_author VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);;
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang(lang_iso);;
+
+CREATE GENERATOR phpbb_lang_gen;;
+SET GENERATOR phpbb_lang_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_lang FOR phpbb_lang
+BEFORE INSERT
+AS
+BEGIN
+ NEW.lang_id = GEN_ID(phpbb_lang_gen, 1);
+END;;
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id INTEGER NOT NULL,
+ log_type INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ reportee_id INTEGER DEFAULT 0 NOT NULL,
+ log_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ log_time INTEGER DEFAULT 0 NOT NULL,
+ log_operation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ log_data BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
+CREATE INDEX phpbb_log_log_time ON phpbb_log(log_time);;
+CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
+CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
+CREATE INDEX phpbb_log_user_id ON phpbb_log(user_id);;
+
+CREATE GENERATOR phpbb_log_gen;;
+SET GENERATOR phpbb_log_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_log FOR phpbb_log
+BEFORE INSERT
+AS
+BEGIN
+ NEW.log_id = GEN_ID(phpbb_log_gen, 1);
+END;;
+
+
+# Table: 'phpbb_login_attempts'
+CREATE TABLE phpbb_login_attempts (
+ attempt_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ attempt_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ attempt_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ attempt_time INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ username VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE,
+ username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT 0 NOT NULL COLLATE UNICODE
+);;
+
+CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts(attempt_ip, attempt_time);;
+CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts(attempt_forwarded_for, attempt_time);;
+CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts(attempt_time);;
+CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts(user_id);;
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ display_on_index INTEGER DEFAULT 1 NOT NULL
+);;
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache(display_on_index);;
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache(forum_id);;
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id INTEGER NOT NULL,
+ module_enabled INTEGER DEFAULT 1 NOT NULL,
+ module_display INTEGER DEFAULT 1 NOT NULL,
+ module_basename VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ module_class VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ parent_id INTEGER DEFAULT 0 NOT NULL,
+ left_id INTEGER DEFAULT 0 NOT NULL,
+ right_id INTEGER DEFAULT 0 NOT NULL,
+ module_langname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ module_mode VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ module_auth VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);;
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules(left_id, right_id);;
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules(module_enabled);;
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules(module_class, left_id);;
+
+CREATE GENERATOR phpbb_modules_gen;;
+SET GENERATOR phpbb_modules_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_modules FOR phpbb_modules
+BEFORE INSERT
+AS
+BEGIN
+ NEW.module_id = GEN_ID(phpbb_modules_gen, 1);
+END;;
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ poll_option_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ poll_option_total INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options(poll_option_id);;
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options(topic_id);;
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ poll_option_id INTEGER DEFAULT 0 NOT NULL,
+ vote_user_id INTEGER DEFAULT 0 NOT NULL,
+ vote_user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes(topic_id);;
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes(vote_user_id);;
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes(vote_user_ip);;
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id INTEGER NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ poster_id INTEGER DEFAULT 0 NOT NULL,
+ icon_id INTEGER DEFAULT 0 NOT NULL,
+ poster_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ post_time INTEGER DEFAULT 0 NOT NULL,
+ post_approved INTEGER DEFAULT 1 NOT NULL,
+ post_reported INTEGER DEFAULT 0 NOT NULL,
+ enable_bbcode INTEGER DEFAULT 1 NOT NULL,
+ enable_smilies INTEGER DEFAULT 1 NOT NULL,
+ enable_magic_url INTEGER DEFAULT 1 NOT NULL,
+ enable_sig INTEGER DEFAULT 1 NOT NULL,
+ post_username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ post_checksum VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ post_attachment INTEGER DEFAULT 0 NOT NULL,
+ bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ post_postcount INTEGER DEFAULT 1 NOT NULL,
+ post_edit_time INTEGER DEFAULT 0 NOT NULL,
+ post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ post_edit_user INTEGER DEFAULT 0 NOT NULL,
+ post_edit_count INTEGER DEFAULT 0 NOT NULL,
+ post_edit_locked INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts(forum_id);;
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);;
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);;
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);;
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);;
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username);;
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts(topic_id, post_time);;
+
+CREATE GENERATOR phpbb_posts_gen;;
+SET GENERATOR phpbb_posts_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_posts FOR phpbb_posts
+BEFORE INSERT
+AS
+BEGIN
+ NEW.post_id = GEN_ID(phpbb_posts_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id INTEGER NOT NULL,
+ root_level INTEGER DEFAULT 0 NOT NULL,
+ author_id INTEGER DEFAULT 0 NOT NULL,
+ icon_id INTEGER DEFAULT 0 NOT NULL,
+ author_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ message_time INTEGER DEFAULT 0 NOT NULL,
+ enable_bbcode INTEGER DEFAULT 1 NOT NULL,
+ enable_smilies INTEGER DEFAULT 1 NOT NULL,
+ enable_magic_url INTEGER DEFAULT 1 NOT NULL,
+ enable_sig INTEGER DEFAULT 1 NOT NULL,
+ message_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ message_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ message_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ message_edit_user INTEGER DEFAULT 0 NOT NULL,
+ message_attachment INTEGER DEFAULT 0 NOT NULL,
+ bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ message_edit_time INTEGER DEFAULT 0 NOT NULL,
+ message_edit_count INTEGER DEFAULT 0 NOT NULL,
+ to_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ bcc_address BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ message_reported INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_privmsgs ADD PRIMARY KEY (msg_id);;
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs(author_ip);;
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs(message_time);;
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs(author_id);;
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs(root_level);;
+
+CREATE GENERATOR phpbb_privmsgs_gen;;
+SET GENERATOR phpbb_privmsgs_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_privmsgs FOR phpbb_privmsgs
+BEFORE INSERT
+AS
+BEGIN
+ NEW.msg_id = GEN_ID(phpbb_privmsgs_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ folder_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ pm_count INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_privmsgs_folder ADD PRIMARY KEY (folder_id);;
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder(user_id);;
+
+CREATE GENERATOR phpbb_privmsgs_folder_gen;;
+SET GENERATOR phpbb_privmsgs_folder_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_privmsgs_folder FOR phpbb_privmsgs_folder
+BEFORE INSERT
+AS
+BEGIN
+ NEW.folder_id = GEN_ID(phpbb_privmsgs_folder_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ rule_check INTEGER DEFAULT 0 NOT NULL,
+ rule_connection INTEGER DEFAULT 0 NOT NULL,
+ rule_string VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ rule_user_id INTEGER DEFAULT 0 NOT NULL,
+ rule_group_id INTEGER DEFAULT 0 NOT NULL,
+ rule_action INTEGER DEFAULT 0 NOT NULL,
+ rule_folder_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_privmsgs_rules ADD PRIMARY KEY (rule_id);;
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules(user_id);;
+
+CREATE GENERATOR phpbb_privmsgs_rules_gen;;
+SET GENERATOR phpbb_privmsgs_rules_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_privmsgs_rules FOR phpbb_privmsgs_rules
+BEFORE INSERT
+AS
+BEGIN
+ NEW.rule_id = GEN_ID(phpbb_privmsgs_rules_gen, 1);
+END;;
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ author_id INTEGER DEFAULT 0 NOT NULL,
+ pm_deleted INTEGER DEFAULT 0 NOT NULL,
+ pm_new INTEGER DEFAULT 1 NOT NULL,
+ pm_unread INTEGER DEFAULT 1 NOT NULL,
+ pm_replied INTEGER DEFAULT 0 NOT NULL,
+ pm_marked INTEGER DEFAULT 0 NOT NULL,
+ pm_forwarded INTEGER DEFAULT 0 NOT NULL,
+ folder_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to(msg_id);;
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to(author_id);;
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder_id);;
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id INTEGER NOT NULL,
+ field_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_type INTEGER DEFAULT 0 NOT NULL,
+ field_ident VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_length VARCHAR(20) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_minlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_maxlen VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ field_novalue VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ field_required INTEGER DEFAULT 0 NOT NULL,
+ field_show_novalue INTEGER DEFAULT 0 NOT NULL,
+ field_show_on_reg INTEGER DEFAULT 0 NOT NULL,
+ field_show_on_pm INTEGER DEFAULT 0 NOT NULL,
+ field_show_on_vt INTEGER DEFAULT 0 NOT NULL,
+ field_show_profile INTEGER DEFAULT 0 NOT NULL,
+ field_hide INTEGER DEFAULT 0 NOT NULL,
+ field_no_view INTEGER DEFAULT 0 NOT NULL,
+ field_active INTEGER DEFAULT 0 NOT NULL,
+ field_order INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_profile_fields ADD PRIMARY KEY (field_id);;
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields(field_type);;
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields(field_order);;
+
+CREATE GENERATOR phpbb_profile_fields_gen;;
+SET GENERATOR phpbb_profile_fields_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_profile_fields FOR phpbb_profile_fields
+BEFORE INSERT
+AS
+BEGIN
+ NEW.field_id = GEN_ID(phpbb_profile_fields_gen, 1);
+END;;
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);;
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id INTEGER DEFAULT 0 NOT NULL,
+ lang_id INTEGER DEFAULT 0 NOT NULL,
+ option_id INTEGER DEFAULT 0 NOT NULL,
+ field_type INTEGER DEFAULT 0 NOT NULL,
+ lang_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);;
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id INTEGER DEFAULT 0 NOT NULL,
+ lang_id INTEGER DEFAULT 0 NOT NULL,
+ lang_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ lang_explain BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ lang_default_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id INTEGER NOT NULL,
+ rank_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ rank_min INTEGER DEFAULT 0 NOT NULL,
+ rank_special INTEGER DEFAULT 0 NOT NULL,
+ rank_image VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_ranks ADD PRIMARY KEY (rank_id);;
+
+
+CREATE GENERATOR phpbb_ranks_gen;;
+SET GENERATOR phpbb_ranks_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_ranks FOR phpbb_ranks
+BEFORE INSERT
+AS
+BEGIN
+ NEW.rank_id = GEN_ID(phpbb_ranks_gen, 1);
+END;;
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id INTEGER NOT NULL,
+ reason_id INTEGER DEFAULT 0 NOT NULL,
+ post_id INTEGER DEFAULT 0 NOT NULL,
+ pm_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ user_notify INTEGER DEFAULT 0 NOT NULL,
+ report_closed INTEGER DEFAULT 0 NOT NULL,
+ report_time INTEGER DEFAULT 0 NOT NULL,
+ report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports(post_id);;
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports(pm_id);;
+
+CREATE GENERATOR phpbb_reports_gen;;
+SET GENERATOR phpbb_reports_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_reports FOR phpbb_reports
+BEFORE INSERT
+AS
+BEGIN
+ NEW.report_id = GEN_ID(phpbb_reports_gen, 1);
+END;;
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INTEGER NOT NULL,
+ reason_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ reason_description BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ reason_order INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_reports_reasons ADD PRIMARY KEY (reason_id);;
+
+
+CREATE GENERATOR phpbb_reports_reasons_gen;;
+SET GENERATOR phpbb_reports_reasons_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_reports_reasons FOR phpbb_reports_reasons
+BEFORE INSERT
+AS
+BEGIN
+ NEW.reason_id = GEN_ID(phpbb_reports_reasons_gen, 1);
+END;;
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ search_time INTEGER DEFAULT 0 NOT NULL,
+ search_keywords BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ search_authors BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);;
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id INTEGER NOT NULL,
+ word_text VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ word_common INTEGER DEFAULT 0 NOT NULL,
+ word_count INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_search_wordlist ADD PRIMARY KEY (word_id);;
+
+CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist(word_text);;
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist(word_count);;
+
+CREATE GENERATOR phpbb_search_wordlist_gen;;
+SET GENERATOR phpbb_search_wordlist_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_search_wordlist FOR phpbb_search_wordlist
+BEFORE INSERT
+AS
+BEGIN
+ NEW.word_id = GEN_ID(phpbb_search_wordlist_gen, 1);
+END;;
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id INTEGER DEFAULT 0 NOT NULL,
+ word_id INTEGER DEFAULT 0 NOT NULL,
+ title_match INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch(word_id, post_id, title_match);;
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);;
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);;
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_user_id INTEGER DEFAULT 0 NOT NULL,
+ session_forum_id INTEGER DEFAULT 0 NOT NULL,
+ session_last_visit INTEGER DEFAULT 0 NOT NULL,
+ session_start INTEGER DEFAULT 0 NOT NULL,
+ session_time INTEGER DEFAULT 0 NOT NULL,
+ session_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_browser VARCHAR(150) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_forwarded_for VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ session_page VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ session_viewonline INTEGER DEFAULT 1 NOT NULL,
+ session_autologin INTEGER DEFAULT 0 NOT NULL,
+ session_admin INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);;
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions(session_time);;
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);;
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions(session_forum_id);;
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ last_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ last_login INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_sessions_keys ADD PRIMARY KEY (key_id, user_id);;
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);;
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id INTEGER NOT NULL,
+ site_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ site_hostname VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ ip_exclude INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_sitelist ADD PRIMARY KEY (site_id);;
+
+
+CREATE GENERATOR phpbb_sitelist_gen;;
+SET GENERATOR phpbb_sitelist_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_sitelist FOR phpbb_sitelist
+BEFORE INSERT
+AS
+BEGIN
+ NEW.site_id = GEN_ID(phpbb_sitelist_gen, 1);
+END;;
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id INTEGER NOT NULL,
+ code VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ emotion VARCHAR(50) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ smiley_url VARCHAR(50) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ smiley_width INTEGER DEFAULT 0 NOT NULL,
+ smiley_height INTEGER DEFAULT 0 NOT NULL,
+ smiley_order INTEGER DEFAULT 0 NOT NULL,
+ display_on_posting INTEGER DEFAULT 1 NOT NULL
+);;
+
+ALTER TABLE phpbb_smilies ADD PRIMARY KEY (smiley_id);;
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies(display_on_posting);;
+
+CREATE GENERATOR phpbb_smilies_gen;;
+SET GENERATOR phpbb_smilies_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_smilies FOR phpbb_smilies
+BEFORE INSERT
+AS
+BEGIN
+ NEW.smiley_id = GEN_ID(phpbb_smilies_gen, 1);
+END;;
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id INTEGER NOT NULL,
+ style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ style_active INTEGER DEFAULT 1 NOT NULL,
+ style_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL,
+ style_parent_id INTEGER DEFAULT 0 NOT NULL,
+ style_parent_tree BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
+
+CREATE GENERATOR phpbb_styles_gen;;
+SET GENERATOR phpbb_styles_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles FOR phpbb_styles
+BEFORE INSERT
+AS
+BEGIN
+ NEW.style_id = GEN_ID(phpbb_styles_gen, 1);
+END;;
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id INTEGER NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ icon_id INTEGER DEFAULT 0 NOT NULL,
+ topic_attachment INTEGER DEFAULT 0 NOT NULL,
+ topic_approved INTEGER DEFAULT 1 NOT NULL,
+ topic_reported INTEGER DEFAULT 0 NOT NULL,
+ topic_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_poster INTEGER DEFAULT 0 NOT NULL,
+ topic_time INTEGER DEFAULT 0 NOT NULL,
+ topic_time_limit INTEGER DEFAULT 0 NOT NULL,
+ topic_views INTEGER DEFAULT 0 NOT NULL,
+ topic_replies INTEGER DEFAULT 0 NOT NULL,
+ topic_replies_real INTEGER DEFAULT 0 NOT NULL,
+ topic_status INTEGER DEFAULT 0 NOT NULL,
+ topic_type INTEGER DEFAULT 0 NOT NULL,
+ topic_first_post_id INTEGER DEFAULT 0 NOT NULL,
+ topic_first_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_first_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ topic_last_post_id INTEGER DEFAULT 0 NOT NULL,
+ topic_last_poster_id INTEGER DEFAULT 0 NOT NULL,
+ topic_last_poster_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_last_poster_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ topic_last_post_subject VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ topic_last_post_time INTEGER DEFAULT 0 NOT NULL,
+ topic_last_view_time INTEGER DEFAULT 0 NOT NULL,
+ topic_moved_id INTEGER DEFAULT 0 NOT NULL,
+ topic_bumped INTEGER DEFAULT 0 NOT NULL,
+ topic_bumper INTEGER DEFAULT 0 NOT NULL,
+ poll_title VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ poll_start INTEGER DEFAULT 0 NOT NULL,
+ poll_length INTEGER DEFAULT 0 NOT NULL,
+ poll_max_options INTEGER DEFAULT 1 NOT NULL,
+ poll_last_vote INTEGER DEFAULT 0 NOT NULL,
+ poll_vote_change INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);;
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);;
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);;
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);;
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);;
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);;
+
+CREATE GENERATOR phpbb_topics_gen;;
+SET GENERATOR phpbb_topics_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_topics FOR phpbb_topics
+BEFORE INSERT
+AS
+BEGIN
+ NEW.topic_id = GEN_ID(phpbb_topics_gen, 1);
+END;;
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER DEFAULT 0 NOT NULL,
+ mark_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
+
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);;
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ topic_posted INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);;
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ notify_status INTEGER DEFAULT 0 NOT NULL
+);;
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch(topic_id);;
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch(user_id);;
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch(notify_status);;
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ group_leader INTEGER DEFAULT 0 NOT NULL,
+ user_pending INTEGER DEFAULT 1 NOT NULL
+);;
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group(group_id);;
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group(user_id);;
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group(group_leader);;
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id INTEGER NOT NULL,
+ user_type INTEGER DEFAULT 0 NOT NULL,
+ group_id INTEGER DEFAULT 3 NOT NULL,
+ user_permissions BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_perm_from INTEGER DEFAULT 0 NOT NULL,
+ user_ip VARCHAR(40) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_regdate INTEGER DEFAULT 0 NOT NULL,
+ username VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_password VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_passchg INTEGER DEFAULT 0 NOT NULL,
+ user_pass_convert INTEGER DEFAULT 0 NOT NULL,
+ user_email VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL,
+ user_birthday VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_lastvisit INTEGER DEFAULT 0 NOT NULL,
+ user_lastmark INTEGER DEFAULT 0 NOT NULL,
+ user_lastpost_time INTEGER DEFAULT 0 NOT NULL,
+ user_lastpage VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_last_confirm_key VARCHAR(10) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_last_search INTEGER DEFAULT 0 NOT NULL,
+ user_warnings INTEGER DEFAULT 0 NOT NULL,
+ user_last_warning INTEGER DEFAULT 0 NOT NULL,
+ user_login_attempts INTEGER DEFAULT 0 NOT NULL,
+ user_inactive_reason INTEGER DEFAULT 0 NOT NULL,
+ user_inactive_time INTEGER DEFAULT 0 NOT NULL,
+ user_posts INTEGER DEFAULT 0 NOT NULL,
+ user_lang VARCHAR(30) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_timezone VARCHAR(100) CHARACTER SET NONE DEFAULT 'UTC' NOT NULL,
+ user_dateformat VARCHAR(30) CHARACTER SET UTF8 DEFAULT 'd M Y H:i' NOT NULL COLLATE UNICODE,
+ user_style INTEGER DEFAULT 0 NOT NULL,
+ user_rank INTEGER DEFAULT 0 NOT NULL,
+ user_colour VARCHAR(6) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_new_privmsg INTEGER DEFAULT 0 NOT NULL,
+ user_unread_privmsg INTEGER DEFAULT 0 NOT NULL,
+ user_last_privmsg INTEGER DEFAULT 0 NOT NULL,
+ user_message_rules INTEGER DEFAULT 0 NOT NULL,
+ user_full_folder INTEGER DEFAULT -3 NOT NULL,
+ user_emailtime INTEGER DEFAULT 0 NOT NULL,
+ user_topic_show_days INTEGER DEFAULT 0 NOT NULL,
+ user_topic_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'd' NOT NULL,
+ user_post_show_days INTEGER DEFAULT 0 NOT NULL,
+ user_post_sortby_type VARCHAR(1) CHARACTER SET NONE DEFAULT 't' NOT NULL,
+ user_post_sortby_dir VARCHAR(1) CHARACTER SET NONE DEFAULT 'a' NOT NULL,
+ user_notify INTEGER DEFAULT 0 NOT NULL,
+ user_notify_pm INTEGER DEFAULT 1 NOT NULL,
+ user_notify_type INTEGER DEFAULT 0 NOT NULL,
+ user_allow_pm INTEGER DEFAULT 1 NOT NULL,
+ user_allow_viewonline INTEGER DEFAULT 1 NOT NULL,
+ user_allow_viewemail INTEGER DEFAULT 1 NOT NULL,
+ user_allow_massemail INTEGER DEFAULT 1 NOT NULL,
+ user_options INTEGER DEFAULT 230271 NOT NULL,
+ user_avatar VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_avatar_type INTEGER DEFAULT 0 NOT NULL,
+ user_avatar_width INTEGER DEFAULT 0 NOT NULL,
+ user_avatar_height INTEGER DEFAULT 0 NOT NULL,
+ user_sig BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ user_sig_bbcode_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_from VARCHAR(100) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_icq VARCHAR(15) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_aim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_yim VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
+ user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
+ user_newpasswd VARCHAR(40) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_form_salt VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ user_new INTEGER DEFAULT 1 NOT NULL,
+ user_reminded INTEGER DEFAULT 0 NOT NULL,
+ user_reminded_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);;
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users(user_birthday);;
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users(user_email_hash);;
+CREATE INDEX phpbb_users_user_type ON phpbb_users(user_type);;
+CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users(username_clean);;
+
+CREATE GENERATOR phpbb_users_gen;;
+SET GENERATOR phpbb_users_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_users FOR phpbb_users
+BEFORE INSERT
+AS
+BEGIN
+ NEW.user_id = GEN_ID(phpbb_users_gen, 1);
+END;;
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id INTEGER NOT NULL,
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ post_id INTEGER DEFAULT 0 NOT NULL,
+ log_id INTEGER DEFAULT 0 NOT NULL,
+ warning_time INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_warnings ADD PRIMARY KEY (warning_id);;
+
+
+CREATE GENERATOR phpbb_warnings_gen;;
+SET GENERATOR phpbb_warnings_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_warnings FOR phpbb_warnings
+BEFORE INSERT
+AS
+BEGIN
+ NEW.warning_id = GEN_ID(phpbb_warnings_gen, 1);
+END;;
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id INTEGER NOT NULL,
+ word VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
+ replacement VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE
+);;
+
+ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);;
+
+
+CREATE GENERATOR phpbb_words_gen;;
+SET GENERATOR phpbb_words_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_words FOR phpbb_words
+BEFORE INSERT
+AS
+BEGIN
+ NEW.word_id = GEN_ID(phpbb_words_gen, 1);
+END;;
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id INTEGER DEFAULT 0 NOT NULL,
+ zebra_id INTEGER DEFAULT 0 NOT NULL,
+ friend INTEGER DEFAULT 0 NOT NULL,
+ foe INTEGER DEFAULT 0 NOT NULL
+);;
+
+ALTER TABLE phpbb_zebra ADD PRIMARY KEY (user_id, zebra_id);;
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 9d0e81a66d..9c393b8361 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1,1657 +1,1655 @@ -/* - * DO NOT EDIT THIS FILE, IT IS GENERATED - * - * To change the contents of this file, edit - * phpBB/develop/create_schema_files.php and - * run it. - */ - -/* - Table: 'phpbb_attachments' -*/ -CREATE TABLE [phpbb_attachments] ( - [attach_id] [int] IDENTITY (1, 1) NOT NULL , - [post_msg_id] [int] DEFAULT (0) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [in_message] [int] DEFAULT (0) NOT NULL , - [poster_id] [int] DEFAULT (0) NOT NULL , - [is_orphan] [int] DEFAULT (1) NOT NULL , - [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL , - [real_filename] [varchar] (255) DEFAULT ('') NOT NULL , - [download_count] [int] DEFAULT (0) NOT NULL , - [attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL , - [extension] [varchar] (100) DEFAULT ('') NOT NULL , - [mimetype] [varchar] (100) DEFAULT ('') NOT NULL , - [filesize] [int] DEFAULT (0) NOT NULL , - [filetime] [int] DEFAULT (0) NOT NULL , - [thumbnail] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED - ( - [attach_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY] -GO - -CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY] -GO - -CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY] -GO - -CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_acl_groups' -*/ -CREATE TABLE [phpbb_acl_groups] ( - [group_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [auth_option_id] [int] DEFAULT (0) NOT NULL , - [auth_role_id] [int] DEFAULT (0) NOT NULL , - [auth_setting] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY] -GO - -CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY] -GO - -CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_acl_options' -*/ -CREATE TABLE [phpbb_acl_options] ( - [auth_option_id] [int] IDENTITY (1, 1) NOT NULL , - [auth_option] [varchar] (50) DEFAULT ('') NOT NULL , - [is_global] [int] DEFAULT (0) NOT NULL , - [is_local] [int] DEFAULT (0) NOT NULL , - [founder_only] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED - ( - [auth_option_id] - ) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_acl_roles' -*/ -CREATE TABLE [phpbb_acl_roles] ( - [role_id] [int] IDENTITY (1, 1) NOT NULL , - [role_name] [varchar] (255) DEFAULT ('') NOT NULL , - [role_description] [varchar] (4000) DEFAULT ('') NOT NULL , - [role_type] [varchar] (10) DEFAULT ('') NOT NULL , - [role_order] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED - ( - [role_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY] -GO - -CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_acl_roles_data' -*/ -CREATE TABLE [phpbb_acl_roles_data] ( - [role_id] [int] DEFAULT (0) NOT NULL , - [auth_option_id] [int] DEFAULT (0) NOT NULL , - [auth_setting] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED - ( - [role_id], - [auth_option_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_acl_users' -*/ -CREATE TABLE [phpbb_acl_users] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [auth_option_id] [int] DEFAULT (0) NOT NULL , - [auth_role_id] [int] DEFAULT (0) NOT NULL , - [auth_setting] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY] -GO - -CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_banlist' -*/ -CREATE TABLE [phpbb_banlist] ( - [ban_id] [int] IDENTITY (1, 1) NOT NULL , - [ban_userid] [int] DEFAULT (0) NOT NULL , - [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [ban_email] [varchar] (100) DEFAULT ('') NOT NULL , - [ban_start] [int] DEFAULT (0) NOT NULL , - [ban_end] [int] DEFAULT (0) NOT NULL , - [ban_exclude] [int] DEFAULT (0) NOT NULL , - [ban_reason] [varchar] (255) DEFAULT ('') NOT NULL , - [ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED - ( - [ban_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY] -GO - -CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY] -GO - -CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY] -GO - -CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_bbcodes' -*/ -CREATE TABLE [phpbb_bbcodes] ( - [bbcode_id] [int] DEFAULT (0) NOT NULL , - [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL , - [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL , - [display_on_posting] [int] DEFAULT (0) NOT NULL , - [bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL , - [bbcode_tpl] [text] DEFAULT ('') NOT NULL , - [first_pass_match] [text] DEFAULT ('') NOT NULL , - [first_pass_replace] [text] DEFAULT ('') NOT NULL , - [second_pass_match] [text] DEFAULT ('') NOT NULL , - [second_pass_replace] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED - ( - [bbcode_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_bookmarks' -*/ -CREATE TABLE [phpbb_bookmarks] ( - [topic_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED - ( - [topic_id], - [user_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_bots' -*/ -CREATE TABLE [phpbb_bots] ( - [bot_id] [int] IDENTITY (1, 1) NOT NULL , - [bot_active] [int] DEFAULT (1) NOT NULL , - [bot_name] [varchar] (255) DEFAULT ('') NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL , - [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_bots] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED - ( - [bot_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_config' -*/ -CREATE TABLE [phpbb_config] ( - [config_name] [varchar] (255) DEFAULT ('') NOT NULL , - [config_value] [varchar] (255) DEFAULT ('') NOT NULL , - [is_dynamic] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_config] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED - ( - [config_name] - ) ON [PRIMARY] -GO - -CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_confirm' -*/ -CREATE TABLE [phpbb_confirm] ( - [confirm_id] [char] (32) DEFAULT ('') NOT NULL , - [session_id] [char] (32) DEFAULT ('') NOT NULL , - [confirm_type] [int] DEFAULT (0) NOT NULL , - [code] [varchar] (8) DEFAULT ('') NOT NULL , - [seed] [int] DEFAULT (0) NOT NULL , - [attempts] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED - ( - [session_id], - [confirm_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_disallow' -*/ -CREATE TABLE [phpbb_disallow] ( - [disallow_id] [int] IDENTITY (1, 1) NOT NULL , - [disallow_username] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED - ( - [disallow_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_drafts' -*/ -CREATE TABLE [phpbb_drafts] ( - [draft_id] [int] IDENTITY (1, 1) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [save_time] [int] DEFAULT (0) NOT NULL , - [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL , - [draft_message] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED - ( - [draft_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_ext' -*/ -CREATE TABLE [phpbb_ext] ( - [ext_name] [varchar] (255) DEFAULT ('') NOT NULL , - [ext_active] [int] DEFAULT (0) NOT NULL , - [ext_state] [varchar] (8000) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [ext_name] ON [phpbb_ext]([ext_name]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_extensions' -*/ -CREATE TABLE [phpbb_extensions] ( - [extension_id] [int] IDENTITY (1, 1) NOT NULL , - [group_id] [int] DEFAULT (0) NOT NULL , - [extension] [varchar] (100) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED - ( - [extension_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_extension_groups' -*/ -CREATE TABLE [phpbb_extension_groups] ( - [group_id] [int] IDENTITY (1, 1) NOT NULL , - [group_name] [varchar] (255) DEFAULT ('') NOT NULL , - [cat_id] [int] DEFAULT (0) NOT NULL , - [allow_group] [int] DEFAULT (0) NOT NULL , - [download_mode] [int] DEFAULT (1) NOT NULL , - [upload_icon] [varchar] (255) DEFAULT ('') NOT NULL , - [max_filesize] [int] DEFAULT (0) NOT NULL , - [allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL , - [allow_in_pm] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED - ( - [group_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_forums' -*/ -CREATE TABLE [phpbb_forums] ( - [forum_id] [int] IDENTITY (1, 1) NOT NULL , - [parent_id] [int] DEFAULT (0) NOT NULL , - [left_id] [int] DEFAULT (0) NOT NULL , - [right_id] [int] DEFAULT (0) NOT NULL , - [forum_parents] [text] DEFAULT ('') NOT NULL , - [forum_name] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL , - [forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_desc_options] [int] DEFAULT (7) NOT NULL , - [forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL , - [forum_link] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_password] [varchar] (40) DEFAULT ('') NOT NULL , - [forum_style] [int] DEFAULT (0) NOT NULL , - [forum_image] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL , - [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_rules_options] [int] DEFAULT (7) NOT NULL , - [forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL , - [forum_topics_per_page] [int] DEFAULT (0) NOT NULL , - [forum_type] [int] DEFAULT (0) NOT NULL , - [forum_status] [int] DEFAULT (0) NOT NULL , - [forum_posts] [int] DEFAULT (0) NOT NULL , - [forum_topics] [int] DEFAULT (0) NOT NULL , - [forum_topics_real] [int] DEFAULT (0) NOT NULL , - [forum_last_post_id] [int] DEFAULT (0) NOT NULL , - [forum_last_poster_id] [int] DEFAULT (0) NOT NULL , - [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_last_post_time] [int] DEFAULT (0) NOT NULL , - [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , - [forum_flags] [int] DEFAULT (32) NOT NULL , - [forum_options] [int] DEFAULT (0) NOT NULL , - [display_subforum_list] [int] DEFAULT (1) NOT NULL , - [display_on_index] [int] DEFAULT (1) NOT NULL , - [enable_indexing] [int] DEFAULT (1) NOT NULL , - [enable_icons] [int] DEFAULT (1) NOT NULL , - [enable_prune] [int] DEFAULT (0) NOT NULL , - [prune_next] [int] DEFAULT (0) NOT NULL , - [prune_days] [int] DEFAULT (0) NOT NULL , - [prune_viewed] [int] DEFAULT (0) NOT NULL , - [prune_freq] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_forums] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED - ( - [forum_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY] -GO - -CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_forums_access' -*/ -CREATE TABLE [phpbb_forums_access] ( - [forum_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [session_id] [char] (32) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED - ( - [forum_id], - [user_id], - [session_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_forums_track' -*/ -CREATE TABLE [phpbb_forums_track] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [mark_time] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED - ( - [user_id], - [forum_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_forums_watch' -*/ -CREATE TABLE [phpbb_forums_watch] ( - [forum_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [notify_status] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_groups' -*/ -CREATE TABLE [phpbb_groups] ( - [group_id] [int] IDENTITY (1, 1) NOT NULL , - [group_type] [int] DEFAULT (1) NOT NULL , - [group_founder_manage] [int] DEFAULT (0) NOT NULL , - [group_skip_auth] [int] DEFAULT (0) NOT NULL , - [group_name] [varchar] (255) DEFAULT ('') NOT NULL , - [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL , - [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [group_desc_options] [int] DEFAULT (7) NOT NULL , - [group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL , - [group_display] [int] DEFAULT (0) NOT NULL , - [group_avatar] [varchar] (255) DEFAULT ('') NOT NULL , - [group_avatar_type] [int] DEFAULT (0) NOT NULL , - [group_avatar_width] [int] DEFAULT (0) NOT NULL , - [group_avatar_height] [int] DEFAULT (0) NOT NULL , - [group_rank] [int] DEFAULT (0) NOT NULL , - [group_colour] [varchar] (6) DEFAULT ('') NOT NULL , - [group_sig_chars] [int] DEFAULT (0) NOT NULL , - [group_receive_pm] [int] DEFAULT (0) NOT NULL , - [group_message_limit] [int] DEFAULT (0) NOT NULL , - [group_max_recipients] [int] DEFAULT (0) NOT NULL , - [group_legend] [int] DEFAULT (0) NOT NULL , - [group_teampage] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_groups] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED - ( - [group_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_icons' -*/ -CREATE TABLE [phpbb_icons] ( - [icons_id] [int] IDENTITY (1, 1) NOT NULL , - [icons_url] [varchar] (255) DEFAULT ('') NOT NULL , - [icons_width] [int] DEFAULT (0) NOT NULL , - [icons_height] [int] DEFAULT (0) NOT NULL , - [icons_order] [int] DEFAULT (0) NOT NULL , - [display_on_posting] [int] DEFAULT (1) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_icons] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED - ( - [icons_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_lang' -*/ -CREATE TABLE [phpbb_lang] ( - [lang_id] [int] IDENTITY (1, 1) NOT NULL , - [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL , - [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL , - [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL , - [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL , - [lang_author] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_lang] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED - ( - [lang_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_log' -*/ -CREATE TABLE [phpbb_log] ( - [log_id] [int] IDENTITY (1, 1) NOT NULL , - [log_type] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [reportee_id] [int] DEFAULT (0) NOT NULL , - [log_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [log_time] [int] DEFAULT (0) NOT NULL , - [log_operation] [varchar] (4000) DEFAULT ('') NOT NULL , - [log_data] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_log] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED - ( - [log_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY] -GO - -CREATE INDEX [log_time] ON [phpbb_log]([log_time]) ON [PRIMARY] -GO - -CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY] -GO - -CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_login_attempts' -*/ -CREATE TABLE [phpbb_login_attempts] ( - [attempt_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [attempt_browser] [varchar] (150) DEFAULT ('') NOT NULL , - [attempt_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL , - [attempt_time] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [username] [varchar] (255) DEFAULT (0) NOT NULL , - [username_clean] [varchar] (255) DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time]) ON [PRIMARY] -GO - -CREATE INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time]) ON [PRIMARY] -GO - -CREATE INDEX [att_time] ON [phpbb_login_attempts]([attempt_time]) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_login_attempts]([user_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_moderator_cache' -*/ -CREATE TABLE [phpbb_moderator_cache] ( - [forum_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [username] [varchar] (255) DEFAULT ('') NOT NULL , - [group_id] [int] DEFAULT (0) NOT NULL , - [group_name] [varchar] (255) DEFAULT ('') NOT NULL , - [display_on_index] [int] DEFAULT (1) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY] -GO - -CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_modules' -*/ -CREATE TABLE [phpbb_modules] ( - [module_id] [int] IDENTITY (1, 1) NOT NULL , - [module_enabled] [int] DEFAULT (1) NOT NULL , - [module_display] [int] DEFAULT (1) NOT NULL , - [module_basename] [varchar] (255) DEFAULT ('') NOT NULL , - [module_class] [varchar] (10) DEFAULT ('') NOT NULL , - [parent_id] [int] DEFAULT (0) NOT NULL , - [left_id] [int] DEFAULT (0) NOT NULL , - [right_id] [int] DEFAULT (0) NOT NULL , - [module_langname] [varchar] (255) DEFAULT ('') NOT NULL , - [module_mode] [varchar] (255) DEFAULT ('') NOT NULL , - [module_auth] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_modules] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED - ( - [module_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY] -GO - -CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY] -GO - -CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_poll_options' -*/ -CREATE TABLE [phpbb_poll_options] ( - [poll_option_id] [int] DEFAULT (0) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL , - [poll_option_total] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_poll_votes' -*/ -CREATE TABLE [phpbb_poll_votes] ( - [topic_id] [int] DEFAULT (0) NOT NULL , - [poll_option_id] [int] DEFAULT (0) NOT NULL , - [vote_user_id] [int] DEFAULT (0) NOT NULL , - [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY] -GO - -CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY] -GO - -CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_posts' -*/ -CREATE TABLE [phpbb_posts] ( - [post_id] [int] IDENTITY (1, 1) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [poster_id] [int] DEFAULT (0) NOT NULL , - [icon_id] [int] DEFAULT (0) NOT NULL , - [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [post_time] [int] DEFAULT (0) NOT NULL , - [post_approved] [int] DEFAULT (1) NOT NULL , - [post_reported] [int] DEFAULT (0) NOT NULL , - [enable_bbcode] [int] DEFAULT (1) NOT NULL , - [enable_smilies] [int] DEFAULT (1) NOT NULL , - [enable_magic_url] [int] DEFAULT (1) NOT NULL , - [enable_sig] [int] DEFAULT (1) NOT NULL , - [post_username] [varchar] (255) DEFAULT ('') NOT NULL , - [post_subject] [varchar] (255) DEFAULT ('') NOT NULL , - [post_text] [text] DEFAULT ('') NOT NULL , - [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL , - [post_attachment] [int] DEFAULT (0) NOT NULL , - [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , - [post_postcount] [int] DEFAULT (1) NOT NULL , - [post_edit_time] [int] DEFAULT (0) NOT NULL , - [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL , - [post_edit_user] [int] DEFAULT (0) NOT NULL , - [post_edit_count] [int] DEFAULT (0) NOT NULL , - [post_edit_locked] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_posts] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED - ( - [post_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY] -GO - -CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY] -GO - -CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY] -GO - -CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY] -GO - -CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY] -GO - -CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_privmsgs' -*/ -CREATE TABLE [phpbb_privmsgs] ( - [msg_id] [int] IDENTITY (1, 1) NOT NULL , - [root_level] [int] DEFAULT (0) NOT NULL , - [author_id] [int] DEFAULT (0) NOT NULL , - [icon_id] [int] DEFAULT (0) NOT NULL , - [author_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [message_time] [int] DEFAULT (0) NOT NULL , - [enable_bbcode] [int] DEFAULT (1) NOT NULL , - [enable_smilies] [int] DEFAULT (1) NOT NULL , - [enable_magic_url] [int] DEFAULT (1) NOT NULL , - [enable_sig] [int] DEFAULT (1) NOT NULL , - [message_subject] [varchar] (255) DEFAULT ('') NOT NULL , - [message_text] [text] DEFAULT ('') NOT NULL , - [message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL , - [message_edit_user] [int] DEFAULT (0) NOT NULL , - [message_attachment] [int] DEFAULT (0) NOT NULL , - [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , - [message_edit_time] [int] DEFAULT (0) NOT NULL , - [message_edit_count] [int] DEFAULT (0) NOT NULL , - [to_address] [varchar] (4000) DEFAULT ('') NOT NULL , - [bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL , - [message_reported] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED - ( - [msg_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY] -GO - -CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY] -GO - -CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY] -GO - -CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_privmsgs_folder' -*/ -CREATE TABLE [phpbb_privmsgs_folder] ( - [folder_id] [int] IDENTITY (1, 1) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [folder_name] [varchar] (255) DEFAULT ('') NOT NULL , - [pm_count] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED - ( - [folder_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_privmsgs_rules' -*/ -CREATE TABLE [phpbb_privmsgs_rules] ( - [rule_id] [int] IDENTITY (1, 1) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [rule_check] [int] DEFAULT (0) NOT NULL , - [rule_connection] [int] DEFAULT (0) NOT NULL , - [rule_string] [varchar] (255) DEFAULT ('') NOT NULL , - [rule_user_id] [int] DEFAULT (0) NOT NULL , - [rule_group_id] [int] DEFAULT (0) NOT NULL , - [rule_action] [int] DEFAULT (0) NOT NULL , - [rule_folder_id] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED - ( - [rule_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_privmsgs_to' -*/ -CREATE TABLE [phpbb_privmsgs_to] ( - [msg_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [author_id] [int] DEFAULT (0) NOT NULL , - [pm_deleted] [int] DEFAULT (0) NOT NULL , - [pm_new] [int] DEFAULT (1) NOT NULL , - [pm_unread] [int] DEFAULT (1) NOT NULL , - [pm_replied] [int] DEFAULT (0) NOT NULL , - [pm_marked] [int] DEFAULT (0) NOT NULL , - [pm_forwarded] [int] DEFAULT (0) NOT NULL , - [folder_id] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY] -GO - -CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY] -GO - -CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_profile_fields' -*/ -CREATE TABLE [phpbb_profile_fields] ( - [field_id] [int] IDENTITY (1, 1) NOT NULL , - [field_name] [varchar] (255) DEFAULT ('') NOT NULL , - [field_type] [int] DEFAULT (0) NOT NULL , - [field_ident] [varchar] (20) DEFAULT ('') NOT NULL , - [field_length] [varchar] (20) DEFAULT ('') NOT NULL , - [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL , - [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL , - [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL , - [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL , - [field_validation] [varchar] (20) DEFAULT ('') NOT NULL , - [field_required] [int] DEFAULT (0) NOT NULL , - [field_show_novalue] [int] DEFAULT (0) NOT NULL , - [field_show_on_reg] [int] DEFAULT (0) NOT NULL , - [field_show_on_pm] [int] DEFAULT (0) NOT NULL , - [field_show_on_vt] [int] DEFAULT (0) NOT NULL , - [field_show_profile] [int] DEFAULT (0) NOT NULL , - [field_hide] [int] DEFAULT (0) NOT NULL , - [field_no_view] [int] DEFAULT (0) NOT NULL , - [field_active] [int] DEFAULT (0) NOT NULL , - [field_order] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED - ( - [field_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY] -GO - -CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_profile_fields_data' -*/ -CREATE TABLE [phpbb_profile_fields_data] ( - [user_id] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED - ( - [user_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_profile_fields_lang' -*/ -CREATE TABLE [phpbb_profile_fields_lang] ( - [field_id] [int] DEFAULT (0) NOT NULL , - [lang_id] [int] DEFAULT (0) NOT NULL , - [option_id] [int] DEFAULT (0) NOT NULL , - [field_type] [int] DEFAULT (0) NOT NULL , - [lang_value] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED - ( - [field_id], - [lang_id], - [option_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_profile_lang' -*/ -CREATE TABLE [phpbb_profile_lang] ( - [field_id] [int] DEFAULT (0) NOT NULL , - [lang_id] [int] DEFAULT (0) NOT NULL , - [lang_name] [varchar] (255) DEFAULT ('') NOT NULL , - [lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL , - [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED - ( - [field_id], - [lang_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_ranks' -*/ -CREATE TABLE [phpbb_ranks] ( - [rank_id] [int] IDENTITY (1, 1) NOT NULL , - [rank_title] [varchar] (255) DEFAULT ('') NOT NULL , - [rank_min] [int] DEFAULT (0) NOT NULL , - [rank_special] [int] DEFAULT (0) NOT NULL , - [rank_image] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED - ( - [rank_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_reports' -*/ -CREATE TABLE [phpbb_reports] ( - [report_id] [int] IDENTITY (1, 1) NOT NULL , - [reason_id] [int] DEFAULT (0) NOT NULL , - [post_id] [int] DEFAULT (0) NOT NULL , - [pm_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [user_notify] [int] DEFAULT (0) NOT NULL , - [report_closed] [int] DEFAULT (0) NOT NULL , - [report_time] [int] DEFAULT (0) NOT NULL , - [report_text] [text] DEFAULT ('') NOT NULL , - [reported_post_text] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_reports] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED - ( - [report_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [post_id] ON [phpbb_reports]([post_id]) ON [PRIMARY] -GO - -CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_reports_reasons' -*/ -CREATE TABLE [phpbb_reports_reasons] ( - [reason_id] [int] IDENTITY (1, 1) NOT NULL , - [reason_title] [varchar] (255) DEFAULT ('') NOT NULL , - [reason_description] [text] DEFAULT ('') NOT NULL , - [reason_order] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED - ( - [reason_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_search_results' -*/ -CREATE TABLE [phpbb_search_results] ( - [search_key] [varchar] (32) DEFAULT ('') NOT NULL , - [search_time] [int] DEFAULT (0) NOT NULL , - [search_keywords] [text] DEFAULT ('') NOT NULL , - [search_authors] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED - ( - [search_key] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_search_wordlist' -*/ -CREATE TABLE [phpbb_search_wordlist] ( - [word_id] [int] IDENTITY (1, 1) NOT NULL , - [word_text] [varchar] (255) DEFAULT ('') NOT NULL , - [word_common] [int] DEFAULT (0) NOT NULL , - [word_count] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED - ( - [word_id] - ) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY] -GO - -CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_search_wordmatch' -*/ -CREATE TABLE [phpbb_search_wordmatch] ( - [post_id] [int] DEFAULT (0) NOT NULL , - [word_id] [int] DEFAULT (0) NOT NULL , - [title_match] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY] -GO - -CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY] -GO - -CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_sessions' -*/ -CREATE TABLE [phpbb_sessions] ( - [session_id] [char] (32) DEFAULT ('') NOT NULL , - [session_user_id] [int] DEFAULT (0) NOT NULL , - [session_forum_id] [int] DEFAULT (0) NOT NULL , - [session_last_visit] [int] DEFAULT (0) NOT NULL , - [session_start] [int] DEFAULT (0) NOT NULL , - [session_time] [int] DEFAULT (0) NOT NULL , - [session_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [session_browser] [varchar] (150) DEFAULT ('') NOT NULL , - [session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL , - [session_page] [varchar] (255) DEFAULT ('') NOT NULL , - [session_viewonline] [int] DEFAULT (1) NOT NULL , - [session_autologin] [int] DEFAULT (0) NOT NULL , - [session_admin] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED - ( - [session_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY] -GO - -CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY] -GO - -CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_sessions_keys' -*/ -CREATE TABLE [phpbb_sessions_keys] ( - [key_id] [char] (32) DEFAULT ('') NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [last_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [last_login] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED - ( - [key_id], - [user_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_sitelist' -*/ -CREATE TABLE [phpbb_sitelist] ( - [site_id] [int] IDENTITY (1, 1) NOT NULL , - [site_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [site_hostname] [varchar] (255) DEFAULT ('') NOT NULL , - [ip_exclude] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED - ( - [site_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_smilies' -*/ -CREATE TABLE [phpbb_smilies] ( - [smiley_id] [int] IDENTITY (1, 1) NOT NULL , - [code] [varchar] (50) DEFAULT ('') NOT NULL , - [emotion] [varchar] (50) DEFAULT ('') NOT NULL , - [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL , - [smiley_width] [int] DEFAULT (0) NOT NULL , - [smiley_height] [int] DEFAULT (0) NOT NULL , - [smiley_order] [int] DEFAULT (0) NOT NULL , - [display_on_posting] [int] DEFAULT (1) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED - ( - [smiley_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_styles' -*/ -CREATE TABLE [phpbb_styles] ( - [style_id] [int] IDENTITY (1, 1) NOT NULL , - [style_name] [varchar] (255) DEFAULT ('') NOT NULL , - [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL , - [style_active] [int] DEFAULT (1) NOT NULL , - [style_path] [varchar] (100) DEFAULT ('') NOT NULL , - [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL , - [style_parent_id] [int] DEFAULT (0) NOT NULL , - [style_parent_tree] [varchar] (8000) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_styles] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED - ( - [style_id] - ) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_topics' -*/ -CREATE TABLE [phpbb_topics] ( - [topic_id] [int] IDENTITY (1, 1) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [icon_id] [int] DEFAULT (0) NOT NULL , - [topic_attachment] [int] DEFAULT (0) NOT NULL , - [topic_approved] [int] DEFAULT (1) NOT NULL , - [topic_reported] [int] DEFAULT (0) NOT NULL , - [topic_title] [varchar] (255) DEFAULT ('') NOT NULL , - [topic_poster] [int] DEFAULT (0) NOT NULL , - [topic_time] [int] DEFAULT (0) NOT NULL , - [topic_time_limit] [int] DEFAULT (0) NOT NULL , - [topic_views] [int] DEFAULT (0) NOT NULL , - [topic_replies] [int] DEFAULT (0) NOT NULL , - [topic_replies_real] [int] DEFAULT (0) NOT NULL , - [topic_status] [int] DEFAULT (0) NOT NULL , - [topic_type] [int] DEFAULT (0) NOT NULL , - [topic_first_post_id] [int] DEFAULT (0) NOT NULL , - [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , - [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , - [topic_last_post_id] [int] DEFAULT (0) NOT NULL , - [topic_last_poster_id] [int] DEFAULT (0) NOT NULL , - [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , - [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , - [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL , - [topic_last_post_time] [int] DEFAULT (0) NOT NULL , - [topic_last_view_time] [int] DEFAULT (0) NOT NULL , - [topic_moved_id] [int] DEFAULT (0) NOT NULL , - [topic_bumped] [int] DEFAULT (0) NOT NULL , - [topic_bumper] [int] DEFAULT (0) NOT NULL , - [poll_title] [varchar] (255) DEFAULT ('') NOT NULL , - [poll_start] [int] DEFAULT (0) NOT NULL , - [poll_length] [int] DEFAULT (0) NOT NULL , - [poll_max_options] [int] DEFAULT (1) NOT NULL , - [poll_last_vote] [int] DEFAULT (0) NOT NULL , - [poll_vote_change] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_topics] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED - ( - [topic_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY] -GO - -CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY] -GO - -CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY] -GO - -CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY] -GO - -CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY] -GO - -CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_topics_track' -*/ -CREATE TABLE [phpbb_topics_track] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [forum_id] [int] DEFAULT (0) NOT NULL , - [mark_time] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED - ( - [user_id], - [topic_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY] -GO - -CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_topics_posted' -*/ -CREATE TABLE [phpbb_topics_posted] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [topic_id] [int] DEFAULT (0) NOT NULL , - [topic_posted] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED - ( - [user_id], - [topic_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_topics_watch' -*/ -CREATE TABLE [phpbb_topics_watch] ( - [topic_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [notify_status] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_user_group' -*/ -CREATE TABLE [phpbb_user_group] ( - [group_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [group_leader] [int] DEFAULT (0) NOT NULL , - [user_pending] [int] DEFAULT (1) NOT NULL -) ON [PRIMARY] -GO - -CREATE INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_users' -*/ -CREATE TABLE [phpbb_users] ( - [user_id] [int] IDENTITY (1, 1) NOT NULL , - [user_type] [int] DEFAULT (0) NOT NULL , - [group_id] [int] DEFAULT (3) NOT NULL , - [user_permissions] [text] DEFAULT ('') NOT NULL , - [user_perm_from] [int] DEFAULT (0) NOT NULL , - [user_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [user_regdate] [int] DEFAULT (0) NOT NULL , - [username] [varchar] (255) DEFAULT ('') NOT NULL , - [username_clean] [varchar] (255) DEFAULT ('') NOT NULL , - [user_password] [varchar] (40) DEFAULT ('') NOT NULL , - [user_passchg] [int] DEFAULT (0) NOT NULL , - [user_pass_convert] [int] DEFAULT (0) NOT NULL , - [user_email] [varchar] (100) DEFAULT ('') NOT NULL , - [user_email_hash] [float] DEFAULT (0) NOT NULL , - [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL , - [user_lastvisit] [int] DEFAULT (0) NOT NULL , - [user_lastmark] [int] DEFAULT (0) NOT NULL , - [user_lastpost_time] [int] DEFAULT (0) NOT NULL , - [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL , - [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL , - [user_last_search] [int] DEFAULT (0) NOT NULL , - [user_warnings] [int] DEFAULT (0) NOT NULL , - [user_last_warning] [int] DEFAULT (0) NOT NULL , - [user_login_attempts] [int] DEFAULT (0) NOT NULL , - [user_inactive_reason] [int] DEFAULT (0) NOT NULL , - [user_inactive_time] [int] DEFAULT (0) NOT NULL , - [user_posts] [int] DEFAULT (0) NOT NULL , - [user_lang] [varchar] (30) DEFAULT ('') NOT NULL , - [user_timezone] [varchar] (100) DEFAULT ('UTC') NOT NULL , - [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL , - [user_style] [int] DEFAULT (0) NOT NULL , - [user_rank] [int] DEFAULT (0) NOT NULL , - [user_colour] [varchar] (6) DEFAULT ('') NOT NULL , - [user_new_privmsg] [int] DEFAULT (0) NOT NULL , - [user_unread_privmsg] [int] DEFAULT (0) NOT NULL , - [user_last_privmsg] [int] DEFAULT (0) NOT NULL , - [user_message_rules] [int] DEFAULT (0) NOT NULL , - [user_full_folder] [int] DEFAULT (-3) NOT NULL , - [user_emailtime] [int] DEFAULT (0) NOT NULL , - [user_topic_show_days] [int] DEFAULT (0) NOT NULL , - [user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL , - [user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL , - [user_post_show_days] [int] DEFAULT (0) NOT NULL , - [user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL , - [user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL , - [user_notify] [int] DEFAULT (0) NOT NULL , - [user_notify_pm] [int] DEFAULT (1) NOT NULL , - [user_notify_type] [int] DEFAULT (0) NOT NULL , - [user_allow_pm] [int] DEFAULT (1) NOT NULL , - [user_allow_viewonline] [int] DEFAULT (1) NOT NULL , - [user_allow_viewemail] [int] DEFAULT (1) NOT NULL , - [user_allow_massemail] [int] DEFAULT (1) NOT NULL , - [user_options] [int] DEFAULT (230271) NOT NULL , - [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL , - [user_avatar_type] [int] DEFAULT (0) NOT NULL , - [user_avatar_width] [int] DEFAULT (0) NOT NULL , - [user_avatar_height] [int] DEFAULT (0) NOT NULL , - [user_sig] [text] DEFAULT ('') NOT NULL , - [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , - [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , - [user_from] [varchar] (100) DEFAULT ('') NOT NULL , - [user_icq] [varchar] (15) DEFAULT ('') NOT NULL , - [user_aim] [varchar] (255) DEFAULT ('') NOT NULL , - [user_yim] [varchar] (255) DEFAULT ('') NOT NULL , - [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , - [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , - [user_website] [varchar] (200) DEFAULT ('') NOT NULL , - [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL , - [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL , - [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , - [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL , - [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL , - [user_new] [int] DEFAULT (1) NOT NULL , - [user_reminded] [int] DEFAULT (0) NOT NULL , - [user_reminded_time] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -ALTER TABLE [phpbb_users] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED - ( - [user_id] - ) ON [PRIMARY] -GO - -CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY] -GO - -CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY] -GO - -CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_warnings' -*/ -CREATE TABLE [phpbb_warnings] ( - [warning_id] [int] IDENTITY (1, 1) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [post_id] [int] DEFAULT (0) NOT NULL , - [log_id] [int] DEFAULT (0) NOT NULL , - [warning_time] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED - ( - [warning_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_words' -*/ -CREATE TABLE [phpbb_words] ( - [word_id] [int] IDENTITY (1, 1) NOT NULL , - [word] [varchar] (255) DEFAULT ('') NOT NULL , - [replacement] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_words] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED - ( - [word_id] - ) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_zebra' -*/ -CREATE TABLE [phpbb_zebra] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [zebra_id] [int] DEFAULT (0) NOT NULL , - [friend] [int] DEFAULT (0) NOT NULL , - [foe] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED - ( - [user_id], - [zebra_id] - ) ON [PRIMARY] -GO - - +/*
+ * DO NOT EDIT THIS FILE, IT IS GENERATED
+ *
+ * To change the contents of this file, edit
+ * phpBB/develop/create_schema_files.php and
+ * run it.
+ */
+
+/*
+ Table: 'phpbb_attachments'
+*/
+CREATE TABLE [phpbb_attachments] (
+ [attach_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [post_msg_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [in_message] [int] DEFAULT (0) NOT NULL ,
+ [poster_id] [int] DEFAULT (0) NOT NULL ,
+ [is_orphan] [int] DEFAULT (1) NOT NULL ,
+ [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [real_filename] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [download_count] [int] DEFAULT (0) NOT NULL ,
+ [attach_comment] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [extension] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [mimetype] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [filesize] [int] DEFAULT (0) NOT NULL ,
+ [filetime] [int] DEFAULT (0) NOT NULL ,
+ [thumbnail] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED
+ (
+ [attach_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_groups'
+*/
+CREATE TABLE [phpbb_acl_groups] (
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_option_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_role_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_setting] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_id] ON [phpbb_acl_groups]([group_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_opt_id] ON [phpbb_acl_groups]([auth_option_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_role_id] ON [phpbb_acl_groups]([auth_role_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_options'
+*/
+CREATE TABLE [phpbb_acl_options] (
+ [auth_option_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [auth_option] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [is_global] [int] DEFAULT (0) NOT NULL ,
+ [is_local] [int] DEFAULT (0) NOT NULL ,
+ [founder_only] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_acl_options] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_options] PRIMARY KEY CLUSTERED
+ (
+ [auth_option_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [auth_option] ON [phpbb_acl_options]([auth_option]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_roles'
+*/
+CREATE TABLE [phpbb_acl_roles] (
+ [role_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [role_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [role_description] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [role_type] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [role_order] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_acl_roles] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_roles] PRIMARY KEY CLUSTERED
+ (
+ [role_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [role_type] ON [phpbb_acl_roles]([role_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [role_order] ON [phpbb_acl_roles]([role_order]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_roles_data'
+*/
+CREATE TABLE [phpbb_acl_roles_data] (
+ [role_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_option_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_setting] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_acl_roles_data] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_acl_roles_data] PRIMARY KEY CLUSTERED
+ (
+ [role_id],
+ [auth_option_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [ath_op_id] ON [phpbb_acl_roles_data]([auth_option_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_acl_users'
+*/
+CREATE TABLE [phpbb_acl_users] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_option_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_role_id] [int] DEFAULT (0) NOT NULL ,
+ [auth_setting] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_acl_users]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_option_id] ON [phpbb_acl_users]([auth_option_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_banlist'
+*/
+CREATE TABLE [phpbb_banlist] (
+ [ban_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [ban_userid] [int] DEFAULT (0) NOT NULL ,
+ [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [ban_email] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [ban_start] [int] DEFAULT (0) NOT NULL ,
+ [ban_end] [int] DEFAULT (0) NOT NULL ,
+ [ban_exclude] [int] DEFAULT (0) NOT NULL ,
+ [ban_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [ban_give_reason] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
+ (
+ [ban_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_end] ON [phpbb_banlist]([ban_end]) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_user] ON [phpbb_banlist]([ban_userid], [ban_exclude]) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_email] ON [phpbb_banlist]([ban_email], [ban_exclude]) ON [PRIMARY]
+GO
+
+CREATE INDEX [ban_ip] ON [phpbb_banlist]([ban_ip], [ban_exclude]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_bbcodes'
+*/
+CREATE TABLE [phpbb_bbcodes] (
+ [bbcode_id] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL ,
+ [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [display_on_posting] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_match] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [bbcode_tpl] [text] DEFAULT ('') NOT NULL ,
+ [first_pass_match] [text] DEFAULT ('') NOT NULL ,
+ [first_pass_replace] [text] DEFAULT ('') NOT NULL ,
+ [second_pass_match] [text] DEFAULT ('') NOT NULL ,
+ [second_pass_replace] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_bbcodes] PRIMARY KEY CLUSTERED
+ (
+ [bbcode_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [display_on_post] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_bookmarks'
+*/
+CREATE TABLE [phpbb_bookmarks] (
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_bookmarks] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_bookmarks] PRIMARY KEY CLUSTERED
+ (
+ [topic_id],
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_bots'
+*/
+CREATE TABLE [phpbb_bots] (
+ [bot_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [bot_active] [int] DEFAULT (1) NOT NULL ,
+ [bot_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_bots] PRIMARY KEY CLUSTERED
+ (
+ [bot_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_config'
+*/
+CREATE TABLE [phpbb_config] (
+ [config_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [config_value] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [is_dynamic] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_config] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_config] PRIMARY KEY CLUSTERED
+ (
+ [config_name]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [is_dynamic] ON [phpbb_config]([is_dynamic]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_confirm'
+*/
+CREATE TABLE [phpbb_confirm] (
+ [confirm_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [session_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [confirm_type] [int] DEFAULT (0) NOT NULL ,
+ [code] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [seed] [int] DEFAULT (0) NOT NULL ,
+ [attempts] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
+ (
+ [session_id],
+ [confirm_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [confirm_type] ON [phpbb_confirm]([confirm_type]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_disallow'
+*/
+CREATE TABLE [phpbb_disallow] (
+ [disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [disallow_username] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
+ (
+ [disallow_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_drafts'
+*/
+CREATE TABLE [phpbb_drafts] (
+ [draft_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [save_time] [int] DEFAULT (0) NOT NULL ,
+ [draft_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [draft_message] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_drafts] PRIMARY KEY CLUSTERED
+ (
+ [draft_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [save_time] ON [phpbb_drafts]([save_time]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_ext'
+*/
+CREATE TABLE [phpbb_ext] (
+ [ext_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [ext_active] [int] DEFAULT (0) NOT NULL ,
+ [ext_state] [varchar] (8000) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [ext_name] ON [phpbb_ext]([ext_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_extensions'
+*/
+CREATE TABLE [phpbb_extensions] (
+ [extension_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [extension] [varchar] (100) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
+ (
+ [extension_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_extension_groups'
+*/
+CREATE TABLE [phpbb_extension_groups] (
+ [group_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [cat_id] [int] DEFAULT (0) NOT NULL ,
+ [allow_group] [int] DEFAULT (0) NOT NULL ,
+ [download_mode] [int] DEFAULT (1) NOT NULL ,
+ [upload_icon] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [max_filesize] [int] DEFAULT (0) NOT NULL ,
+ [allowed_forums] [varchar] (8000) DEFAULT ('') NOT NULL ,
+ [allow_in_pm] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_extension_groups] PRIMARY KEY CLUSTERED
+ (
+ [group_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums'
+*/
+CREATE TABLE [phpbb_forums] (
+ [forum_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [parent_id] [int] DEFAULT (0) NOT NULL ,
+ [left_id] [int] DEFAULT (0) NOT NULL ,
+ [right_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_parents] [text] DEFAULT ('') NOT NULL ,
+ [forum_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [forum_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_desc_options] [int] DEFAULT (7) NOT NULL ,
+ [forum_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [forum_link] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_password] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [forum_style] [int] DEFAULT (0) NOT NULL ,
+ [forum_image] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_rules_options] [int] DEFAULT (7) NOT NULL ,
+ [forum_rules_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
+ [forum_type] [int] DEFAULT (0) NOT NULL ,
+ [forum_status] [int] DEFAULT (0) NOT NULL ,
+ [forum_posts] [int] DEFAULT (0) NOT NULL ,
+ [forum_topics] [int] DEFAULT (0) NOT NULL ,
+ [forum_topics_real] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_poster_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_post_time] [int] DEFAULT (0) NOT NULL ,
+ [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [forum_flags] [int] DEFAULT (32) NOT NULL ,
+ [forum_options] [int] DEFAULT (0) NOT NULL ,
+ [display_subforum_list] [int] DEFAULT (1) NOT NULL ,
+ [display_on_index] [int] DEFAULT (1) NOT NULL ,
+ [enable_indexing] [int] DEFAULT (1) NOT NULL ,
+ [enable_icons] [int] DEFAULT (1) NOT NULL ,
+ [enable_prune] [int] DEFAULT (0) NOT NULL ,
+ [prune_next] [int] DEFAULT (0) NOT NULL ,
+ [prune_days] [int] DEFAULT (0) NOT NULL ,
+ [prune_viewed] [int] DEFAULT (0) NOT NULL ,
+ [prune_freq] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
+ (
+ [forum_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_lastpost_id] ON [phpbb_forums]([forum_last_post_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums_access'
+*/
+CREATE TABLE [phpbb_forums_access] (
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [session_id] [char] (32) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_forums_access] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums_access] PRIMARY KEY CLUSTERED
+ (
+ [forum_id],
+ [user_id],
+ [session_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums_track'
+*/
+CREATE TABLE [phpbb_forums_track] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [mark_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_forums_track] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_forums_track] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [forum_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_forums_watch'
+*/
+CREATE TABLE [phpbb_forums_watch] (
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [notify_status] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_forums_watch]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_forums_watch]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [notify_stat] ON [phpbb_forums_watch]([notify_status]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_groups'
+*/
+CREATE TABLE [phpbb_groups] (
+ [group_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_type] [int] DEFAULT (1) NOT NULL ,
+ [group_founder_manage] [int] DEFAULT (0) NOT NULL ,
+ [group_skip_auth] [int] DEFAULT (0) NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_desc_options] [int] DEFAULT (7) NOT NULL ,
+ [group_desc_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [group_display] [int] DEFAULT (0) NOT NULL ,
+ [group_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_avatar_type] [int] DEFAULT (0) NOT NULL ,
+ [group_avatar_width] [int] DEFAULT (0) NOT NULL ,
+ [group_avatar_height] [int] DEFAULT (0) NOT NULL ,
+ [group_rank] [int] DEFAULT (0) NOT NULL ,
+ [group_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [group_sig_chars] [int] DEFAULT (0) NOT NULL ,
+ [group_receive_pm] [int] DEFAULT (0) NOT NULL ,
+ [group_message_limit] [int] DEFAULT (0) NOT NULL ,
+ [group_max_recipients] [int] DEFAULT (0) NOT NULL ,
+ [group_legend] [int] DEFAULT (0) NOT NULL ,
+ [group_teampage] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
+ (
+ [group_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_legend_name] ON [phpbb_groups]([group_legend], [group_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_icons'
+*/
+CREATE TABLE [phpbb_icons] (
+ [icons_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [icons_url] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [icons_width] [int] DEFAULT (0) NOT NULL ,
+ [icons_height] [int] DEFAULT (0) NOT NULL ,
+ [icons_order] [int] DEFAULT (0) NOT NULL ,
+ [display_on_posting] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_icons] PRIMARY KEY CLUSTERED
+ (
+ [icons_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [display_on_posting] ON [phpbb_icons]([display_on_posting]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_lang'
+*/
+CREATE TABLE [phpbb_lang] (
+ [lang_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_author] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_lang] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_lang] PRIMARY KEY CLUSTERED
+ (
+ [lang_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [lang_iso] ON [phpbb_lang]([lang_iso]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_log'
+*/
+CREATE TABLE [phpbb_log] (
+ [log_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [log_type] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [reportee_id] [int] DEFAULT (0) NOT NULL ,
+ [log_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [log_time] [int] DEFAULT (0) NOT NULL ,
+ [log_operation] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [log_data] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_log] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_log] PRIMARY KEY CLUSTERED
+ (
+ [log_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [log_time] ON [phpbb_log]([log_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_log]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [reportee_id] ON [phpbb_log]([reportee_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_log]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_login_attempts'
+*/
+CREATE TABLE [phpbb_login_attempts] (
+ [attempt_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [attempt_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
+ [attempt_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [attempt_time] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [username] [varchar] (255) DEFAULT (0) NOT NULL ,
+ [username_clean] [varchar] (255) DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [att_ip] ON [phpbb_login_attempts]([attempt_ip], [attempt_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [att_for] ON [phpbb_login_attempts]([attempt_forwarded_for], [attempt_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [att_time] ON [phpbb_login_attempts]([attempt_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_login_attempts]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_moderator_cache'
+*/
+CREATE TABLE [phpbb_moderator_cache] (
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [username] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [group_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [display_on_index] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [disp_idx] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_moderator_cache]([forum_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_modules'
+*/
+CREATE TABLE [phpbb_modules] (
+ [module_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [module_enabled] [int] DEFAULT (1) NOT NULL ,
+ [module_display] [int] DEFAULT (1) NOT NULL ,
+ [module_basename] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [module_class] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [parent_id] [int] DEFAULT (0) NOT NULL ,
+ [left_id] [int] DEFAULT (0) NOT NULL ,
+ [right_id] [int] DEFAULT (0) NOT NULL ,
+ [module_langname] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [module_mode] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [module_auth] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_modules] PRIMARY KEY CLUSTERED
+ (
+ [module_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [left_right_id] ON [phpbb_modules]([left_id], [right_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY]
+GO
+
+CREATE INDEX [class_left_id] ON [phpbb_modules]([module_class], [left_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_poll_options'
+*/
+CREATE TABLE [phpbb_poll_options] (
+ [poll_option_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [poll_option_text] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [poll_option_total] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [poll_opt_id] ON [phpbb_poll_options]([poll_option_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_poll_options]([topic_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_poll_votes'
+*/
+CREATE TABLE [phpbb_poll_votes] (
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [poll_option_id] [int] DEFAULT (0) NOT NULL ,
+ [vote_user_id] [int] DEFAULT (0) NOT NULL ,
+ [vote_user_ip] [varchar] (40) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_poll_votes]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [vote_user_id] ON [phpbb_poll_votes]([vote_user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [vote_user_ip] ON [phpbb_poll_votes]([vote_user_ip]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_posts'
+*/
+CREATE TABLE [phpbb_posts] (
+ [post_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [poster_id] [int] DEFAULT (0) NOT NULL ,
+ [icon_id] [int] DEFAULT (0) NOT NULL ,
+ [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [post_time] [int] DEFAULT (0) NOT NULL ,
+ [post_approved] [int] DEFAULT (1) NOT NULL ,
+ [post_reported] [int] DEFAULT (0) NOT NULL ,
+ [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
+ [enable_smilies] [int] DEFAULT (1) NOT NULL ,
+ [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
+ [enable_sig] [int] DEFAULT (1) NOT NULL ,
+ [post_username] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [post_text] [text] DEFAULT ('') NOT NULL ,
+ [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [post_attachment] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [post_postcount] [int] DEFAULT (1) NOT NULL ,
+ [post_edit_time] [int] DEFAULT (0) NOT NULL ,
+ [post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [post_edit_user] [int] DEFAULT (0) NOT NULL ,
+ [post_edit_count] [int] DEFAULT (0) NOT NULL ,
+ [post_edit_locked] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
+ (
+ [post_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_posts]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [poster_ip] ON [phpbb_posts]([poster_ip]) ON [PRIMARY]
+GO
+
+CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) ON [PRIMARY]
+GO
+
+CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs'
+*/
+CREATE TABLE [phpbb_privmsgs] (
+ [msg_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [root_level] [int] DEFAULT (0) NOT NULL ,
+ [author_id] [int] DEFAULT (0) NOT NULL ,
+ [icon_id] [int] DEFAULT (0) NOT NULL ,
+ [author_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [message_time] [int] DEFAULT (0) NOT NULL ,
+ [enable_bbcode] [int] DEFAULT (1) NOT NULL ,
+ [enable_smilies] [int] DEFAULT (1) NOT NULL ,
+ [enable_magic_url] [int] DEFAULT (1) NOT NULL ,
+ [enable_sig] [int] DEFAULT (1) NOT NULL ,
+ [message_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [message_text] [text] DEFAULT ('') NOT NULL ,
+ [message_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [message_edit_user] [int] DEFAULT (0) NOT NULL ,
+ [message_attachment] [int] DEFAULT (0) NOT NULL ,
+ [bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [message_edit_time] [int] DEFAULT (0) NOT NULL ,
+ [message_edit_count] [int] DEFAULT (0) NOT NULL ,
+ [to_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [bcc_address] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [message_reported] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
+ (
+ [msg_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY]
+GO
+
+CREATE INDEX [message_time] ON [phpbb_privmsgs]([message_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [author_id] ON [phpbb_privmsgs]([author_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [root_level] ON [phpbb_privmsgs]([root_level]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs_folder'
+*/
+CREATE TABLE [phpbb_privmsgs_folder] (
+ [folder_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [folder_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [pm_count] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs_folder] PRIMARY KEY CLUSTERED
+ (
+ [folder_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs_rules'
+*/
+CREATE TABLE [phpbb_privmsgs_rules] (
+ [rule_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [rule_check] [int] DEFAULT (0) NOT NULL ,
+ [rule_connection] [int] DEFAULT (0) NOT NULL ,
+ [rule_string] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [rule_user_id] [int] DEFAULT (0) NOT NULL ,
+ [rule_group_id] [int] DEFAULT (0) NOT NULL ,
+ [rule_action] [int] DEFAULT (0) NOT NULL ,
+ [rule_folder_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_privmsgs_rules] PRIMARY KEY CLUSTERED
+ (
+ [rule_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_privmsgs_rules]([user_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_privmsgs_to'
+*/
+CREATE TABLE [phpbb_privmsgs_to] (
+ [msg_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [author_id] [int] DEFAULT (0) NOT NULL ,
+ [pm_deleted] [int] DEFAULT (0) NOT NULL ,
+ [pm_new] [int] DEFAULT (1) NOT NULL ,
+ [pm_unread] [int] DEFAULT (1) NOT NULL ,
+ [pm_replied] [int] DEFAULT (0) NOT NULL ,
+ [pm_marked] [int] DEFAULT (0) NOT NULL ,
+ [pm_forwarded] [int] DEFAULT (0) NOT NULL ,
+ [folder_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [msg_id] ON [phpbb_privmsgs_to]([msg_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [author_id] ON [phpbb_privmsgs_to]([author_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [usr_flder_id] ON [phpbb_privmsgs_to]([user_id], [folder_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_fields'
+*/
+CREATE TABLE [phpbb_profile_fields] (
+ [field_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [field_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_type] [int] DEFAULT (0) NOT NULL ,
+ [field_ident] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_length] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [field_validation] [varchar] (20) DEFAULT ('') NOT NULL ,
+ [field_required] [int] DEFAULT (0) NOT NULL ,
+ [field_show_novalue] [int] DEFAULT (0) NOT NULL ,
+ [field_show_on_reg] [int] DEFAULT (0) NOT NULL ,
+ [field_show_on_pm] [int] DEFAULT (0) NOT NULL ,
+ [field_show_on_vt] [int] DEFAULT (0) NOT NULL ,
+ [field_show_profile] [int] DEFAULT (0) NOT NULL ,
+ [field_hide] [int] DEFAULT (0) NOT NULL ,
+ [field_no_view] [int] DEFAULT (0) NOT NULL ,
+ [field_active] [int] DEFAULT (0) NOT NULL ,
+ [field_order] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_fields] PRIMARY KEY CLUSTERED
+ (
+ [field_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [fld_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [fld_ordr] ON [phpbb_profile_fields]([field_order]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_fields_data'
+*/
+CREATE TABLE [phpbb_profile_fields_data] (
+ [user_id] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_fields_data] PRIMARY KEY CLUSTERED
+ (
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_fields_lang'
+*/
+CREATE TABLE [phpbb_profile_fields_lang] (
+ [field_id] [int] DEFAULT (0) NOT NULL ,
+ [lang_id] [int] DEFAULT (0) NOT NULL ,
+ [option_id] [int] DEFAULT (0) NOT NULL ,
+ [field_type] [int] DEFAULT (0) NOT NULL ,
+ [lang_value] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_fields_lang] PRIMARY KEY CLUSTERED
+ (
+ [field_id],
+ [lang_id],
+ [option_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_profile_lang'
+*/
+CREATE TABLE [phpbb_profile_lang] (
+ [field_id] [int] DEFAULT (0) NOT NULL ,
+ [lang_id] [int] DEFAULT (0) NOT NULL ,
+ [lang_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [lang_explain] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_profile_lang] PRIMARY KEY CLUSTERED
+ (
+ [field_id],
+ [lang_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_ranks'
+*/
+CREATE TABLE [phpbb_ranks] (
+ [rank_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [rank_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [rank_min] [int] DEFAULT (0) NOT NULL ,
+ [rank_special] [int] DEFAULT (0) NOT NULL ,
+ [rank_image] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
+ (
+ [rank_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_reports'
+*/
+CREATE TABLE [phpbb_reports] (
+ [report_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [reason_id] [int] DEFAULT (0) NOT NULL ,
+ [post_id] [int] DEFAULT (0) NOT NULL ,
+ [pm_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [user_notify] [int] DEFAULT (0) NOT NULL ,
+ [report_closed] [int] DEFAULT (0) NOT NULL ,
+ [report_time] [int] DEFAULT (0) NOT NULL ,
+ [report_text] [text] DEFAULT ('') NOT NULL ,
+ [reported_post_text] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_reports] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_reports] PRIMARY KEY CLUSTERED
+ (
+ [report_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_id] ON [phpbb_reports]([post_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [pm_id] ON [phpbb_reports]([pm_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_reports_reasons'
+*/
+CREATE TABLE [phpbb_reports_reasons] (
+ [reason_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [reason_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [reason_description] [text] DEFAULT ('') NOT NULL ,
+ [reason_order] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_reports_reasons] PRIMARY KEY CLUSTERED
+ (
+ [reason_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_search_results'
+*/
+CREATE TABLE [phpbb_search_results] (
+ [search_key] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [search_time] [int] DEFAULT (0) NOT NULL ,
+ [search_keywords] [text] DEFAULT ('') NOT NULL ,
+ [search_authors] [text] DEFAULT ('') NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
+ (
+ [search_key]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_search_wordlist'
+*/
+CREATE TABLE [phpbb_search_wordlist] (
+ [word_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [word_text] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [word_common] [int] DEFAULT (0) NOT NULL ,
+ [word_count] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
+ (
+ [word_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [wrd_txt] ON [phpbb_search_wordlist]([word_text]) ON [PRIMARY]
+GO
+
+CREATE INDEX [wrd_cnt] ON [phpbb_search_wordlist]([word_count]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_search_wordmatch'
+*/
+CREATE TABLE [phpbb_search_wordmatch] (
+ [post_id] [int] DEFAULT (0) NOT NULL ,
+ [word_id] [int] DEFAULT (0) NOT NULL ,
+ [title_match] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [unq_mtch] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY]
+GO
+
+CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [post_id] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_sessions'
+*/
+CREATE TABLE [phpbb_sessions] (
+ [session_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [session_user_id] [int] DEFAULT (0) NOT NULL ,
+ [session_forum_id] [int] DEFAULT (0) NOT NULL ,
+ [session_last_visit] [int] DEFAULT (0) NOT NULL ,
+ [session_start] [int] DEFAULT (0) NOT NULL ,
+ [session_time] [int] DEFAULT (0) NOT NULL ,
+ [session_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [session_browser] [varchar] (150) DEFAULT ('') NOT NULL ,
+ [session_forwarded_for] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [session_page] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [session_viewonline] [int] DEFAULT (1) NOT NULL ,
+ [session_autologin] [int] DEFAULT (0) NOT NULL ,
+ [session_admin] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_sessions] PRIMARY KEY CLUSTERED
+ (
+ [session_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [session_user_id] ON [phpbb_sessions]([session_user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [session_fid] ON [phpbb_sessions]([session_forum_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_sessions_keys'
+*/
+CREATE TABLE [phpbb_sessions_keys] (
+ [key_id] [char] (32) DEFAULT ('') NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [last_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [last_login] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_sessions_keys] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_sessions_keys] PRIMARY KEY CLUSTERED
+ (
+ [key_id],
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [last_login] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_sitelist'
+*/
+CREATE TABLE [phpbb_sitelist] (
+ [site_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [site_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [site_hostname] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [ip_exclude] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_sitelist] PRIMARY KEY CLUSTERED
+ (
+ [site_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_smilies'
+*/
+CREATE TABLE [phpbb_smilies] (
+ [smiley_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [code] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [emotion] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL ,
+ [smiley_width] [int] DEFAULT (0) NOT NULL ,
+ [smiley_height] [int] DEFAULT (0) NOT NULL ,
+ [smiley_order] [int] DEFAULT (0) NOT NULL ,
+ [display_on_posting] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
+ (
+ [smiley_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [display_on_post] ON [phpbb_smilies]([display_on_posting]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_styles'
+*/
+CREATE TABLE [phpbb_styles] (
+ [style_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [style_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [style_active] [int] DEFAULT (1) NOT NULL ,
+ [style_path] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL ,
+ [style_parent_id] [int] DEFAULT (0) NOT NULL ,
+ [style_parent_tree] [varchar] (8000) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles] PRIMARY KEY CLUSTERED
+ (
+ [style_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics'
+*/
+CREATE TABLE [phpbb_topics] (
+ [topic_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [icon_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_attachment] [int] DEFAULT (0) NOT NULL ,
+ [topic_approved] [int] DEFAULT (1) NOT NULL ,
+ [topic_reported] [int] DEFAULT (0) NOT NULL ,
+ [topic_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_poster] [int] DEFAULT (0) NOT NULL ,
+ [topic_time] [int] DEFAULT (0) NOT NULL ,
+ [topic_time_limit] [int] DEFAULT (0) NOT NULL ,
+ [topic_views] [int] DEFAULT (0) NOT NULL ,
+ [topic_replies] [int] DEFAULT (0) NOT NULL ,
+ [topic_replies_real] [int] DEFAULT (0) NOT NULL ,
+ [topic_status] [int] DEFAULT (0) NOT NULL ,
+ [topic_type] [int] DEFAULT (0) NOT NULL ,
+ [topic_first_post_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [topic_last_post_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_last_poster_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [topic_last_post_subject] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [topic_last_post_time] [int] DEFAULT (0) NOT NULL ,
+ [topic_last_view_time] [int] DEFAULT (0) NOT NULL ,
+ [topic_moved_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_bumped] [int] DEFAULT (0) NOT NULL ,
+ [topic_bumper] [int] DEFAULT (0) NOT NULL ,
+ [poll_title] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [poll_start] [int] DEFAULT (0) NOT NULL ,
+ [poll_length] [int] DEFAULT (0) NOT NULL ,
+ [poll_max_options] [int] DEFAULT (1) NOT NULL ,
+ [poll_last_vote] [int] DEFAULT (0) NOT NULL ,
+ [poll_vote_change] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
+ (
+ [topic_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_topics]([forum_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id_type] ON [phpbb_topics]([forum_id], [topic_type]) ON [PRIMARY]
+GO
+
+CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics_track'
+*/
+CREATE TABLE [phpbb_topics_track] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [forum_id] [int] DEFAULT (0) NOT NULL ,
+ [mark_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [topic_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics_posted'
+*/
+CREATE TABLE [phpbb_topics_posted] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [topic_posted] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [topic_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_topics_watch'
+*/
+CREATE TABLE [phpbb_topics_watch] (
+ [topic_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [notify_status] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [topic_id] ON [phpbb_topics_watch]([topic_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_topics_watch]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [notify_stat] ON [phpbb_topics_watch]([notify_status]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_user_group'
+*/
+CREATE TABLE [phpbb_user_group] (
+ [group_id] [int] DEFAULT (0) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [group_leader] [int] DEFAULT (0) NOT NULL ,
+ [user_pending] [int] DEFAULT (1) NOT NULL
+) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_id] ON [phpbb_user_group]([group_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_id] ON [phpbb_user_group]([user_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [group_leader] ON [phpbb_user_group]([group_leader]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_users'
+*/
+CREATE TABLE [phpbb_users] (
+ [user_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_type] [int] DEFAULT (0) NOT NULL ,
+ [group_id] [int] DEFAULT (3) NOT NULL ,
+ [user_permissions] [text] DEFAULT ('') NOT NULL ,
+ [user_perm_from] [int] DEFAULT (0) NOT NULL ,
+ [user_ip] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [user_regdate] [int] DEFAULT (0) NOT NULL ,
+ [username] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [username_clean] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_password] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [user_passchg] [int] DEFAULT (0) NOT NULL ,
+ [user_pass_convert] [int] DEFAULT (0) NOT NULL ,
+ [user_email] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [user_email_hash] [float] DEFAULT (0) NOT NULL ,
+ [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [user_lastvisit] [int] DEFAULT (0) NOT NULL ,
+ [user_lastmark] [int] DEFAULT (0) NOT NULL ,
+ [user_lastpost_time] [int] DEFAULT (0) NOT NULL ,
+ [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL ,
+ [user_last_search] [int] DEFAULT (0) NOT NULL ,
+ [user_warnings] [int] DEFAULT (0) NOT NULL ,
+ [user_last_warning] [int] DEFAULT (0) NOT NULL ,
+ [user_login_attempts] [int] DEFAULT (0) NOT NULL ,
+ [user_inactive_reason] [int] DEFAULT (0) NOT NULL ,
+ [user_inactive_time] [int] DEFAULT (0) NOT NULL ,
+ [user_posts] [int] DEFAULT (0) NOT NULL ,
+ [user_lang] [varchar] (30) DEFAULT ('') NOT NULL ,
+ [user_timezone] [varchar] (100) DEFAULT ('UTC') NOT NULL ,
+ [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL ,
+ [user_style] [int] DEFAULT (0) NOT NULL ,
+ [user_rank] [int] DEFAULT (0) NOT NULL ,
+ [user_colour] [varchar] (6) DEFAULT ('') NOT NULL ,
+ [user_new_privmsg] [int] DEFAULT (0) NOT NULL ,
+ [user_unread_privmsg] [int] DEFAULT (0) NOT NULL ,
+ [user_last_privmsg] [int] DEFAULT (0) NOT NULL ,
+ [user_message_rules] [int] DEFAULT (0) NOT NULL ,
+ [user_full_folder] [int] DEFAULT (-3) NOT NULL ,
+ [user_emailtime] [int] DEFAULT (0) NOT NULL ,
+ [user_topic_show_days] [int] DEFAULT (0) NOT NULL ,
+ [user_topic_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
+ [user_topic_sortby_dir] [varchar] (1) DEFAULT ('d') NOT NULL ,
+ [user_post_show_days] [int] DEFAULT (0) NOT NULL ,
+ [user_post_sortby_type] [varchar] (1) DEFAULT ('t') NOT NULL ,
+ [user_post_sortby_dir] [varchar] (1) DEFAULT ('a') NOT NULL ,
+ [user_notify] [int] DEFAULT (0) NOT NULL ,
+ [user_notify_pm] [int] DEFAULT (1) NOT NULL ,
+ [user_notify_type] [int] DEFAULT (0) NOT NULL ,
+ [user_allow_pm] [int] DEFAULT (1) NOT NULL ,
+ [user_allow_viewonline] [int] DEFAULT (1) NOT NULL ,
+ [user_allow_viewemail] [int] DEFAULT (1) NOT NULL ,
+ [user_allow_massemail] [int] DEFAULT (1) NOT NULL ,
+ [user_options] [int] DEFAULT (230271) NOT NULL ,
+ [user_avatar] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_avatar_type] [int] DEFAULT (0) NOT NULL ,
+ [user_avatar_width] [int] DEFAULT (0) NOT NULL ,
+ [user_avatar_height] [int] DEFAULT (0) NOT NULL ,
+ [user_sig] [text] DEFAULT ('') NOT NULL ,
+ [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
+ [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_from] [varchar] (100) DEFAULT ('') NOT NULL ,
+ [user_icq] [varchar] (15) DEFAULT ('') NOT NULL ,
+ [user_aim] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_yim] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [user_website] [varchar] (200) DEFAULT ('') NOT NULL ,
+ [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL ,
+ [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [user_newpasswd] [varchar] (40) DEFAULT ('') NOT NULL ,
+ [user_form_salt] [varchar] (32) DEFAULT ('') NOT NULL ,
+ [user_new] [int] DEFAULT (1) NOT NULL ,
+ [user_reminded] [int] DEFAULT (0) NOT NULL ,
+ [user_reminded_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_users] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
+ (
+ [user_id]
+ ) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_email_hash] ON [phpbb_users]([user_email_hash]) ON [PRIMARY]
+GO
+
+CREATE INDEX [user_type] ON [phpbb_users]([user_type]) ON [PRIMARY]
+GO
+
+CREATE UNIQUE INDEX [username_clean] ON [phpbb_users]([username_clean]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_warnings'
+*/
+CREATE TABLE [phpbb_warnings] (
+ [warning_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [post_id] [int] DEFAULT (0) NOT NULL ,
+ [log_id] [int] DEFAULT (0) NOT NULL ,
+ [warning_time] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_warnings] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_warnings] PRIMARY KEY CLUSTERED
+ (
+ [warning_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_words'
+*/
+CREATE TABLE [phpbb_words] (
+ [word_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [word] [varchar] (255) DEFAULT ('') NOT NULL ,
+ [replacement] [varchar] (255) DEFAULT ('') NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_words] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
+ (
+ [word_id]
+ ) ON [PRIMARY]
+GO
+
+
+/*
+ Table: 'phpbb_zebra'
+*/
+CREATE TABLE [phpbb_zebra] (
+ [user_id] [int] DEFAULT (0) NOT NULL ,
+ [zebra_id] [int] DEFAULT (0) NOT NULL ,
+ [friend] [int] DEFAULT (0) NOT NULL ,
+ [foe] [int] DEFAULT (0) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_zebra] PRIMARY KEY CLUSTERED
+ (
+ [user_id],
+ [zebra_id]
+ ) ON [PRIMARY]
+GO
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index e71afcd5b3..8f2b779649 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -1,978 +1,976 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. -# Table: 'phpbb_attachments' -CREATE TABLE phpbb_attachments ( - attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, - post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - physical_filename varbinary(255) DEFAULT '' NOT NULL, - real_filename varbinary(255) DEFAULT '' NOT NULL, - download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - attach_comment blob NOT NULL, - extension varbinary(100) DEFAULT '' NOT NULL, - mimetype varbinary(100) DEFAULT '' NOT NULL, - filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, - filetime int(11) UNSIGNED DEFAULT '0' NOT NULL, - thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (attach_id), - KEY filetime (filetime), - KEY post_msg_id (post_msg_id), - KEY topic_id (topic_id), - KEY poster_id (poster_id), - KEY is_orphan (is_orphan) -); - - -# Table: 'phpbb_acl_groups' -CREATE TABLE phpbb_acl_groups ( - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_setting tinyint(2) DEFAULT '0' NOT NULL, - KEY group_id (group_id), - KEY auth_opt_id (auth_option_id), - KEY auth_role_id (auth_role_id) -); - - -# Table: 'phpbb_acl_options' -CREATE TABLE phpbb_acl_options ( - auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, - auth_option varbinary(50) DEFAULT '' NOT NULL, - is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (auth_option_id), - UNIQUE auth_option (auth_option) -); - - -# Table: 'phpbb_acl_roles' -CREATE TABLE phpbb_acl_roles ( - role_id mediumint(8) UNSIGNED NOT NULL auto_increment, - role_name blob NOT NULL, - role_description blob NOT NULL, - role_type varbinary(10) DEFAULT '' NOT NULL, - role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id), - KEY role_type (role_type), - KEY role_order (role_order) -); - - -# Table: 'phpbb_acl_roles_data' -CREATE TABLE phpbb_acl_roles_data ( - role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_setting tinyint(2) DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id, auth_option_id), - KEY ath_op_id (auth_option_id) -); - - -# Table: 'phpbb_acl_users' -CREATE TABLE phpbb_acl_users ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_setting tinyint(2) DEFAULT '0' NOT NULL, - KEY user_id (user_id), - KEY auth_option_id (auth_option_id), - KEY auth_role_id (auth_role_id) -); - - -# Table: 'phpbb_banlist' -CREATE TABLE phpbb_banlist ( - ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, - ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - ban_ip varbinary(40) DEFAULT '' NOT NULL, - ban_email blob NOT NULL, - ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, - ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, - ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - ban_reason blob NOT NULL, - ban_give_reason blob NOT NULL, - PRIMARY KEY (ban_id), - KEY ban_end (ban_end), - KEY ban_user (ban_userid, ban_exclude), - KEY ban_email (ban_email(255), ban_exclude), - KEY ban_ip (ban_ip, ban_exclude) -); - - -# Table: 'phpbb_bbcodes' -CREATE TABLE phpbb_bbcodes ( - bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_tag varbinary(16) DEFAULT '' NOT NULL, - bbcode_helpline blob NOT NULL, - display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_match blob NOT NULL, - bbcode_tpl mediumblob NOT NULL, - first_pass_match mediumblob NOT NULL, - first_pass_replace mediumblob NOT NULL, - second_pass_match mediumblob NOT NULL, - second_pass_replace mediumblob NOT NULL, - PRIMARY KEY (bbcode_id), - KEY display_on_post (display_on_posting) -); - - -# Table: 'phpbb_bookmarks' -CREATE TABLE phpbb_bookmarks ( - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (topic_id, user_id) -); - - -# Table: 'phpbb_bots' -CREATE TABLE phpbb_bots ( - bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, - bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - bot_name blob NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - bot_agent varbinary(255) DEFAULT '' NOT NULL, - bot_ip varbinary(255) DEFAULT '' NOT NULL, - PRIMARY KEY (bot_id), - KEY bot_active (bot_active) -); - - -# Table: 'phpbb_config' -CREATE TABLE phpbb_config ( - config_name varbinary(255) DEFAULT '' NOT NULL, - config_value blob NOT NULL, - is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (config_name), - KEY is_dynamic (is_dynamic) -); - - -# Table: 'phpbb_confirm' -CREATE TABLE phpbb_confirm ( - confirm_id binary(32) DEFAULT '' NOT NULL, - session_id binary(32) DEFAULT '' NOT NULL, - confirm_type tinyint(3) DEFAULT '0' NOT NULL, - code varbinary(8) DEFAULT '' NOT NULL, - seed int(10) UNSIGNED DEFAULT '0' NOT NULL, - attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (session_id, confirm_id), - KEY confirm_type (confirm_type) -); - - -# Table: 'phpbb_disallow' -CREATE TABLE phpbb_disallow ( - disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, - disallow_username blob NOT NULL, - PRIMARY KEY (disallow_id) -); - - -# Table: 'phpbb_drafts' -CREATE TABLE phpbb_drafts ( - draft_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - draft_subject blob NOT NULL, - draft_message mediumblob NOT NULL, - PRIMARY KEY (draft_id), - KEY save_time (save_time) -); - - -# Table: 'phpbb_ext' -CREATE TABLE phpbb_ext ( - ext_name varbinary(255) DEFAULT '' NOT NULL, - ext_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - ext_state blob NOT NULL, - UNIQUE ext_name (ext_name) -); - - -# Table: 'phpbb_extensions' -CREATE TABLE phpbb_extensions ( - extension_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - extension varbinary(100) DEFAULT '' NOT NULL, - PRIMARY KEY (extension_id) -); - - -# Table: 'phpbb_extension_groups' -CREATE TABLE phpbb_extension_groups ( - group_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_name blob NOT NULL, - cat_id tinyint(2) DEFAULT '0' NOT NULL, - allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - upload_icon varbinary(255) DEFAULT '' NOT NULL, - max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, - allowed_forums blob NOT NULL, - allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (group_id) -); - - -# Table: 'phpbb_forums' -CREATE TABLE phpbb_forums ( - forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, - parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_parents mediumblob NOT NULL, - forum_name blob NOT NULL, - forum_desc blob NOT NULL, - forum_desc_bitfield varbinary(255) DEFAULT '' NOT NULL, - forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - forum_desc_uid varbinary(8) DEFAULT '' NOT NULL, - forum_link blob NOT NULL, - forum_password varbinary(120) DEFAULT '' NOT NULL, - forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_image varbinary(255) DEFAULT '' NOT NULL, - forum_rules blob NOT NULL, - forum_rules_link blob NOT NULL, - forum_rules_bitfield varbinary(255) DEFAULT '' NOT NULL, - forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - forum_rules_uid varbinary(8) DEFAULT '' NOT NULL, - forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL, - forum_type tinyint(4) DEFAULT '0' NOT NULL, - forum_status tinyint(4) DEFAULT '0' NOT NULL, - forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_post_subject blob NOT NULL, - forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_poster_name blob NOT NULL, - forum_last_poster_colour varbinary(6) DEFAULT '' NOT NULL, - forum_flags tinyint(4) DEFAULT '32' NOT NULL, - forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL, - display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL, - prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (forum_id), - KEY left_right_id (left_id, right_id), - KEY forum_lastpost_id (forum_last_post_id) -); - - -# Table: 'phpbb_forums_access' -CREATE TABLE phpbb_forums_access ( - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id binary(32) DEFAULT '' NOT NULL, - PRIMARY KEY (forum_id, user_id, session_id) -); - - -# Table: 'phpbb_forums_track' -CREATE TABLE phpbb_forums_track ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, forum_id) -); - - -# Table: 'phpbb_forums_watch' -CREATE TABLE phpbb_forums_watch ( - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - KEY forum_id (forum_id), - KEY user_id (user_id), - KEY notify_stat (notify_status) -); - - -# Table: 'phpbb_groups' -CREATE TABLE phpbb_groups ( - group_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_type tinyint(4) DEFAULT '1' NOT NULL, - group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_name blob NOT NULL, - group_desc blob NOT NULL, - group_desc_bitfield varbinary(255) DEFAULT '' NOT NULL, - group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - group_desc_uid varbinary(8) DEFAULT '' NOT NULL, - group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_avatar varbinary(255) DEFAULT '' NOT NULL, - group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, - group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_colour varbinary(6) DEFAULT '' NOT NULL, - group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_teampage mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (group_id), - KEY group_legend_name (group_legend, group_name(255)) -); - - -# Table: 'phpbb_icons' -CREATE TABLE phpbb_icons ( - icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, - icons_url varbinary(255) DEFAULT '' NOT NULL, - icons_width tinyint(4) DEFAULT '0' NOT NULL, - icons_height tinyint(4) DEFAULT '0' NOT NULL, - icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - PRIMARY KEY (icons_id), - KEY display_on_posting (display_on_posting) -); - - -# Table: 'phpbb_lang' -CREATE TABLE phpbb_lang ( - lang_id tinyint(4) NOT NULL auto_increment, - lang_iso varbinary(30) DEFAULT '' NOT NULL, - lang_dir varbinary(30) DEFAULT '' NOT NULL, - lang_english_name blob NOT NULL, - lang_local_name blob NOT NULL, - lang_author blob NOT NULL, - PRIMARY KEY (lang_id), - KEY lang_iso (lang_iso) -); - - -# Table: 'phpbb_log' -CREATE TABLE phpbb_log ( - log_id mediumint(8) UNSIGNED NOT NULL auto_increment, - log_type tinyint(4) DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - log_ip varbinary(40) DEFAULT '' NOT NULL, - log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - log_operation blob NOT NULL, - log_data mediumblob NOT NULL, - PRIMARY KEY (log_id), - KEY log_type (log_type), - KEY log_time (log_time), - KEY forum_id (forum_id), - KEY topic_id (topic_id), - KEY reportee_id (reportee_id), - KEY user_id (user_id) -); - - -# Table: 'phpbb_login_attempts' -CREATE TABLE phpbb_login_attempts ( - attempt_ip varbinary(40) DEFAULT '' NOT NULL, - attempt_browser varbinary(150) DEFAULT '' NOT NULL, - attempt_forwarded_for varbinary(255) DEFAULT '' NOT NULL, - attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - username blob NOT NULL, - username_clean blob NOT NULL, - KEY att_ip (attempt_ip, attempt_time), - KEY att_for (attempt_forwarded_for, attempt_time), - KEY att_time (attempt_time), - KEY user_id (user_id) -); - - -# Table: 'phpbb_moderator_cache' -CREATE TABLE phpbb_moderator_cache ( - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - username blob NOT NULL, - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_name blob NOT NULL, - display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - KEY disp_idx (display_on_index), - KEY forum_id (forum_id) -); - - -# Table: 'phpbb_modules' -CREATE TABLE phpbb_modules ( - module_id mediumint(8) UNSIGNED NOT NULL auto_increment, - module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - module_basename varbinary(255) DEFAULT '' NOT NULL, - module_class varbinary(10) DEFAULT '' NOT NULL, - parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - module_langname varbinary(255) DEFAULT '' NOT NULL, - module_mode varbinary(255) DEFAULT '' NOT NULL, - module_auth varbinary(255) DEFAULT '' NOT NULL, - PRIMARY KEY (module_id), - KEY left_right_id (left_id, right_id), - KEY module_enabled (module_enabled), - KEY class_left_id (module_class, left_id) -); - - -# Table: 'phpbb_poll_options' -CREATE TABLE phpbb_poll_options ( - poll_option_id tinyint(4) DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_option_text blob NOT NULL, - poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - KEY poll_opt_id (poll_option_id), - KEY topic_id (topic_id) -); - - -# Table: 'phpbb_poll_votes' -CREATE TABLE phpbb_poll_votes ( - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_option_id tinyint(4) DEFAULT '0' NOT NULL, - vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - vote_user_ip varbinary(40) DEFAULT '' NOT NULL, - KEY topic_id (topic_id), - KEY vote_user_id (vote_user_id), - KEY vote_user_ip (vote_user_ip) -); - - -# Table: 'phpbb_posts' -CREATE TABLE phpbb_posts ( - post_id mediumint(8) UNSIGNED NOT NULL auto_increment, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poster_ip varbinary(40) DEFAULT '' NOT NULL, - post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_username blob NOT NULL, - post_subject blob NOT NULL, - post_text mediumblob NOT NULL, - post_checksum varbinary(32) DEFAULT '' NOT NULL, - post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - bbcode_uid varbinary(8) DEFAULT '' NOT NULL, - post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_reason blob NOT NULL, - post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (post_id), - KEY forum_id (forum_id), - KEY topic_id (topic_id), - KEY poster_ip (poster_ip), - KEY poster_id (poster_id), - KEY post_approved (post_approved), - KEY post_username (post_username(255)), - KEY tid_post_time (topic_id, post_time) -); - - -# Table: 'phpbb_privmsgs' -CREATE TABLE phpbb_privmsgs ( - msg_id mediumint(8) UNSIGNED NOT NULL auto_increment, - root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_ip varbinary(40) DEFAULT '' NOT NULL, - message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - message_subject blob NOT NULL, - message_text mediumblob NOT NULL, - message_edit_reason blob NOT NULL, - message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - bbcode_uid varbinary(8) DEFAULT '' NOT NULL, - message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - to_address blob NOT NULL, - bcc_address blob NOT NULL, - message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (msg_id), - KEY author_ip (author_ip), - KEY message_time (message_time), - KEY author_id (author_id), - KEY root_level (root_level) -); - - -# Table: 'phpbb_privmsgs_folder' -CREATE TABLE phpbb_privmsgs_folder ( - folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - folder_name blob NOT NULL, - pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (folder_id), - KEY user_id (user_id) -); - - -# Table: 'phpbb_privmsgs_rules' -CREATE TABLE phpbb_privmsgs_rules ( - rule_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_string blob NOT NULL, - rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_folder_id int(11) DEFAULT '0' NOT NULL, - PRIMARY KEY (rule_id), - KEY user_id (user_id) -); - - -# Table: 'phpbb_privmsgs_to' -CREATE TABLE phpbb_privmsgs_to ( - msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - folder_id int(11) DEFAULT '0' NOT NULL, - KEY msg_id (msg_id), - KEY author_id (author_id), - KEY usr_flder_id (user_id, folder_id) -); - - -# Table: 'phpbb_profile_fields' -CREATE TABLE phpbb_profile_fields ( - field_id mediumint(8) UNSIGNED NOT NULL auto_increment, - field_name blob NOT NULL, - field_type tinyint(4) DEFAULT '0' NOT NULL, - field_ident varbinary(20) DEFAULT '' NOT NULL, - field_length varbinary(20) DEFAULT '' NOT NULL, - field_minlen varbinary(255) DEFAULT '' NOT NULL, - field_maxlen varbinary(255) DEFAULT '' NOT NULL, - field_novalue blob NOT NULL, - field_default_value blob NOT NULL, - field_validation varbinary(60) DEFAULT '' NOT NULL, - field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (field_id), - KEY fld_type (field_type), - KEY fld_ordr (field_order) -); - - -# Table: 'phpbb_profile_fields_data' -CREATE TABLE phpbb_profile_fields_data ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id) -); - - -# Table: 'phpbb_profile_fields_lang' -CREATE TABLE phpbb_profile_fields_lang ( - field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - field_type tinyint(4) DEFAULT '0' NOT NULL, - lang_value blob NOT NULL, - PRIMARY KEY (field_id, lang_id, option_id) -); - - -# Table: 'phpbb_profile_lang' -CREATE TABLE phpbb_profile_lang ( - field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_name blob NOT NULL, - lang_explain blob NOT NULL, - lang_default_value blob NOT NULL, - PRIMARY KEY (field_id, lang_id) -); - - -# Table: 'phpbb_ranks' -CREATE TABLE phpbb_ranks ( - rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, - rank_title blob NOT NULL, - rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - rank_image varbinary(255) DEFAULT '' NOT NULL, - PRIMARY KEY (rank_id) -); - - -# Table: 'phpbb_reports' -CREATE TABLE phpbb_reports ( - report_id mediumint(8) UNSIGNED NOT NULL auto_increment, - reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - report_text mediumblob NOT NULL, - reported_post_text mediumblob NOT NULL, - PRIMARY KEY (report_id), - KEY post_id (post_id), - KEY pm_id (pm_id) -); - - -# Table: 'phpbb_reports_reasons' -CREATE TABLE phpbb_reports_reasons ( - reason_id smallint(4) UNSIGNED NOT NULL auto_increment, - reason_title blob NOT NULL, - reason_description mediumblob NOT NULL, - reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (reason_id) -); - - -# Table: 'phpbb_search_results' -CREATE TABLE phpbb_search_results ( - search_key varbinary(32) DEFAULT '' NOT NULL, - search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - search_keywords mediumblob NOT NULL, - search_authors mediumblob NOT NULL, - PRIMARY KEY (search_key) -); - - -# Table: 'phpbb_search_wordlist' -CREATE TABLE phpbb_search_wordlist ( - word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word_text blob NOT NULL, - word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (word_id), - UNIQUE wrd_txt (word_text(255)), - KEY wrd_cnt (word_count) -); - - -# Table: 'phpbb_search_wordmatch' -CREATE TABLE phpbb_search_wordmatch ( - post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - UNIQUE unq_mtch (word_id, post_id, title_match), - KEY word_id (word_id), - KEY post_id (post_id) -); - - -# Table: 'phpbb_sessions' -CREATE TABLE phpbb_sessions ( - session_id binary(32) DEFAULT '' NOT NULL, - session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_start int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_ip varbinary(40) DEFAULT '' NOT NULL, - session_browser varbinary(150) DEFAULT '' NOT NULL, - session_forwarded_for varbinary(255) DEFAULT '' NOT NULL, - session_page blob NOT NULL, - session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (session_id), - KEY session_time (session_time), - KEY session_user_id (session_user_id), - KEY session_fid (session_forum_id) -); - - -# Table: 'phpbb_sessions_keys' -CREATE TABLE phpbb_sessions_keys ( - key_id binary(32) DEFAULT '' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - last_ip varbinary(40) DEFAULT '' NOT NULL, - last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (key_id, user_id), - KEY last_login (last_login) -); - - -# Table: 'phpbb_sitelist' -CREATE TABLE phpbb_sitelist ( - site_id mediumint(8) UNSIGNED NOT NULL auto_increment, - site_ip varbinary(40) DEFAULT '' NOT NULL, - site_hostname varbinary(255) DEFAULT '' NOT NULL, - ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (site_id) -); - - -# Table: 'phpbb_smilies' -CREATE TABLE phpbb_smilies ( - smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, - code varbinary(150) DEFAULT '' NOT NULL, - emotion varbinary(150) DEFAULT '' NOT NULL, - smiley_url varbinary(50) DEFAULT '' NOT NULL, - smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - PRIMARY KEY (smiley_id), - KEY display_on_post (display_on_posting) -); - - -# Table: 'phpbb_styles' -CREATE TABLE phpbb_styles ( - style_id mediumint(8) UNSIGNED NOT NULL auto_increment, - style_name blob NOT NULL, - style_copyright blob NOT NULL, - style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - style_path varbinary(100) DEFAULT '' NOT NULL, - bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL, - style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL, - style_parent_tree blob NOT NULL, - PRIMARY KEY (style_id), - UNIQUE style_name (style_name(255)) -); - - -# Table: 'phpbb_topics' -CREATE TABLE phpbb_topics ( - topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_title blob NOT NULL, - topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_status tinyint(3) DEFAULT '0' NOT NULL, - topic_type tinyint(3) DEFAULT '0' NOT NULL, - topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_first_poster_name blob NOT NULL, - topic_first_poster_colour varbinary(6) DEFAULT '' NOT NULL, - topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_poster_name blob NOT NULL, - topic_last_poster_colour varbinary(6) DEFAULT '' NOT NULL, - topic_last_post_subject blob NOT NULL, - topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_title blob NOT NULL, - poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, - poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, - poll_max_options tinyint(4) DEFAULT '1' NOT NULL, - poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL, - poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (topic_id), - KEY forum_id (forum_id), - KEY forum_id_type (forum_id, topic_type), - KEY last_post_time (topic_last_post_time), - KEY topic_approved (topic_approved), - KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), - KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) -); - - -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, topic_id), - KEY topic_id (topic_id), - KEY forum_id (forum_id) -); - - -# Table: 'phpbb_topics_posted' -CREATE TABLE phpbb_topics_posted ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, topic_id) -); - - -# Table: 'phpbb_topics_watch' -CREATE TABLE phpbb_topics_watch ( - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - KEY topic_id (topic_id), - KEY user_id (user_id), - KEY notify_stat (notify_status) -); - - -# Table: 'phpbb_user_group' -CREATE TABLE phpbb_user_group ( - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - KEY group_id (group_id), - KEY user_id (user_id), - KEY group_leader (group_leader) -); - - -# Table: 'phpbb_users' -CREATE TABLE phpbb_users ( - user_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_type tinyint(2) DEFAULT '0' NOT NULL, - group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, - user_permissions mediumblob NOT NULL, - user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_ip varbinary(40) DEFAULT '' NOT NULL, - user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, - username blob NOT NULL, - username_clean blob NOT NULL, - user_password varbinary(120) DEFAULT '' NOT NULL, - user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_email blob NOT NULL, - user_email_hash bigint(20) DEFAULT '0' NOT NULL, - user_birthday varbinary(10) DEFAULT '' NOT NULL, - user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastpage blob NOT NULL, - user_last_confirm_key varbinary(10) DEFAULT '' NOT NULL, - user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_warnings tinyint(4) DEFAULT '0' NOT NULL, - user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, - user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, - user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_lang varbinary(30) DEFAULT '' NOT NULL, - user_timezone varbinary(100) DEFAULT 'UTC' NOT NULL, - user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL, - user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_colour varbinary(6) DEFAULT '' NOT NULL, - user_new_privmsg int(4) DEFAULT '0' NOT NULL, - user_unread_privmsg int(4) DEFAULT '0' NOT NULL, - user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_full_folder int(11) DEFAULT '-3' NOT NULL, - user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_topic_sortby_type varbinary(1) DEFAULT 't' NOT NULL, - user_topic_sortby_dir varbinary(1) DEFAULT 'd' NOT NULL, - user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_post_sortby_type varbinary(1) DEFAULT 't' NOT NULL, - user_post_sortby_dir varbinary(1) DEFAULT 'a' NOT NULL, - user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_notify_type tinyint(4) DEFAULT '0' NOT NULL, - user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL, - user_avatar varbinary(255) DEFAULT '' NOT NULL, - user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, - user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_sig mediumblob NOT NULL, - user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL, - user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, - user_from blob NOT NULL, - user_icq varbinary(15) DEFAULT '' NOT NULL, - user_aim blob NOT NULL, - user_yim blob NOT NULL, - user_msnm blob NOT NULL, - user_jabber blob NOT NULL, - user_website blob NOT NULL, - user_occ blob NOT NULL, - user_interests blob NOT NULL, - user_actkey varbinary(32) DEFAULT '' NOT NULL, - user_newpasswd varbinary(120) DEFAULT '' NOT NULL, - user_form_salt varbinary(96) DEFAULT '' NOT NULL, - user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_reminded tinyint(4) DEFAULT '0' NOT NULL, - user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id), - KEY user_birthday (user_birthday), - KEY user_email_hash (user_email_hash), - KEY user_type (user_type), - UNIQUE username_clean (username_clean(255)) -); - - -# Table: 'phpbb_warnings' -CREATE TABLE phpbb_warnings ( - warning_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (warning_id) -); - - -# Table: 'phpbb_words' -CREATE TABLE phpbb_words ( - word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word blob NOT NULL, - replacement blob NOT NULL, - PRIMARY KEY (word_id) -); - - -# Table: 'phpbb_zebra' -CREATE TABLE phpbb_zebra ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, zebra_id) -); - - +# DO NOT EDIT THIS FILE, IT IS GENERATED
+#
+# To change the contents of this file, edit
+# phpBB/develop/create_schema_files.php and
+# run it.
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ physical_filename varbinary(255) DEFAULT '' NOT NULL,
+ real_filename varbinary(255) DEFAULT '' NOT NULL,
+ download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ attach_comment blob NOT NULL,
+ extension varbinary(100) DEFAULT '' NOT NULL,
+ mimetype varbinary(100) DEFAULT '' NOT NULL,
+ filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (attach_id),
+ KEY filetime (filetime),
+ KEY post_msg_id (post_msg_id),
+ KEY topic_id (topic_id),
+ KEY poster_id (poster_id),
+ KEY is_orphan (is_orphan)
+);
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY group_id (group_id),
+ KEY auth_opt_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+);
+
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ auth_option varbinary(50) DEFAULT '' NOT NULL,
+ is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (auth_option_id),
+ UNIQUE auth_option (auth_option)
+);
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ role_name blob NOT NULL,
+ role_description blob NOT NULL,
+ role_type varbinary(10) DEFAULT '' NOT NULL,
+ role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id),
+ KEY role_type (role_type),
+ KEY role_order (role_order)
+);
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id),
+ KEY ath_op_id (auth_option_id)
+);
+
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY user_id (user_id),
+ KEY auth_option_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+);
+
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_ip varbinary(40) DEFAULT '' NOT NULL,
+ ban_email blob NOT NULL,
+ ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_reason blob NOT NULL,
+ ban_give_reason blob NOT NULL,
+ PRIMARY KEY (ban_id),
+ KEY ban_end (ban_end),
+ KEY ban_user (ban_userid, ban_exclude),
+ KEY ban_email (ban_email(255), ban_exclude),
+ KEY ban_ip (ban_ip, ban_exclude)
+);
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_tag varbinary(16) DEFAULT '' NOT NULL,
+ bbcode_helpline blob NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_match blob NOT NULL,
+ bbcode_tpl mediumblob NOT NULL,
+ first_pass_match mediumblob NOT NULL,
+ first_pass_replace mediumblob NOT NULL,
+ second_pass_match mediumblob NOT NULL,
+ second_pass_replace mediumblob NOT NULL,
+ PRIMARY KEY (bbcode_id),
+ KEY display_on_post (display_on_posting)
+);
+
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id, user_id)
+);
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ bot_name blob NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ bot_agent varbinary(255) DEFAULT '' NOT NULL,
+ bot_ip varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id),
+ KEY bot_active (bot_active)
+);
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varbinary(255) DEFAULT '' NOT NULL,
+ config_value blob NOT NULL,
+ is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (config_name),
+ KEY is_dynamic (is_dynamic)
+);
+
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id binary(32) DEFAULT '' NOT NULL,
+ session_id binary(32) DEFAULT '' NOT NULL,
+ confirm_type tinyint(3) DEFAULT '0' NOT NULL,
+ code varbinary(8) DEFAULT '' NOT NULL,
+ seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
+ attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id, confirm_id),
+ KEY confirm_type (confirm_type)
+);
+
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ disallow_username blob NOT NULL,
+ PRIMARY KEY (disallow_id)
+);
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ draft_subject blob NOT NULL,
+ draft_message mediumblob NOT NULL,
+ PRIMARY KEY (draft_id),
+ KEY save_time (save_time)
+);
+
+
+# Table: 'phpbb_ext'
+CREATE TABLE phpbb_ext (
+ ext_name varbinary(255) DEFAULT '' NOT NULL,
+ ext_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ext_state blob NOT NULL,
+ UNIQUE ext_name (ext_name)
+);
+
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ extension varbinary(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+);
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_name blob NOT NULL,
+ cat_id tinyint(2) DEFAULT '0' NOT NULL,
+ allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ upload_icon varbinary(255) DEFAULT '' NOT NULL,
+ max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ allowed_forums blob NOT NULL,
+ allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id)
+);
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_parents mediumblob NOT NULL,
+ forum_name blob NOT NULL,
+ forum_desc blob NOT NULL,
+ forum_desc_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_desc_uid varbinary(8) DEFAULT '' NOT NULL,
+ forum_link blob NOT NULL,
+ forum_password varbinary(120) DEFAULT '' NOT NULL,
+ forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_image varbinary(255) DEFAULT '' NOT NULL,
+ forum_rules blob NOT NULL,
+ forum_rules_link blob NOT NULL,
+ forum_rules_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_rules_uid varbinary(8) DEFAULT '' NOT NULL,
+ forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
+ forum_type tinyint(4) DEFAULT '0' NOT NULL,
+ forum_status tinyint(4) DEFAULT '0' NOT NULL,
+ forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_subject blob NOT NULL,
+ forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_name blob NOT NULL,
+ forum_last_poster_colour varbinary(6) DEFAULT '' NOT NULL,
+ forum_flags tinyint(4) DEFAULT '32' NOT NULL,
+ forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (forum_id),
+ KEY left_right_id (left_id, right_id),
+ KEY forum_lastpost_id (forum_last_post_id)
+);
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id binary(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+);
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, forum_id)
+);
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY forum_id (forum_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+);
+
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_type tinyint(4) DEFAULT '1' NOT NULL,
+ group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name blob NOT NULL,
+ group_desc blob NOT NULL,
+ group_desc_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ group_desc_uid varbinary(8) DEFAULT '' NOT NULL,
+ group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar varbinary(255) DEFAULT '' NOT NULL,
+ group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_colour varbinary(6) DEFAULT '' NOT NULL,
+ group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_teampage mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY group_legend_name (group_legend, group_name(255))
+);
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ icons_url varbinary(255) DEFAULT '' NOT NULL,
+ icons_width tinyint(4) DEFAULT '0' NOT NULL,
+ icons_height tinyint(4) DEFAULT '0' NOT NULL,
+ icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (icons_id),
+ KEY display_on_posting (display_on_posting)
+);
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id tinyint(4) NOT NULL auto_increment,
+ lang_iso varbinary(30) DEFAULT '' NOT NULL,
+ lang_dir varbinary(30) DEFAULT '' NOT NULL,
+ lang_english_name blob NOT NULL,
+ lang_local_name blob NOT NULL,
+ lang_author blob NOT NULL,
+ PRIMARY KEY (lang_id),
+ KEY lang_iso (lang_iso)
+);
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ log_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_ip varbinary(40) DEFAULT '' NOT NULL,
+ log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ log_operation blob NOT NULL,
+ log_data mediumblob NOT NULL,
+ PRIMARY KEY (log_id),
+ KEY log_type (log_type),
+ KEY log_time (log_time),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY reportee_id (reportee_id),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_login_attempts'
+CREATE TABLE phpbb_login_attempts (
+ attempt_ip varbinary(40) DEFAULT '' NOT NULL,
+ attempt_browser varbinary(150) DEFAULT '' NOT NULL,
+ attempt_forwarded_for varbinary(255) DEFAULT '' NOT NULL,
+ attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username blob NOT NULL,
+ username_clean blob NOT NULL,
+ KEY att_ip (attempt_ip, attempt_time),
+ KEY att_for (attempt_forwarded_for, attempt_time),
+ KEY att_time (attempt_time),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username blob NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name blob NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY disp_idx (display_on_index),
+ KEY forum_id (forum_id)
+);
+
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_basename varbinary(255) DEFAULT '' NOT NULL,
+ module_class varbinary(10) DEFAULT '' NOT NULL,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ module_langname varbinary(255) DEFAULT '' NOT NULL,
+ module_mode varbinary(255) DEFAULT '' NOT NULL,
+ module_auth varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id),
+ KEY left_right_id (left_id, right_id),
+ KEY module_enabled (module_enabled),
+ KEY class_left_id (module_class, left_id)
+);
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_text blob NOT NULL,
+ poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY poll_opt_id (poll_option_id),
+ KEY topic_id (topic_id)
+);
+
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ vote_user_ip varbinary(40) DEFAULT '' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY vote_user_id (vote_user_id),
+ KEY vote_user_ip (vote_user_ip)
+);
+
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_ip varbinary(40) DEFAULT '' NOT NULL,
+ post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_username blob NOT NULL,
+ post_subject blob NOT NULL,
+ post_text mediumblob NOT NULL,
+ post_checksum varbinary(32) DEFAULT '' NOT NULL,
+ post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
+ post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_reason blob NOT NULL,
+ post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (post_id),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY poster_ip (poster_ip),
+ KEY poster_id (poster_id),
+ KEY post_approved (post_approved),
+ KEY post_username (post_username(255)),
+ KEY tid_post_time (topic_id, post_time)
+);
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_ip varbinary(40) DEFAULT '' NOT NULL,
+ message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ message_subject blob NOT NULL,
+ message_text mediumblob NOT NULL,
+ message_edit_reason blob NOT NULL,
+ message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
+ message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ to_address blob NOT NULL,
+ bcc_address blob NOT NULL,
+ message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (msg_id),
+ KEY author_ip (author_ip),
+ KEY message_time (message_time),
+ KEY author_id (author_id),
+ KEY root_level (root_level)
+);
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_name blob NOT NULL,
+ pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (folder_id),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_string blob NOT NULL,
+ rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_folder_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id),
+ KEY user_id (user_id)
+);
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_id int(11) DEFAULT '0' NOT NULL,
+ KEY msg_id (msg_id),
+ KEY author_id (author_id),
+ KEY usr_flder_id (user_id, folder_id)
+);
+
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ field_name blob NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_ident varbinary(20) DEFAULT '' NOT NULL,
+ field_length varbinary(20) DEFAULT '' NOT NULL,
+ field_minlen varbinary(255) DEFAULT '' NOT NULL,
+ field_maxlen varbinary(255) DEFAULT '' NOT NULL,
+ field_novalue blob NOT NULL,
+ field_default_value blob NOT NULL,
+ field_validation varbinary(60) DEFAULT '' NOT NULL,
+ field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (field_id),
+ KEY fld_type (field_type),
+ KEY fld_ordr (field_order)
+);
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id)
+);
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ lang_value blob NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+);
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_name blob NOT NULL,
+ lang_explain blob NOT NULL,
+ lang_default_value blob NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+);
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ rank_title blob NOT NULL,
+ rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_image varbinary(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+);
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ report_text mediumblob NOT NULL,
+ reported_post_text mediumblob NOT NULL,
+ PRIMARY KEY (report_id),
+ KEY post_id (post_id),
+ KEY pm_id (pm_id)
+);
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ reason_title blob NOT NULL,
+ reason_description mediumblob NOT NULL,
+ reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (reason_id)
+);
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varbinary(32) DEFAULT '' NOT NULL,
+ search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ search_keywords mediumblob NOT NULL,
+ search_authors mediumblob NOT NULL,
+ PRIMARY KEY (search_key)
+);
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word_text blob NOT NULL,
+ word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (word_id),
+ UNIQUE wrd_txt (word_text(255)),
+ KEY wrd_cnt (word_count)
+);
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ UNIQUE unq_mtch (word_id, post_id, title_match),
+ KEY word_id (word_id),
+ KEY post_id (post_id)
+);
+
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id binary(32) DEFAULT '' NOT NULL,
+ session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_ip varbinary(40) DEFAULT '' NOT NULL,
+ session_browser varbinary(150) DEFAULT '' NOT NULL,
+ session_forwarded_for varbinary(255) DEFAULT '' NOT NULL,
+ session_page blob NOT NULL,
+ session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id),
+ KEY session_time (session_time),
+ KEY session_user_id (session_user_id),
+ KEY session_fid (session_forum_id)
+);
+
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id binary(32) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ last_ip varbinary(40) DEFAULT '' NOT NULL,
+ last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (key_id, user_id),
+ KEY last_login (last_login)
+);
+
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ site_ip varbinary(40) DEFAULT '' NOT NULL,
+ site_hostname varbinary(255) DEFAULT '' NOT NULL,
+ ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (site_id)
+);
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ code varbinary(150) DEFAULT '' NOT NULL,
+ emotion varbinary(150) DEFAULT '' NOT NULL,
+ smiley_url varbinary(50) DEFAULT '' NOT NULL,
+ smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (smiley_id),
+ KEY display_on_post (display_on_posting)
+);
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ style_name blob NOT NULL,
+ style_copyright blob NOT NULL,
+ style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ style_path varbinary(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL,
+ style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
+ style_parent_tree blob NOT NULL,
+ PRIMARY KEY (style_id),
+ UNIQUE style_name (style_name(255))
+);
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_title blob NOT NULL,
+ topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_status tinyint(3) DEFAULT '0' NOT NULL,
+ topic_type tinyint(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_first_poster_name blob NOT NULL,
+ topic_first_poster_colour varbinary(6) DEFAULT '' NOT NULL,
+ topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_name blob NOT NULL,
+ topic_last_poster_colour varbinary(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject blob NOT NULL,
+ topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_title blob NOT NULL,
+ poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
+ poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id),
+ KEY forum_id (forum_id),
+ KEY forum_id_type (forum_id, topic_type),
+ KEY last_post_time (topic_last_post_time),
+ KEY topic_approved (topic_approved),
+ KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
+ KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
+);
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id),
+ KEY topic_id (topic_id),
+ KEY forum_id (forum_id)
+);
+
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id)
+);
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+);
+
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY group_id (group_id),
+ KEY user_id (user_id),
+ KEY group_leader (group_leader)
+);
+
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
+ user_permissions mediumblob NOT NULL,
+ user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_ip varbinary(40) DEFAULT '' NOT NULL,
+ user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ username blob NOT NULL,
+ username_clean blob NOT NULL,
+ user_password varbinary(120) DEFAULT '' NOT NULL,
+ user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_email blob NOT NULL,
+ user_email_hash bigint(20) DEFAULT '0' NOT NULL,
+ user_birthday varbinary(10) DEFAULT '' NOT NULL,
+ user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpage blob NOT NULL,
+ user_last_confirm_key varbinary(10) DEFAULT '' NOT NULL,
+ user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_warnings tinyint(4) DEFAULT '0' NOT NULL,
+ user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
+ user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lang varbinary(30) DEFAULT '' NOT NULL,
+ user_timezone varbinary(100) DEFAULT 'UTC' NOT NULL,
+ user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_colour varbinary(6) DEFAULT '' NOT NULL,
+ user_new_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_full_folder int(11) DEFAULT '-3' NOT NULL,
+ user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varbinary(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varbinary(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_post_sortby_type varbinary(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varbinary(1) DEFAULT 'a' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
+ user_avatar varbinary(255) DEFAULT '' NOT NULL,
+ user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_sig mediumblob NOT NULL,
+ user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL,
+ user_from blob NOT NULL,
+ user_icq varbinary(15) DEFAULT '' NOT NULL,
+ user_aim blob NOT NULL,
+ user_yim blob NOT NULL,
+ user_msnm blob NOT NULL,
+ user_jabber blob NOT NULL,
+ user_website blob NOT NULL,
+ user_occ blob NOT NULL,
+ user_interests blob NOT NULL,
+ user_actkey varbinary(32) DEFAULT '' NOT NULL,
+ user_newpasswd varbinary(120) DEFAULT '' NOT NULL,
+ user_form_salt varbinary(96) DEFAULT '' NOT NULL,
+ user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_reminded tinyint(4) DEFAULT '0' NOT NULL,
+ user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id),
+ KEY user_birthday (user_birthday),
+ KEY user_email_hash (user_email_hash),
+ KEY user_type (user_type),
+ UNIQUE username_clean (username_clean(255))
+);
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (warning_id)
+);
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word blob NOT NULL,
+ replacement blob NOT NULL,
+ PRIMARY KEY (word_id)
+);
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, zebra_id)
+);
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 20af6f3566..45da3284b7 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -1,978 +1,976 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. -# Table: 'phpbb_attachments' -CREATE TABLE phpbb_attachments ( - attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, - post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - physical_filename varchar(255) DEFAULT '' NOT NULL, - real_filename varchar(255) DEFAULT '' NOT NULL, - download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - attach_comment text NOT NULL, - extension varchar(100) DEFAULT '' NOT NULL, - mimetype varchar(100) DEFAULT '' NOT NULL, - filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, - filetime int(11) UNSIGNED DEFAULT '0' NOT NULL, - thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (attach_id), - KEY filetime (filetime), - KEY post_msg_id (post_msg_id), - KEY topic_id (topic_id), - KEY poster_id (poster_id), - KEY is_orphan (is_orphan) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_acl_groups' -CREATE TABLE phpbb_acl_groups ( - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_setting tinyint(2) DEFAULT '0' NOT NULL, - KEY group_id (group_id), - KEY auth_opt_id (auth_option_id), - KEY auth_role_id (auth_role_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_acl_options' -CREATE TABLE phpbb_acl_options ( - auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, - auth_option varchar(50) DEFAULT '' NOT NULL, - is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (auth_option_id), - UNIQUE auth_option (auth_option) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_acl_roles' -CREATE TABLE phpbb_acl_roles ( - role_id mediumint(8) UNSIGNED NOT NULL auto_increment, - role_name varchar(255) DEFAULT '' NOT NULL, - role_description text NOT NULL, - role_type varchar(10) DEFAULT '' NOT NULL, - role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id), - KEY role_type (role_type), - KEY role_order (role_order) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_acl_roles_data' -CREATE TABLE phpbb_acl_roles_data ( - role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_setting tinyint(2) DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id, auth_option_id), - KEY ath_op_id (auth_option_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_acl_users' -CREATE TABLE phpbb_acl_users ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - auth_setting tinyint(2) DEFAULT '0' NOT NULL, - KEY user_id (user_id), - KEY auth_option_id (auth_option_id), - KEY auth_role_id (auth_role_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_banlist' -CREATE TABLE phpbb_banlist ( - ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, - ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - ban_ip varchar(40) DEFAULT '' NOT NULL, - ban_email varchar(100) DEFAULT '' NOT NULL, - ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, - ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, - ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - ban_reason varchar(255) DEFAULT '' NOT NULL, - ban_give_reason varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (ban_id), - KEY ban_end (ban_end), - KEY ban_user (ban_userid, ban_exclude), - KEY ban_email (ban_email, ban_exclude), - KEY ban_ip (ban_ip, ban_exclude) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_bbcodes' -CREATE TABLE phpbb_bbcodes ( - bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_tag varchar(16) DEFAULT '' NOT NULL, - bbcode_helpline varchar(255) DEFAULT '' NOT NULL, - display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_match text NOT NULL, - bbcode_tpl mediumtext NOT NULL, - first_pass_match mediumtext NOT NULL, - first_pass_replace mediumtext NOT NULL, - second_pass_match mediumtext NOT NULL, - second_pass_replace mediumtext NOT NULL, - PRIMARY KEY (bbcode_id), - KEY display_on_post (display_on_posting) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_bookmarks' -CREATE TABLE phpbb_bookmarks ( - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (topic_id, user_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_bots' -CREATE TABLE phpbb_bots ( - bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, - bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - bot_name varchar(255) DEFAULT '' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - bot_agent varchar(255) DEFAULT '' NOT NULL, - bot_ip varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (bot_id), - KEY bot_active (bot_active) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_config' -CREATE TABLE phpbb_config ( - config_name varchar(255) DEFAULT '' NOT NULL, - config_value varchar(255) DEFAULT '' NOT NULL, - is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (config_name), - KEY is_dynamic (is_dynamic) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_confirm' -CREATE TABLE phpbb_confirm ( - confirm_id char(32) DEFAULT '' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, - confirm_type tinyint(3) DEFAULT '0' NOT NULL, - code varchar(8) DEFAULT '' NOT NULL, - seed int(10) UNSIGNED DEFAULT '0' NOT NULL, - attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (session_id, confirm_id), - KEY confirm_type (confirm_type) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_disallow' -CREATE TABLE phpbb_disallow ( - disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, - disallow_username varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (disallow_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_drafts' -CREATE TABLE phpbb_drafts ( - draft_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - draft_subject varchar(255) DEFAULT '' NOT NULL, - draft_message mediumtext NOT NULL, - PRIMARY KEY (draft_id), - KEY save_time (save_time) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_ext' -CREATE TABLE phpbb_ext ( - ext_name varchar(255) DEFAULT '' NOT NULL, - ext_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - ext_state text NOT NULL, - UNIQUE ext_name (ext_name) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_extensions' -CREATE TABLE phpbb_extensions ( - extension_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - extension varchar(100) DEFAULT '' NOT NULL, - PRIMARY KEY (extension_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_extension_groups' -CREATE TABLE phpbb_extension_groups ( - group_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_name varchar(255) DEFAULT '' NOT NULL, - cat_id tinyint(2) DEFAULT '0' NOT NULL, - allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - upload_icon varchar(255) DEFAULT '' NOT NULL, - max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, - allowed_forums text NOT NULL, - allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (group_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_forums' -CREATE TABLE phpbb_forums ( - forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, - parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_parents mediumtext NOT NULL, - forum_name varchar(255) DEFAULT '' NOT NULL, - forum_desc text NOT NULL, - forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL, - forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - forum_desc_uid varchar(8) DEFAULT '' NOT NULL, - forum_link varchar(255) DEFAULT '' NOT NULL, - forum_password varchar(40) DEFAULT '' NOT NULL, - forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_image varchar(255) DEFAULT '' NOT NULL, - forum_rules text NOT NULL, - forum_rules_link varchar(255) DEFAULT '' NOT NULL, - forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL, - forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - forum_rules_uid varchar(8) DEFAULT '' NOT NULL, - forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL, - forum_type tinyint(4) DEFAULT '0' NOT NULL, - forum_status tinyint(4) DEFAULT '0' NOT NULL, - forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_post_subject varchar(255) DEFAULT '' NOT NULL, - forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - forum_last_poster_name varchar(255) DEFAULT '' NOT NULL, - forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL, - forum_flags tinyint(4) DEFAULT '32' NOT NULL, - forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL, - display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL, - prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (forum_id), - KEY left_right_id (left_id, right_id), - KEY forum_lastpost_id (forum_last_post_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_forums_access' -CREATE TABLE phpbb_forums_access ( - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, - PRIMARY KEY (forum_id, user_id, session_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_forums_track' -CREATE TABLE phpbb_forums_track ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, forum_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_forums_watch' -CREATE TABLE phpbb_forums_watch ( - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - KEY forum_id (forum_id), - KEY user_id (user_id), - KEY notify_stat (notify_status) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_groups' -CREATE TABLE phpbb_groups ( - group_id mediumint(8) UNSIGNED NOT NULL auto_increment, - group_type tinyint(4) DEFAULT '1' NOT NULL, - group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_name varchar(255) DEFAULT '' NOT NULL, - group_desc text NOT NULL, - group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, - group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL, - group_desc_uid varchar(8) DEFAULT '' NOT NULL, - group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_avatar varchar(255) DEFAULT '' NOT NULL, - group_avatar_type tinyint(2) DEFAULT '0' NOT NULL, - group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_colour varchar(6) DEFAULT '' NOT NULL, - group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_teampage mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (group_id), - KEY group_legend_name (group_legend, group_name) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_icons' -CREATE TABLE phpbb_icons ( - icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, - icons_url varchar(255) DEFAULT '' NOT NULL, - icons_width tinyint(4) DEFAULT '0' NOT NULL, - icons_height tinyint(4) DEFAULT '0' NOT NULL, - icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - PRIMARY KEY (icons_id), - KEY display_on_posting (display_on_posting) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_lang' -CREATE TABLE phpbb_lang ( - lang_id tinyint(4) NOT NULL auto_increment, - lang_iso varchar(30) DEFAULT '' NOT NULL, - lang_dir varchar(30) DEFAULT '' NOT NULL, - lang_english_name varchar(100) DEFAULT '' NOT NULL, - lang_local_name varchar(255) DEFAULT '' NOT NULL, - lang_author varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (lang_id), - KEY lang_iso (lang_iso) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_log' -CREATE TABLE phpbb_log ( - log_id mediumint(8) UNSIGNED NOT NULL auto_increment, - log_type tinyint(4) DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - log_ip varchar(40) DEFAULT '' NOT NULL, - log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - log_operation text NOT NULL, - log_data mediumtext NOT NULL, - PRIMARY KEY (log_id), - KEY log_type (log_type), - KEY log_time (log_time), - KEY forum_id (forum_id), - KEY topic_id (topic_id), - KEY reportee_id (reportee_id), - KEY user_id (user_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_login_attempts' -CREATE TABLE phpbb_login_attempts ( - attempt_ip varchar(40) DEFAULT '' NOT NULL, - attempt_browser varchar(150) DEFAULT '' NOT NULL, - attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL, - attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - username varchar(255) DEFAULT '0' NOT NULL, - username_clean varchar(255) DEFAULT '0' NOT NULL, - KEY att_ip (attempt_ip, attempt_time), - KEY att_for (attempt_forwarded_for, attempt_time), - KEY att_time (attempt_time), - KEY user_id (user_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_moderator_cache' -CREATE TABLE phpbb_moderator_cache ( - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - username varchar(255) DEFAULT '' NOT NULL, - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_name varchar(255) DEFAULT '' NOT NULL, - display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - KEY disp_idx (display_on_index), - KEY forum_id (forum_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_modules' -CREATE TABLE phpbb_modules ( - module_id mediumint(8) UNSIGNED NOT NULL auto_increment, - module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - module_basename varchar(255) DEFAULT '' NOT NULL, - module_class varchar(10) DEFAULT '' NOT NULL, - parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - module_langname varchar(255) DEFAULT '' NOT NULL, - module_mode varchar(255) DEFAULT '' NOT NULL, - module_auth varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (module_id), - KEY left_right_id (left_id, right_id), - KEY module_enabled (module_enabled), - KEY class_left_id (module_class, left_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_poll_options' -CREATE TABLE phpbb_poll_options ( - poll_option_id tinyint(4) DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_option_text text NOT NULL, - poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - KEY poll_opt_id (poll_option_id), - KEY topic_id (topic_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_poll_votes' -CREATE TABLE phpbb_poll_votes ( - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_option_id tinyint(4) DEFAULT '0' NOT NULL, - vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - vote_user_ip varchar(40) DEFAULT '' NOT NULL, - KEY topic_id (topic_id), - KEY vote_user_id (vote_user_id), - KEY vote_user_ip (vote_user_ip) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_posts' -CREATE TABLE phpbb_posts ( - post_id mediumint(8) UNSIGNED NOT NULL auto_increment, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poster_ip varchar(40) DEFAULT '' NOT NULL, - post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_username varchar(255) DEFAULT '' NOT NULL, - post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, - post_text mediumtext NOT NULL, - post_checksum varchar(32) DEFAULT '' NOT NULL, - post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(8) DEFAULT '' NOT NULL, - post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_reason varchar(255) DEFAULT '' NOT NULL, - post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (post_id), - KEY forum_id (forum_id), - KEY topic_id (topic_id), - KEY poster_ip (poster_ip), - KEY poster_id (poster_id), - KEY post_approved (post_approved), - KEY post_username (post_username), - KEY tid_post_time (topic_id, post_time) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_privmsgs' -CREATE TABLE phpbb_privmsgs ( - msg_id mediumint(8) UNSIGNED NOT NULL auto_increment, - root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_ip varchar(40) DEFAULT '' NOT NULL, - message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - message_subject varchar(255) DEFAULT '' NOT NULL, - message_text mediumtext NOT NULL, - message_edit_reason varchar(255) DEFAULT '' NOT NULL, - message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(8) DEFAULT '' NOT NULL, - message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - to_address text NOT NULL, - bcc_address text NOT NULL, - message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (msg_id), - KEY author_ip (author_ip), - KEY message_time (message_time), - KEY author_id (author_id), - KEY root_level (root_level) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_privmsgs_folder' -CREATE TABLE phpbb_privmsgs_folder ( - folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - folder_name varchar(255) DEFAULT '' NOT NULL, - pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (folder_id), - KEY user_id (user_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_privmsgs_rules' -CREATE TABLE phpbb_privmsgs_rules ( - rule_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_string varchar(255) DEFAULT '' NOT NULL, - rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rule_folder_id int(11) DEFAULT '0' NOT NULL, - PRIMARY KEY (rule_id), - KEY user_id (user_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_privmsgs_to' -CREATE TABLE phpbb_privmsgs_to ( - msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - folder_id int(11) DEFAULT '0' NOT NULL, - KEY msg_id (msg_id), - KEY author_id (author_id), - KEY usr_flder_id (user_id, folder_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_profile_fields' -CREATE TABLE phpbb_profile_fields ( - field_id mediumint(8) UNSIGNED NOT NULL auto_increment, - field_name varchar(255) DEFAULT '' NOT NULL, - field_type tinyint(4) DEFAULT '0' NOT NULL, - field_ident varchar(20) DEFAULT '' NOT NULL, - field_length varchar(20) DEFAULT '' NOT NULL, - field_minlen varchar(255) DEFAULT '' NOT NULL, - field_maxlen varchar(255) DEFAULT '' NOT NULL, - field_novalue varchar(255) DEFAULT '' NOT NULL, - field_default_value varchar(255) DEFAULT '' NOT NULL, - field_validation varchar(20) DEFAULT '' NOT NULL, - field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (field_id), - KEY fld_type (field_type), - KEY fld_ordr (field_order) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_profile_fields_data' -CREATE TABLE phpbb_profile_fields_data ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_profile_fields_lang' -CREATE TABLE phpbb_profile_fields_lang ( - field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - field_type tinyint(4) DEFAULT '0' NOT NULL, - lang_value varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (field_id, lang_id, option_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_profile_lang' -CREATE TABLE phpbb_profile_lang ( - field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - lang_name varchar(255) DEFAULT '' NOT NULL, - lang_explain text NOT NULL, - lang_default_value varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (field_id, lang_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_ranks' -CREATE TABLE phpbb_ranks ( - rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, - rank_title varchar(255) DEFAULT '' NOT NULL, - rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - rank_image varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (rank_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_reports' -CREATE TABLE phpbb_reports ( - report_id mediumint(8) UNSIGNED NOT NULL auto_increment, - reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - report_text mediumtext NOT NULL, - reported_post_text mediumtext NOT NULL, - PRIMARY KEY (report_id), - KEY post_id (post_id), - KEY pm_id (pm_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_reports_reasons' -CREATE TABLE phpbb_reports_reasons ( - reason_id smallint(4) UNSIGNED NOT NULL auto_increment, - reason_title varchar(255) DEFAULT '' NOT NULL, - reason_description mediumtext NOT NULL, - reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (reason_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_search_results' -CREATE TABLE phpbb_search_results ( - search_key varchar(32) DEFAULT '' NOT NULL, - search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - search_keywords mediumtext NOT NULL, - search_authors mediumtext NOT NULL, - PRIMARY KEY (search_key) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_search_wordlist' -CREATE TABLE phpbb_search_wordlist ( - word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word_text varchar(255) DEFAULT '' NOT NULL, - word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (word_id), - UNIQUE wrd_txt (word_text), - KEY wrd_cnt (word_count) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_search_wordmatch' -CREATE TABLE phpbb_search_wordmatch ( - post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - UNIQUE unq_mtch (word_id, post_id, title_match), - KEY word_id (word_id), - KEY post_id (post_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_sessions' -CREATE TABLE phpbb_sessions ( - session_id char(32) DEFAULT '' NOT NULL, - session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_start int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - session_ip varchar(40) DEFAULT '' NOT NULL, - session_browser varchar(150) DEFAULT '' NOT NULL, - session_forwarded_for varchar(255) DEFAULT '' NOT NULL, - session_page varchar(255) DEFAULT '' NOT NULL, - session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (session_id), - KEY session_time (session_time), - KEY session_user_id (session_user_id), - KEY session_fid (session_forum_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_sessions_keys' -CREATE TABLE phpbb_sessions_keys ( - key_id char(32) DEFAULT '' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - last_ip varchar(40) DEFAULT '' NOT NULL, - last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (key_id, user_id), - KEY last_login (last_login) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_sitelist' -CREATE TABLE phpbb_sitelist ( - site_id mediumint(8) UNSIGNED NOT NULL auto_increment, - site_ip varchar(40) DEFAULT '' NOT NULL, - site_hostname varchar(255) DEFAULT '' NOT NULL, - ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (site_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_smilies' -CREATE TABLE phpbb_smilies ( - smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, - code varchar(50) DEFAULT '' NOT NULL, - emotion varchar(50) DEFAULT '' NOT NULL, - smiley_url varchar(50) DEFAULT '' NOT NULL, - smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - PRIMARY KEY (smiley_id), - KEY display_on_post (display_on_posting) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_styles' -CREATE TABLE phpbb_styles ( - style_id mediumint(8) UNSIGNED NOT NULL auto_increment, - style_name varchar(255) DEFAULT '' NOT NULL, - style_copyright varchar(255) DEFAULT '' NOT NULL, - style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - style_path varchar(100) DEFAULT '' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, - style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL, - style_parent_tree text NOT NULL, - PRIMARY KEY (style_id), - UNIQUE style_name (style_name) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_topics' -CREATE TABLE phpbb_topics ( - topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci, - topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_status tinyint(3) DEFAULT '0' NOT NULL, - topic_type tinyint(3) DEFAULT '0' NOT NULL, - topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_first_poster_name varchar(255) DEFAULT '' NOT NULL, - topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, - topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_poster_name varchar(255) DEFAULT '' NOT NULL, - topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, - topic_last_post_subject varchar(255) DEFAULT '' NOT NULL, - topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_title varchar(255) DEFAULT '' NOT NULL, - poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, - poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, - poll_max_options tinyint(4) DEFAULT '1' NOT NULL, - poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL, - poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (topic_id), - KEY forum_id (forum_id), - KEY forum_id_type (forum_id, topic_type), - KEY last_post_time (topic_last_post_time), - KEY topic_approved (topic_approved), - KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), - KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, topic_id), - KEY topic_id (topic_id), - KEY forum_id (forum_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_topics_posted' -CREATE TABLE phpbb_topics_posted ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, topic_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_topics_watch' -CREATE TABLE phpbb_topics_watch ( - topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - KEY topic_id (topic_id), - KEY user_id (user_id), - KEY notify_stat (notify_status) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_user_group' -CREATE TABLE phpbb_user_group ( - group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - KEY group_id (group_id), - KEY user_id (user_id), - KEY group_leader (group_leader) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_users' -CREATE TABLE phpbb_users ( - user_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_type tinyint(2) DEFAULT '0' NOT NULL, - group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, - user_permissions mediumtext NOT NULL, - user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_ip varchar(40) DEFAULT '' NOT NULL, - user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, - username varchar(255) DEFAULT '' NOT NULL, - username_clean varchar(255) DEFAULT '' NOT NULL, - user_password varchar(40) DEFAULT '' NOT NULL, - user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_email varchar(100) DEFAULT '' NOT NULL, - user_email_hash bigint(20) DEFAULT '0' NOT NULL, - user_birthday varchar(10) DEFAULT '' NOT NULL, - user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastpage varchar(200) DEFAULT '' NOT NULL, - user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, - user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_warnings tinyint(4) DEFAULT '0' NOT NULL, - user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, - user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, - user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_lang varchar(30) DEFAULT '' NOT NULL, - user_timezone varchar(100) DEFAULT 'UTC' NOT NULL, - user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, - user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg int(4) DEFAULT '0' NOT NULL, - user_unread_privmsg int(4) DEFAULT '0' NOT NULL, - user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_full_folder int(11) DEFAULT '-3' NOT NULL, - user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, - user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, - user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, - user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, - user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_notify_type tinyint(4) DEFAULT '0' NOT NULL, - user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL, - user_avatar varchar(255) DEFAULT '' NOT NULL, - user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, - user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - user_sig mediumtext NOT NULL, - user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, - user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_from varchar(100) DEFAULT '' NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, - user_aim varchar(255) DEFAULT '' NOT NULL, - user_yim varchar(255) DEFAULT '' NOT NULL, - user_msnm varchar(255) DEFAULT '' NOT NULL, - user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, - user_occ text NOT NULL, - user_interests text NOT NULL, - user_actkey varchar(32) DEFAULT '' NOT NULL, - user_newpasswd varchar(40) DEFAULT '' NOT NULL, - user_form_salt varchar(32) DEFAULT '' NOT NULL, - user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - user_reminded tinyint(4) DEFAULT '0' NOT NULL, - user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id), - KEY user_birthday (user_birthday), - KEY user_email_hash (user_email_hash), - KEY user_type (user_type), - UNIQUE username_clean (username_clean) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_warnings' -CREATE TABLE phpbb_warnings ( - warning_id mediumint(8) UNSIGNED NOT NULL auto_increment, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (warning_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_words' -CREATE TABLE phpbb_words ( - word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word varchar(255) DEFAULT '' NOT NULL, - replacement varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (word_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_zebra' -CREATE TABLE phpbb_zebra ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, zebra_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - +# DO NOT EDIT THIS FILE, IT IS GENERATED
+#
+# To change the contents of this file, edit
+# phpBB/develop/create_schema_files.php and
+# run it.
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ physical_filename varchar(255) DEFAULT '' NOT NULL,
+ real_filename varchar(255) DEFAULT '' NOT NULL,
+ download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ attach_comment text NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ mimetype varchar(100) DEFAULT '' NOT NULL,
+ filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (attach_id),
+ KEY filetime (filetime),
+ KEY post_msg_id (post_msg_id),
+ KEY topic_id (topic_id),
+ KEY poster_id (poster_id),
+ KEY is_orphan (is_orphan)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY group_id (group_id),
+ KEY auth_opt_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ auth_option varchar(50) DEFAULT '' NOT NULL,
+ is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (auth_option_id),
+ UNIQUE auth_option (auth_option)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ role_name varchar(255) DEFAULT '' NOT NULL,
+ role_description text NOT NULL,
+ role_type varchar(10) DEFAULT '' NOT NULL,
+ role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id),
+ KEY role_type (role_type),
+ KEY role_order (role_order)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id),
+ KEY ath_op_id (auth_option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ auth_setting tinyint(2) DEFAULT '0' NOT NULL,
+ KEY user_id (user_id),
+ KEY auth_option_id (auth_option_id),
+ KEY auth_role_id (auth_role_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_ip varchar(40) DEFAULT '' NOT NULL,
+ ban_email varchar(100) DEFAULT '' NOT NULL,
+ ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ban_reason varchar(255) DEFAULT '' NOT NULL,
+ ban_give_reason varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (ban_id),
+ KEY ban_end (ban_end),
+ KEY ban_user (ban_userid, ban_exclude),
+ KEY ban_email (ban_email, ban_exclude),
+ KEY ban_ip (ban_ip, ban_exclude)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_tag varchar(16) DEFAULT '' NOT NULL,
+ bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_match text NOT NULL,
+ bbcode_tpl mediumtext NOT NULL,
+ first_pass_match mediumtext NOT NULL,
+ first_pass_replace mediumtext NOT NULL,
+ second_pass_match mediumtext NOT NULL,
+ second_pass_replace mediumtext NOT NULL,
+ PRIMARY KEY (bbcode_id),
+ KEY display_on_post (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id, user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ bot_name varchar(255) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ bot_agent varchar(255) DEFAULT '' NOT NULL,
+ bot_ip varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id),
+ KEY bot_active (bot_active)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varchar(255) DEFAULT '' NOT NULL,
+ config_value varchar(255) DEFAULT '' NOT NULL,
+ is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (config_name),
+ KEY is_dynamic (is_dynamic)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ confirm_type tinyint(3) DEFAULT '0' NOT NULL,
+ code varchar(8) DEFAULT '' NOT NULL,
+ seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
+ attempts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id, confirm_id),
+ KEY confirm_type (confirm_type)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ disallow_username varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (disallow_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ draft_subject varchar(255) DEFAULT '' NOT NULL,
+ draft_message mediumtext NOT NULL,
+ PRIMARY KEY (draft_id),
+ KEY save_time (save_time)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_ext'
+CREATE TABLE phpbb_ext (
+ ext_name varchar(255) DEFAULT '' NOT NULL,
+ ext_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ ext_state text NOT NULL,
+ UNIQUE ext_name (ext_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ cat_id tinyint(2) DEFAULT '0' NOT NULL,
+ allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ upload_icon varchar(255) DEFAULT '' NOT NULL,
+ max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ allowed_forums text NOT NULL,
+ allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_parents mediumtext NOT NULL,
+ forum_name varchar(255) DEFAULT '' NOT NULL,
+ forum_desc text NOT NULL,
+ forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_link varchar(255) DEFAULT '' NOT NULL,
+ forum_password varchar(40) DEFAULT '' NOT NULL,
+ forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_image varchar(255) DEFAULT '' NOT NULL,
+ forum_rules text NOT NULL,
+ forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
+ forum_type tinyint(4) DEFAULT '0' NOT NULL,
+ forum_status tinyint(4) DEFAULT '0' NOT NULL,
+ forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ forum_flags tinyint(4) DEFAULT '32' NOT NULL,
+ forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL,
+ display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (forum_id),
+ KEY left_right_id (left_id, right_id),
+ KEY forum_lastpost_id (forum_last_post_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY forum_id (forum_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ group_type tinyint(4) DEFAULT '1' NOT NULL,
+ group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ group_desc text NOT NULL,
+ group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
+ group_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar varchar(255) DEFAULT '' NOT NULL,
+ group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_colour varchar(6) DEFAULT '' NOT NULL,
+ group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_legend mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_teampage mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY group_legend_name (group_legend, group_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ icons_url varchar(255) DEFAULT '' NOT NULL,
+ icons_width tinyint(4) DEFAULT '0' NOT NULL,
+ icons_height tinyint(4) DEFAULT '0' NOT NULL,
+ icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (icons_id),
+ KEY display_on_posting (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id tinyint(4) NOT NULL auto_increment,
+ lang_iso varchar(30) DEFAULT '' NOT NULL,
+ lang_dir varchar(30) DEFAULT '' NOT NULL,
+ lang_english_name varchar(100) DEFAULT '' NOT NULL,
+ lang_local_name varchar(255) DEFAULT '' NOT NULL,
+ lang_author varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (lang_id),
+ KEY lang_iso (lang_iso)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ log_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_ip varchar(40) DEFAULT '' NOT NULL,
+ log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ log_operation text NOT NULL,
+ log_data mediumtext NOT NULL,
+ PRIMARY KEY (log_id),
+ KEY log_type (log_type),
+ KEY log_time (log_time),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY reportee_id (reportee_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_login_attempts'
+CREATE TABLE phpbb_login_attempts (
+ attempt_ip varchar(40) DEFAULT '' NOT NULL,
+ attempt_browser varchar(150) DEFAULT '' NOT NULL,
+ attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL,
+ attempt_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(255) DEFAULT '0' NOT NULL,
+ username_clean varchar(255) DEFAULT '0' NOT NULL,
+ KEY att_ip (attempt_ip, attempt_time),
+ KEY att_for (attempt_forwarded_for, attempt_time),
+ KEY att_time (attempt_time),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(255) DEFAULT '' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY disp_idx (display_on_index),
+ KEY forum_id (forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_basename varchar(255) DEFAULT '' NOT NULL,
+ module_class varchar(10) DEFAULT '' NOT NULL,
+ parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ module_langname varchar(255) DEFAULT '' NOT NULL,
+ module_mode varchar(255) DEFAULT '' NOT NULL,
+ module_auth varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id),
+ KEY left_right_id (left_id, right_id),
+ KEY module_enabled (module_enabled),
+ KEY class_left_id (module_class, left_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_text text NOT NULL,
+ poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY poll_opt_id (poll_option_id),
+ KEY topic_id (topic_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
+ vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ vote_user_ip varchar(40) DEFAULT '' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY vote_user_id (vote_user_id),
+ KEY vote_user_ip (vote_user_ip)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_ip varchar(40) DEFAULT '' NOT NULL,
+ post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_username varchar(255) DEFAULT '' NOT NULL,
+ post_subject varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
+ post_text mediumtext NOT NULL,
+ post_checksum varchar(32) DEFAULT '' NOT NULL,
+ post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (post_id),
+ KEY forum_id (forum_id),
+ KEY topic_id (topic_id),
+ KEY poster_ip (poster_ip),
+ KEY poster_id (poster_id),
+ KEY post_approved (post_approved),
+ KEY post_username (post_username),
+ KEY tid_post_time (topic_id, post_time)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_ip varchar(40) DEFAULT '' NOT NULL,
+ message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ message_subject varchar(255) DEFAULT '' NOT NULL,
+ message_text mediumtext NOT NULL,
+ message_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ to_address text NOT NULL,
+ bcc_address text NOT NULL,
+ message_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (msg_id),
+ KEY author_ip (author_ip),
+ KEY message_time (message_time),
+ KEY author_id (author_id),
+ KEY root_level (root_level)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_name varchar(255) DEFAULT '' NOT NULL,
+ pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (folder_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_string varchar(255) DEFAULT '' NOT NULL,
+ rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_folder_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id),
+ KEY user_id (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_id int(11) DEFAULT '0' NOT NULL,
+ KEY msg_id (msg_id),
+ KEY author_id (author_id),
+ KEY usr_flder_id (user_id, folder_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ field_name varchar(255) DEFAULT '' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ field_ident varchar(20) DEFAULT '' NOT NULL,
+ field_length varchar(20) DEFAULT '' NOT NULL,
+ field_minlen varchar(255) DEFAULT '' NOT NULL,
+ field_maxlen varchar(255) DEFAULT '' NOT NULL,
+ field_novalue varchar(255) DEFAULT '' NOT NULL,
+ field_default_value varchar(255) DEFAULT '' NOT NULL,
+ field_validation varchar(20) DEFAULT '' NOT NULL,
+ field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (field_id),
+ KEY fld_type (field_type),
+ KEY fld_ordr (field_order)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ field_type tinyint(4) DEFAULT '0' NOT NULL,
+ lang_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_explain text NOT NULL,
+ lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ rank_title varchar(255) DEFAULT '' NOT NULL,
+ rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ rank_image varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ report_text mediumtext NOT NULL,
+ reported_post_text mediumtext NOT NULL,
+ PRIMARY KEY (report_id),
+ KEY post_id (post_id),
+ KEY pm_id (pm_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
+ reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_description mediumtext NOT NULL,
+ reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (reason_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) DEFAULT '' NOT NULL,
+ search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ search_keywords mediumtext NOT NULL,
+ search_authors mediumtext NOT NULL,
+ PRIMARY KEY (search_key)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word_text varchar(255) DEFAULT '' NOT NULL,
+ word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (word_id),
+ UNIQUE wrd_txt (word_text),
+ KEY wrd_cnt (word_count)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ UNIQUE unq_mtch (word_id, post_id, title_match),
+ KEY word_id (word_id),
+ KEY post_id (post_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' NOT NULL,
+ session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ session_ip varchar(40) DEFAULT '' NOT NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
+ session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
+ session_page varchar(255) DEFAULT '' NOT NULL,
+ session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id),
+ KEY session_time (session_time),
+ KEY session_user_id (session_user_id),
+ KEY session_fid (session_forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ last_ip varchar(40) DEFAULT '' NOT NULL,
+ last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (key_id, user_id),
+ KEY last_login (last_login)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ site_ip varchar(40) DEFAULT '' NOT NULL,
+ site_hostname varchar(255) DEFAULT '' NOT NULL,
+ ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (site_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ code varchar(50) DEFAULT '' NOT NULL,
+ emotion varchar(50) DEFAULT '' NOT NULL,
+ smiley_url varchar(50) DEFAULT '' NOT NULL,
+ smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (smiley_id),
+ KEY display_on_post (display_on_posting)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ style_name varchar(255) DEFAULT '' NOT NULL,
+ style_copyright varchar(255) DEFAULT '' NOT NULL,
+ style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ style_path varchar(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
+ style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL,
+ style_parent_tree text NOT NULL,
+ PRIMARY KEY (style_id),
+ UNIQUE style_name (style_name)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_title varchar(255) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
+ topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_status tinyint(3) DEFAULT '0' NOT NULL,
+ topic_type tinyint(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_title varchar(255) DEFAULT '' NOT NULL,
+ poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
+ poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (topic_id),
+ KEY forum_id (forum_id),
+ KEY forum_id_type (forum_id, topic_type),
+ KEY last_post_time (topic_last_post_time),
+ KEY topic_approved (topic_approved),
+ KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
+ KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id),
+ KEY topic_id (topic_id),
+ KEY forum_id (forum_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ KEY topic_id (topic_id),
+ KEY user_id (user_id),
+ KEY notify_stat (notify_status)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ KEY group_id (group_id),
+ KEY user_id (user_id),
+ KEY group_leader (group_leader)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_type tinyint(2) DEFAULT '0' NOT NULL,
+ group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
+ user_permissions mediumtext NOT NULL,
+ user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_ip varchar(40) DEFAULT '' NOT NULL,
+ user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ username varchar(255) DEFAULT '' NOT NULL,
+ username_clean varchar(255) DEFAULT '' NOT NULL,
+ user_password varchar(40) DEFAULT '' NOT NULL,
+ user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email_hash bigint(20) DEFAULT '0' NOT NULL,
+ user_birthday varchar(10) DEFAULT '' NOT NULL,
+ user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
+ user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_warnings tinyint(4) DEFAULT '0' NOT NULL,
+ user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
+ user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lang varchar(30) DEFAULT '' NOT NULL,
+ user_timezone varchar(100) DEFAULT 'UTC' NOT NULL,
+ user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_colour varchar(6) DEFAULT '' NOT NULL,
+ user_new_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_full_folder int(11) DEFAULT '-3' NOT NULL,
+ user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
+ user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_options int(11) UNSIGNED DEFAULT '230271' NOT NULL,
+ user_avatar varchar(255) DEFAULT '' NOT NULL,
+ user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_sig mediumtext NOT NULL,
+ user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ user_from varchar(100) DEFAULT '' NOT NULL,
+ user_icq varchar(15) DEFAULT '' NOT NULL,
+ user_aim varchar(255) DEFAULT '' NOT NULL,
+ user_yim varchar(255) DEFAULT '' NOT NULL,
+ user_msnm varchar(255) DEFAULT '' NOT NULL,
+ user_jabber varchar(255) DEFAULT '' NOT NULL,
+ user_website varchar(200) DEFAULT '' NOT NULL,
+ user_occ text NOT NULL,
+ user_interests text NOT NULL,
+ user_actkey varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(40) DEFAULT '' NOT NULL,
+ user_form_salt varchar(32) DEFAULT '' NOT NULL,
+ user_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ user_reminded tinyint(4) DEFAULT '0' NOT NULL,
+ user_reminded_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id),
+ KEY user_birthday (user_birthday),
+ KEY user_email_hash (user_email_hash),
+ KEY user_type (user_type),
+ UNIQUE username_clean (username_clean)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (warning_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word varchar(255) DEFAULT '' NOT NULL,
+ replacement varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (word_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, zebra_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 04155fe28b..02d8042ff7 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1,1787 +1,1785 @@ -/* - * DO NOT EDIT THIS FILE, IT IS GENERATED - * - * To change the contents of this file, edit - * phpBB/develop/create_schema_files.php and - * run it. - */ - -/* - This first section is optional, however its probably the best method - of running phpBB on Oracle. If you already have a tablespace and user created - for phpBB you can leave this section commented out! - - The first set of statements create a phpBB tablespace and a phpBB user, - make sure you change the password of the phpBB user before you run this script!! -*/ - -/* -CREATE TABLESPACE "PHPBB" - LOGGING - DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora' - SIZE 10M - AUTOEXTEND ON NEXT 10M - MAXSIZE 100M; - -CREATE USER "PHPBB" - PROFILE "DEFAULT" - IDENTIFIED BY "phpbb_password" - DEFAULT TABLESPACE "PHPBB" - QUOTA UNLIMITED ON "PHPBB" - ACCOUNT UNLOCK; - -GRANT ANALYZE ANY TO "PHPBB"; -GRANT CREATE SEQUENCE TO "PHPBB"; -GRANT CREATE SESSION TO "PHPBB"; -GRANT CREATE TABLE TO "PHPBB"; -GRANT CREATE TRIGGER TO "PHPBB"; -GRANT CREATE VIEW TO "PHPBB"; -GRANT "CONNECT" TO "PHPBB"; - -COMMIT; -DISCONNECT; - -CONNECT phpbb/phpbb_password; -*/ -/* - Table: 'phpbb_attachments' -*/ -CREATE TABLE phpbb_attachments ( - attach_id number(8) NOT NULL, - post_msg_id number(8) DEFAULT '0' NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - in_message number(1) DEFAULT '0' NOT NULL, - poster_id number(8) DEFAULT '0' NOT NULL, - is_orphan number(1) DEFAULT '1' NOT NULL, - physical_filename varchar2(255) DEFAULT '' , - real_filename varchar2(255) DEFAULT '' , - download_count number(8) DEFAULT '0' NOT NULL, - attach_comment clob DEFAULT '' , - extension varchar2(100) DEFAULT '' , - mimetype varchar2(100) DEFAULT '' , - filesize number(20) DEFAULT '0' NOT NULL, - filetime number(11) DEFAULT '0' NOT NULL, - thumbnail number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id) -) -/ - -CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime) -/ -CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id) -/ -CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id) -/ -CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id) -/ -CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan) -/ - -CREATE SEQUENCE phpbb_attachments_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_attachments -BEFORE INSERT ON phpbb_attachments -FOR EACH ROW WHEN ( - new.attach_id IS NULL OR new.attach_id = 0 -) -BEGIN - SELECT phpbb_attachments_seq.nextval - INTO :new.attach_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_acl_groups' -*/ -CREATE TABLE phpbb_acl_groups ( - group_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - auth_option_id number(8) DEFAULT '0' NOT NULL, - auth_role_id number(8) DEFAULT '0' NOT NULL, - auth_setting number(2) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id) -/ -CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id) -/ -CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id) -/ - -/* - Table: 'phpbb_acl_options' -*/ -CREATE TABLE phpbb_acl_options ( - auth_option_id number(8) NOT NULL, - auth_option varchar2(50) DEFAULT '' , - is_global number(1) DEFAULT '0' NOT NULL, - is_local number(1) DEFAULT '0' NOT NULL, - founder_only number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id), - CONSTRAINT u_phpbb_auth_option UNIQUE (auth_option) -) -/ - - -CREATE SEQUENCE phpbb_acl_options_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_acl_options -BEFORE INSERT ON phpbb_acl_options -FOR EACH ROW WHEN ( - new.auth_option_id IS NULL OR new.auth_option_id = 0 -) -BEGIN - SELECT phpbb_acl_options_seq.nextval - INTO :new.auth_option_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_acl_roles' -*/ -CREATE TABLE phpbb_acl_roles ( - role_id number(8) NOT NULL, - role_name varchar2(765) DEFAULT '' , - role_description clob DEFAULT '' , - role_type varchar2(10) DEFAULT '' , - role_order number(4) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id) -) -/ - -CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type) -/ -CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order) -/ - -CREATE SEQUENCE phpbb_acl_roles_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_acl_roles -BEFORE INSERT ON phpbb_acl_roles -FOR EACH ROW WHEN ( - new.role_id IS NULL OR new.role_id = 0 -) -BEGIN - SELECT phpbb_acl_roles_seq.nextval - INTO :new.role_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_acl_roles_data' -*/ -CREATE TABLE phpbb_acl_roles_data ( - role_id number(8) DEFAULT '0' NOT NULL, - auth_option_id number(8) DEFAULT '0' NOT NULL, - auth_setting number(2) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id) -) -/ - -CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id) -/ - -/* - Table: 'phpbb_acl_users' -*/ -CREATE TABLE phpbb_acl_users ( - user_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - auth_option_id number(8) DEFAULT '0' NOT NULL, - auth_role_id number(8) DEFAULT '0' NOT NULL, - auth_setting number(2) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id) -/ -CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id) -/ -CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) -/ - -/* - Table: 'phpbb_banlist' -*/ -CREATE TABLE phpbb_banlist ( - ban_id number(8) NOT NULL, - ban_userid number(8) DEFAULT '0' NOT NULL, - ban_ip varchar2(40) DEFAULT '' , - ban_email varchar2(300) DEFAULT '' , - ban_start number(11) DEFAULT '0' NOT NULL, - ban_end number(11) DEFAULT '0' NOT NULL, - ban_exclude number(1) DEFAULT '0' NOT NULL, - ban_reason varchar2(765) DEFAULT '' , - ban_give_reason varchar2(765) DEFAULT '' , - CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id) -) -/ - -CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end) -/ -CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude) -/ -CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude) -/ -CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude) -/ - -CREATE SEQUENCE phpbb_banlist_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_banlist -BEFORE INSERT ON phpbb_banlist -FOR EACH ROW WHEN ( - new.ban_id IS NULL OR new.ban_id = 0 -) -BEGIN - SELECT phpbb_banlist_seq.nextval - INTO :new.ban_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_bbcodes' -*/ -CREATE TABLE phpbb_bbcodes ( - bbcode_id number(4) DEFAULT '0' NOT NULL, - bbcode_tag varchar2(16) DEFAULT '' , - bbcode_helpline varchar2(765) DEFAULT '' , - display_on_posting number(1) DEFAULT '0' NOT NULL, - bbcode_match clob DEFAULT '' , - bbcode_tpl clob DEFAULT '' , - first_pass_match clob DEFAULT '' , - first_pass_replace clob DEFAULT '' , - second_pass_match clob DEFAULT '' , - second_pass_replace clob DEFAULT '' , - CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id) -) -/ - -CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting) -/ - -/* - Table: 'phpbb_bookmarks' -*/ -CREATE TABLE phpbb_bookmarks ( - topic_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id) -) -/ - - -/* - Table: 'phpbb_bots' -*/ -CREATE TABLE phpbb_bots ( - bot_id number(8) NOT NULL, - bot_active number(1) DEFAULT '1' NOT NULL, - bot_name varchar2(765) DEFAULT '' , - user_id number(8) DEFAULT '0' NOT NULL, - bot_agent varchar2(255) DEFAULT '' , - bot_ip varchar2(255) DEFAULT '' , - CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id) -) -/ - -CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active) -/ - -CREATE SEQUENCE phpbb_bots_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_bots -BEFORE INSERT ON phpbb_bots -FOR EACH ROW WHEN ( - new.bot_id IS NULL OR new.bot_id = 0 -) -BEGIN - SELECT phpbb_bots_seq.nextval - INTO :new.bot_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_config' -*/ -CREATE TABLE phpbb_config ( - config_name varchar2(255) DEFAULT '' , - config_value varchar2(765) DEFAULT '' , - is_dynamic number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name) -) -/ - -CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic) -/ - -/* - Table: 'phpbb_confirm' -*/ -CREATE TABLE phpbb_confirm ( - confirm_id char(32) DEFAULT '' , - session_id char(32) DEFAULT '' , - confirm_type number(3) DEFAULT '0' NOT NULL, - code varchar2(8) DEFAULT '' , - seed number(10) DEFAULT '0' NOT NULL, - attempts number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id) -) -/ - -CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type) -/ - -/* - Table: 'phpbb_disallow' -*/ -CREATE TABLE phpbb_disallow ( - disallow_id number(8) NOT NULL, - disallow_username varchar2(765) DEFAULT '' , - CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id) -) -/ - - -CREATE SEQUENCE phpbb_disallow_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_disallow -BEFORE INSERT ON phpbb_disallow -FOR EACH ROW WHEN ( - new.disallow_id IS NULL OR new.disallow_id = 0 -) -BEGIN - SELECT phpbb_disallow_seq.nextval - INTO :new.disallow_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_drafts' -*/ -CREATE TABLE phpbb_drafts ( - draft_id number(8) NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - save_time number(11) DEFAULT '0' NOT NULL, - draft_subject varchar2(765) DEFAULT '' , - draft_message clob DEFAULT '' , - CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id) -) -/ - -CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time) -/ - -CREATE SEQUENCE phpbb_drafts_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_drafts -BEFORE INSERT ON phpbb_drafts -FOR EACH ROW WHEN ( - new.draft_id IS NULL OR new.draft_id = 0 -) -BEGIN - SELECT phpbb_drafts_seq.nextval - INTO :new.draft_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_ext' -*/ -CREATE TABLE phpbb_ext ( - ext_name varchar2(255) DEFAULT '' , - ext_active number(1) DEFAULT '0' NOT NULL, - ext_state clob DEFAULT '' , - CONSTRAINT u_phpbb_ext_name UNIQUE (ext_name) -) -/ - - -/* - Table: 'phpbb_extensions' -*/ -CREATE TABLE phpbb_extensions ( - extension_id number(8) NOT NULL, - group_id number(8) DEFAULT '0' NOT NULL, - extension varchar2(100) DEFAULT '' , - CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id) -) -/ - - -CREATE SEQUENCE phpbb_extensions_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_extensions -BEFORE INSERT ON phpbb_extensions -FOR EACH ROW WHEN ( - new.extension_id IS NULL OR new.extension_id = 0 -) -BEGIN - SELECT phpbb_extensions_seq.nextval - INTO :new.extension_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_extension_groups' -*/ -CREATE TABLE phpbb_extension_groups ( - group_id number(8) NOT NULL, - group_name varchar2(765) DEFAULT '' , - cat_id number(2) DEFAULT '0' NOT NULL, - allow_group number(1) DEFAULT '0' NOT NULL, - download_mode number(1) DEFAULT '1' NOT NULL, - upload_icon varchar2(255) DEFAULT '' , - max_filesize number(20) DEFAULT '0' NOT NULL, - allowed_forums clob DEFAULT '' , - allow_in_pm number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id) -) -/ - - -CREATE SEQUENCE phpbb_extension_groups_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_extension_groups -BEFORE INSERT ON phpbb_extension_groups -FOR EACH ROW WHEN ( - new.group_id IS NULL OR new.group_id = 0 -) -BEGIN - SELECT phpbb_extension_groups_seq.nextval - INTO :new.group_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_forums' -*/ -CREATE TABLE phpbb_forums ( - forum_id number(8) NOT NULL, - parent_id number(8) DEFAULT '0' NOT NULL, - left_id number(8) DEFAULT '0' NOT NULL, - right_id number(8) DEFAULT '0' NOT NULL, - forum_parents clob DEFAULT '' , - forum_name varchar2(765) DEFAULT '' , - forum_desc clob DEFAULT '' , - forum_desc_bitfield varchar2(255) DEFAULT '' , - forum_desc_options number(11) DEFAULT '7' NOT NULL, - forum_desc_uid varchar2(8) DEFAULT '' , - forum_link varchar2(765) DEFAULT '' , - forum_password varchar2(120) DEFAULT '' , - forum_style number(8) DEFAULT '0' NOT NULL, - forum_image varchar2(255) DEFAULT '' , - forum_rules clob DEFAULT '' , - forum_rules_link varchar2(765) DEFAULT '' , - forum_rules_bitfield varchar2(255) DEFAULT '' , - forum_rules_options number(11) DEFAULT '7' NOT NULL, - forum_rules_uid varchar2(8) DEFAULT '' , - forum_topics_per_page number(4) DEFAULT '0' NOT NULL, - forum_type number(4) DEFAULT '0' NOT NULL, - forum_status number(4) DEFAULT '0' NOT NULL, - forum_posts number(8) DEFAULT '0' NOT NULL, - forum_topics number(8) DEFAULT '0' NOT NULL, - forum_topics_real number(8) DEFAULT '0' NOT NULL, - forum_last_post_id number(8) DEFAULT '0' NOT NULL, - forum_last_poster_id number(8) DEFAULT '0' NOT NULL, - forum_last_post_subject varchar2(765) DEFAULT '' , - forum_last_post_time number(11) DEFAULT '0' NOT NULL, - forum_last_poster_name varchar2(765) DEFAULT '' , - forum_last_poster_colour varchar2(6) DEFAULT '' , - forum_flags number(4) DEFAULT '32' NOT NULL, - forum_options number(20) DEFAULT '0' NOT NULL, - display_subforum_list number(1) DEFAULT '1' NOT NULL, - display_on_index number(1) DEFAULT '1' NOT NULL, - enable_indexing number(1) DEFAULT '1' NOT NULL, - enable_icons number(1) DEFAULT '1' NOT NULL, - enable_prune number(1) DEFAULT '0' NOT NULL, - prune_next number(11) DEFAULT '0' NOT NULL, - prune_days number(8) DEFAULT '0' NOT NULL, - prune_viewed number(8) DEFAULT '0' NOT NULL, - prune_freq number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id) -) -/ - -CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id) -/ -CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id) -/ - -CREATE SEQUENCE phpbb_forums_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_forums -BEFORE INSERT ON phpbb_forums -FOR EACH ROW WHEN ( - new.forum_id IS NULL OR new.forum_id = 0 -) -BEGIN - SELECT phpbb_forums_seq.nextval - INTO :new.forum_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_forums_access' -*/ -CREATE TABLE phpbb_forums_access ( - forum_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' , - CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id) -) -/ - - -/* - Table: 'phpbb_forums_track' -*/ -CREATE TABLE phpbb_forums_track ( - user_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - mark_time number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id) -) -/ - - -/* - Table: 'phpbb_forums_watch' -*/ -CREATE TABLE phpbb_forums_watch ( - forum_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - notify_status number(1) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id) -/ -CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id) -/ -CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status) -/ - -/* - Table: 'phpbb_groups' -*/ -CREATE TABLE phpbb_groups ( - group_id number(8) NOT NULL, - group_type number(4) DEFAULT '1' NOT NULL, - group_founder_manage number(1) DEFAULT '0' NOT NULL, - group_skip_auth number(1) DEFAULT '0' NOT NULL, - group_name varchar2(255) DEFAULT '' , - group_desc clob DEFAULT '' , - group_desc_bitfield varchar2(255) DEFAULT '' , - group_desc_options number(11) DEFAULT '7' NOT NULL, - group_desc_uid varchar2(8) DEFAULT '' , - group_display number(1) DEFAULT '0' NOT NULL, - group_avatar varchar2(255) DEFAULT '' , - group_avatar_type number(2) DEFAULT '0' NOT NULL, - group_avatar_width number(4) DEFAULT '0' NOT NULL, - group_avatar_height number(4) DEFAULT '0' NOT NULL, - group_rank number(8) DEFAULT '0' NOT NULL, - group_colour varchar2(6) DEFAULT '' , - group_sig_chars number(8) DEFAULT '0' NOT NULL, - group_receive_pm number(1) DEFAULT '0' NOT NULL, - group_message_limit number(8) DEFAULT '0' NOT NULL, - group_max_recipients number(8) DEFAULT '0' NOT NULL, - group_legend number(8) DEFAULT '0' NOT NULL, - group_teampage number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id) -) -/ - -CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name) -/ - -CREATE SEQUENCE phpbb_groups_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_groups -BEFORE INSERT ON phpbb_groups -FOR EACH ROW WHEN ( - new.group_id IS NULL OR new.group_id = 0 -) -BEGIN - SELECT phpbb_groups_seq.nextval - INTO :new.group_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_icons' -*/ -CREATE TABLE phpbb_icons ( - icons_id number(8) NOT NULL, - icons_url varchar2(255) DEFAULT '' , - icons_width number(4) DEFAULT '0' NOT NULL, - icons_height number(4) DEFAULT '0' NOT NULL, - icons_order number(8) DEFAULT '0' NOT NULL, - display_on_posting number(1) DEFAULT '1' NOT NULL, - CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id) -) -/ - -CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting) -/ - -CREATE SEQUENCE phpbb_icons_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_icons -BEFORE INSERT ON phpbb_icons -FOR EACH ROW WHEN ( - new.icons_id IS NULL OR new.icons_id = 0 -) -BEGIN - SELECT phpbb_icons_seq.nextval - INTO :new.icons_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_lang' -*/ -CREATE TABLE phpbb_lang ( - lang_id number(4) NOT NULL, - lang_iso varchar2(30) DEFAULT '' , - lang_dir varchar2(30) DEFAULT '' , - lang_english_name varchar2(300) DEFAULT '' , - lang_local_name varchar2(765) DEFAULT '' , - lang_author varchar2(765) DEFAULT '' , - CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id) -) -/ - -CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso) -/ - -CREATE SEQUENCE phpbb_lang_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_lang -BEFORE INSERT ON phpbb_lang -FOR EACH ROW WHEN ( - new.lang_id IS NULL OR new.lang_id = 0 -) -BEGIN - SELECT phpbb_lang_seq.nextval - INTO :new.lang_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_log' -*/ -CREATE TABLE phpbb_log ( - log_id number(8) NOT NULL, - log_type number(4) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - reportee_id number(8) DEFAULT '0' NOT NULL, - log_ip varchar2(40) DEFAULT '' , - log_time number(11) DEFAULT '0' NOT NULL, - log_operation clob DEFAULT '' , - log_data clob DEFAULT '' , - CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id) -) -/ - -CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type) -/ -CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time) -/ -CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id) -/ -CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id) -/ -CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id) -/ -CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id) -/ - -CREATE SEQUENCE phpbb_log_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_log -BEFORE INSERT ON phpbb_log -FOR EACH ROW WHEN ( - new.log_id IS NULL OR new.log_id = 0 -) -BEGIN - SELECT phpbb_log_seq.nextval - INTO :new.log_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_login_attempts' -*/ -CREATE TABLE phpbb_login_attempts ( - attempt_ip varchar2(40) DEFAULT '' , - attempt_browser varchar2(150) DEFAULT '' , - attempt_forwarded_for varchar2(255) DEFAULT '' , - attempt_time number(11) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - username varchar2(765) DEFAULT '0' NOT NULL, - username_clean varchar2(255) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time) -/ -CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time) -/ -CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time) -/ -CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id) -/ - -/* - Table: 'phpbb_moderator_cache' -*/ -CREATE TABLE phpbb_moderator_cache ( - forum_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - username varchar2(765) DEFAULT '' , - group_id number(8) DEFAULT '0' NOT NULL, - group_name varchar2(765) DEFAULT '' , - display_on_index number(1) DEFAULT '1' NOT NULL -) -/ - -CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index) -/ -CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id) -/ - -/* - Table: 'phpbb_modules' -*/ -CREATE TABLE phpbb_modules ( - module_id number(8) NOT NULL, - module_enabled number(1) DEFAULT '1' NOT NULL, - module_display number(1) DEFAULT '1' NOT NULL, - module_basename varchar2(255) DEFAULT '' , - module_class varchar2(10) DEFAULT '' , - parent_id number(8) DEFAULT '0' NOT NULL, - left_id number(8) DEFAULT '0' NOT NULL, - right_id number(8) DEFAULT '0' NOT NULL, - module_langname varchar2(255) DEFAULT '' , - module_mode varchar2(255) DEFAULT '' , - module_auth varchar2(255) DEFAULT '' , - CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id) -) -/ - -CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id) -/ -CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled) -/ -CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id) -/ - -CREATE SEQUENCE phpbb_modules_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_modules -BEFORE INSERT ON phpbb_modules -FOR EACH ROW WHEN ( - new.module_id IS NULL OR new.module_id = 0 -) -BEGIN - SELECT phpbb_modules_seq.nextval - INTO :new.module_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_poll_options' -*/ -CREATE TABLE phpbb_poll_options ( - poll_option_id number(4) DEFAULT '0' NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - poll_option_text clob DEFAULT '' , - poll_option_total number(8) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id) -/ -CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id) -/ - -/* - Table: 'phpbb_poll_votes' -*/ -CREATE TABLE phpbb_poll_votes ( - topic_id number(8) DEFAULT '0' NOT NULL, - poll_option_id number(4) DEFAULT '0' NOT NULL, - vote_user_id number(8) DEFAULT '0' NOT NULL, - vote_user_ip varchar2(40) DEFAULT '' -) -/ - -CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id) -/ -CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id) -/ -CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip) -/ - -/* - Table: 'phpbb_posts' -*/ -CREATE TABLE phpbb_posts ( - post_id number(8) NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - poster_id number(8) DEFAULT '0' NOT NULL, - icon_id number(8) DEFAULT '0' NOT NULL, - poster_ip varchar2(40) DEFAULT '' , - post_time number(11) DEFAULT '0' NOT NULL, - post_approved number(1) DEFAULT '1' NOT NULL, - post_reported number(1) DEFAULT '0' NOT NULL, - enable_bbcode number(1) DEFAULT '1' NOT NULL, - enable_smilies number(1) DEFAULT '1' NOT NULL, - enable_magic_url number(1) DEFAULT '1' NOT NULL, - enable_sig number(1) DEFAULT '1' NOT NULL, - post_username varchar2(765) DEFAULT '' , - post_subject varchar2(765) DEFAULT '' , - post_text clob DEFAULT '' , - post_checksum varchar2(32) DEFAULT '' , - post_attachment number(1) DEFAULT '0' NOT NULL, - bbcode_bitfield varchar2(255) DEFAULT '' , - bbcode_uid varchar2(8) DEFAULT '' , - post_postcount number(1) DEFAULT '1' NOT NULL, - post_edit_time number(11) DEFAULT '0' NOT NULL, - post_edit_reason varchar2(765) DEFAULT '' , - post_edit_user number(8) DEFAULT '0' NOT NULL, - post_edit_count number(4) DEFAULT '0' NOT NULL, - post_edit_locked number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id) -) -/ - -CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id) -/ -CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id) -/ -CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip) -/ -CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id) -/ -CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved) -/ -CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username) -/ -CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time) -/ - -CREATE SEQUENCE phpbb_posts_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_posts -BEFORE INSERT ON phpbb_posts -FOR EACH ROW WHEN ( - new.post_id IS NULL OR new.post_id = 0 -) -BEGIN - SELECT phpbb_posts_seq.nextval - INTO :new.post_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_privmsgs' -*/ -CREATE TABLE phpbb_privmsgs ( - msg_id number(8) NOT NULL, - root_level number(8) DEFAULT '0' NOT NULL, - author_id number(8) DEFAULT '0' NOT NULL, - icon_id number(8) DEFAULT '0' NOT NULL, - author_ip varchar2(40) DEFAULT '' , - message_time number(11) DEFAULT '0' NOT NULL, - enable_bbcode number(1) DEFAULT '1' NOT NULL, - enable_smilies number(1) DEFAULT '1' NOT NULL, - enable_magic_url number(1) DEFAULT '1' NOT NULL, - enable_sig number(1) DEFAULT '1' NOT NULL, - message_subject varchar2(765) DEFAULT '' , - message_text clob DEFAULT '' , - message_edit_reason varchar2(765) DEFAULT '' , - message_edit_user number(8) DEFAULT '0' NOT NULL, - message_attachment number(1) DEFAULT '0' NOT NULL, - bbcode_bitfield varchar2(255) DEFAULT '' , - bbcode_uid varchar2(8) DEFAULT '' , - message_edit_time number(11) DEFAULT '0' NOT NULL, - message_edit_count number(4) DEFAULT '0' NOT NULL, - to_address clob DEFAULT '' , - bcc_address clob DEFAULT '' , - message_reported number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id) -) -/ - -CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip) -/ -CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time) -/ -CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id) -/ -CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level) -/ - -CREATE SEQUENCE phpbb_privmsgs_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_privmsgs -BEFORE INSERT ON phpbb_privmsgs -FOR EACH ROW WHEN ( - new.msg_id IS NULL OR new.msg_id = 0 -) -BEGIN - SELECT phpbb_privmsgs_seq.nextval - INTO :new.msg_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_privmsgs_folder' -*/ -CREATE TABLE phpbb_privmsgs_folder ( - folder_id number(8) NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - folder_name varchar2(765) DEFAULT '' , - pm_count number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id) -) -/ - -CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id) -/ - -CREATE SEQUENCE phpbb_privmsgs_folder_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder -BEFORE INSERT ON phpbb_privmsgs_folder -FOR EACH ROW WHEN ( - new.folder_id IS NULL OR new.folder_id = 0 -) -BEGIN - SELECT phpbb_privmsgs_folder_seq.nextval - INTO :new.folder_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_privmsgs_rules' -*/ -CREATE TABLE phpbb_privmsgs_rules ( - rule_id number(8) NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - rule_check number(8) DEFAULT '0' NOT NULL, - rule_connection number(8) DEFAULT '0' NOT NULL, - rule_string varchar2(765) DEFAULT '' , - rule_user_id number(8) DEFAULT '0' NOT NULL, - rule_group_id number(8) DEFAULT '0' NOT NULL, - rule_action number(8) DEFAULT '0' NOT NULL, - rule_folder_id number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id) -) -/ - -CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id) -/ - -CREATE SEQUENCE phpbb_privmsgs_rules_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules -BEFORE INSERT ON phpbb_privmsgs_rules -FOR EACH ROW WHEN ( - new.rule_id IS NULL OR new.rule_id = 0 -) -BEGIN - SELECT phpbb_privmsgs_rules_seq.nextval - INTO :new.rule_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_privmsgs_to' -*/ -CREATE TABLE phpbb_privmsgs_to ( - msg_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - author_id number(8) DEFAULT '0' NOT NULL, - pm_deleted number(1) DEFAULT '0' NOT NULL, - pm_new number(1) DEFAULT '1' NOT NULL, - pm_unread number(1) DEFAULT '1' NOT NULL, - pm_replied number(1) DEFAULT '0' NOT NULL, - pm_marked number(1) DEFAULT '0' NOT NULL, - pm_forwarded number(1) DEFAULT '0' NOT NULL, - folder_id number(11) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id) -/ -CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id) -/ -CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id) -/ - -/* - Table: 'phpbb_profile_fields' -*/ -CREATE TABLE phpbb_profile_fields ( - field_id number(8) NOT NULL, - field_name varchar2(765) DEFAULT '' , - field_type number(4) DEFAULT '0' NOT NULL, - field_ident varchar2(20) DEFAULT '' , - field_length varchar2(20) DEFAULT '' , - field_minlen varchar2(255) DEFAULT '' , - field_maxlen varchar2(255) DEFAULT '' , - field_novalue varchar2(765) DEFAULT '' , - field_default_value varchar2(765) DEFAULT '' , - field_validation varchar2(60) DEFAULT '' , - field_required number(1) DEFAULT '0' NOT NULL, - field_show_novalue number(1) DEFAULT '0' NOT NULL, - field_show_on_reg number(1) DEFAULT '0' NOT NULL, - field_show_on_pm number(1) DEFAULT '0' NOT NULL, - field_show_on_vt number(1) DEFAULT '0' NOT NULL, - field_show_profile number(1) DEFAULT '0' NOT NULL, - field_hide number(1) DEFAULT '0' NOT NULL, - field_no_view number(1) DEFAULT '0' NOT NULL, - field_active number(1) DEFAULT '0' NOT NULL, - field_order number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id) -) -/ - -CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type) -/ -CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order) -/ - -CREATE SEQUENCE phpbb_profile_fields_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_profile_fields -BEFORE INSERT ON phpbb_profile_fields -FOR EACH ROW WHEN ( - new.field_id IS NULL OR new.field_id = 0 -) -BEGIN - SELECT phpbb_profile_fields_seq.nextval - INTO :new.field_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_profile_fields_data' -*/ -CREATE TABLE phpbb_profile_fields_data ( - user_id number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) -) -/ - - -/* - Table: 'phpbb_profile_fields_lang' -*/ -CREATE TABLE phpbb_profile_fields_lang ( - field_id number(8) DEFAULT '0' NOT NULL, - lang_id number(8) DEFAULT '0' NOT NULL, - option_id number(8) DEFAULT '0' NOT NULL, - field_type number(4) DEFAULT '0' NOT NULL, - lang_value varchar2(765) DEFAULT '' , - CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id) -) -/ - - -/* - Table: 'phpbb_profile_lang' -*/ -CREATE TABLE phpbb_profile_lang ( - field_id number(8) DEFAULT '0' NOT NULL, - lang_id number(8) DEFAULT '0' NOT NULL, - lang_name varchar2(765) DEFAULT '' , - lang_explain clob DEFAULT '' , - lang_default_value varchar2(765) DEFAULT '' , - CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id) -) -/ - - -/* - Table: 'phpbb_ranks' -*/ -CREATE TABLE phpbb_ranks ( - rank_id number(8) NOT NULL, - rank_title varchar2(765) DEFAULT '' , - rank_min number(8) DEFAULT '0' NOT NULL, - rank_special number(1) DEFAULT '0' NOT NULL, - rank_image varchar2(255) DEFAULT '' , - CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id) -) -/ - - -CREATE SEQUENCE phpbb_ranks_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_ranks -BEFORE INSERT ON phpbb_ranks -FOR EACH ROW WHEN ( - new.rank_id IS NULL OR new.rank_id = 0 -) -BEGIN - SELECT phpbb_ranks_seq.nextval - INTO :new.rank_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_reports' -*/ -CREATE TABLE phpbb_reports ( - report_id number(8) NOT NULL, - reason_id number(4) DEFAULT '0' NOT NULL, - post_id number(8) DEFAULT '0' NOT NULL, - pm_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - user_notify number(1) DEFAULT '0' NOT NULL, - report_closed number(1) DEFAULT '0' NOT NULL, - report_time number(11) DEFAULT '0' NOT NULL, - report_text clob DEFAULT '' , - reported_post_text clob DEFAULT '' , - CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id) -) -/ - -CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id) -/ -CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id) -/ - -CREATE SEQUENCE phpbb_reports_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_reports -BEFORE INSERT ON phpbb_reports -FOR EACH ROW WHEN ( - new.report_id IS NULL OR new.report_id = 0 -) -BEGIN - SELECT phpbb_reports_seq.nextval - INTO :new.report_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_reports_reasons' -*/ -CREATE TABLE phpbb_reports_reasons ( - reason_id number(4) NOT NULL, - reason_title varchar2(765) DEFAULT '' , - reason_description clob DEFAULT '' , - reason_order number(4) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id) -) -/ - - -CREATE SEQUENCE phpbb_reports_reasons_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons -BEFORE INSERT ON phpbb_reports_reasons -FOR EACH ROW WHEN ( - new.reason_id IS NULL OR new.reason_id = 0 -) -BEGIN - SELECT phpbb_reports_reasons_seq.nextval - INTO :new.reason_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_search_results' -*/ -CREATE TABLE phpbb_search_results ( - search_key varchar2(32) DEFAULT '' , - search_time number(11) DEFAULT '0' NOT NULL, - search_keywords clob DEFAULT '' , - search_authors clob DEFAULT '' , - CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key) -) -/ - - -/* - Table: 'phpbb_search_wordlist' -*/ -CREATE TABLE phpbb_search_wordlist ( - word_id number(8) NOT NULL, - word_text varchar2(765) DEFAULT '' , - word_common number(1) DEFAULT '0' NOT NULL, - word_count number(8) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id), - CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text) -) -/ - -CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count) -/ - -CREATE SEQUENCE phpbb_search_wordlist_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist -BEFORE INSERT ON phpbb_search_wordlist -FOR EACH ROW WHEN ( - new.word_id IS NULL OR new.word_id = 0 -) -BEGIN - SELECT phpbb_search_wordlist_seq.nextval - INTO :new.word_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_search_wordmatch' -*/ -CREATE TABLE phpbb_search_wordmatch ( - post_id number(8) DEFAULT '0' NOT NULL, - word_id number(8) DEFAULT '0' NOT NULL, - title_match number(1) DEFAULT '0' NOT NULL, - CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match) -) -/ - -CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id) -/ -CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id) -/ - -/* - Table: 'phpbb_sessions' -*/ -CREATE TABLE phpbb_sessions ( - session_id char(32) DEFAULT '' , - session_user_id number(8) DEFAULT '0' NOT NULL, - session_forum_id number(8) DEFAULT '0' NOT NULL, - session_last_visit number(11) DEFAULT '0' NOT NULL, - session_start number(11) DEFAULT '0' NOT NULL, - session_time number(11) DEFAULT '0' NOT NULL, - session_ip varchar2(40) DEFAULT '' , - session_browser varchar2(150) DEFAULT '' , - session_forwarded_for varchar2(255) DEFAULT '' , - session_page varchar2(765) DEFAULT '' , - session_viewonline number(1) DEFAULT '1' NOT NULL, - session_autologin number(1) DEFAULT '0' NOT NULL, - session_admin number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id) -) -/ - -CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time) -/ -CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id) -/ -CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id) -/ - -/* - Table: 'phpbb_sessions_keys' -*/ -CREATE TABLE phpbb_sessions_keys ( - key_id char(32) DEFAULT '' , - user_id number(8) DEFAULT '0' NOT NULL, - last_ip varchar2(40) DEFAULT '' , - last_login number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id) -) -/ - -CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login) -/ - -/* - Table: 'phpbb_sitelist' -*/ -CREATE TABLE phpbb_sitelist ( - site_id number(8) NOT NULL, - site_ip varchar2(40) DEFAULT '' , - site_hostname varchar2(255) DEFAULT '' , - ip_exclude number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id) -) -/ - - -CREATE SEQUENCE phpbb_sitelist_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_sitelist -BEFORE INSERT ON phpbb_sitelist -FOR EACH ROW WHEN ( - new.site_id IS NULL OR new.site_id = 0 -) -BEGIN - SELECT phpbb_sitelist_seq.nextval - INTO :new.site_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_smilies' -*/ -CREATE TABLE phpbb_smilies ( - smiley_id number(8) NOT NULL, - code varchar2(150) DEFAULT '' , - emotion varchar2(150) DEFAULT '' , - smiley_url varchar2(50) DEFAULT '' , - smiley_width number(4) DEFAULT '0' NOT NULL, - smiley_height number(4) DEFAULT '0' NOT NULL, - smiley_order number(8) DEFAULT '0' NOT NULL, - display_on_posting number(1) DEFAULT '1' NOT NULL, - CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id) -) -/ - -CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting) -/ - -CREATE SEQUENCE phpbb_smilies_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_smilies -BEFORE INSERT ON phpbb_smilies -FOR EACH ROW WHEN ( - new.smiley_id IS NULL OR new.smiley_id = 0 -) -BEGIN - SELECT phpbb_smilies_seq.nextval - INTO :new.smiley_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_styles' -*/ -CREATE TABLE phpbb_styles ( - style_id number(8) NOT NULL, - style_name varchar2(765) DEFAULT '' , - style_copyright varchar2(765) DEFAULT '' , - style_active number(1) DEFAULT '1' NOT NULL, - style_path varchar2(100) DEFAULT '' , - bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL, - style_parent_id number(4) DEFAULT '0' NOT NULL, - style_parent_tree clob DEFAULT '' , - CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id), - CONSTRAINT u_phpbb_style_name UNIQUE (style_name) -) -/ - - -CREATE SEQUENCE phpbb_styles_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_styles -BEFORE INSERT ON phpbb_styles -FOR EACH ROW WHEN ( - new.style_id IS NULL OR new.style_id = 0 -) -BEGIN - SELECT phpbb_styles_seq.nextval - INTO :new.style_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_topics' -*/ -CREATE TABLE phpbb_topics ( - topic_id number(8) NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - icon_id number(8) DEFAULT '0' NOT NULL, - topic_attachment number(1) DEFAULT '0' NOT NULL, - topic_approved number(1) DEFAULT '1' NOT NULL, - topic_reported number(1) DEFAULT '0' NOT NULL, - topic_title varchar2(765) DEFAULT '' , - topic_poster number(8) DEFAULT '0' NOT NULL, - topic_time number(11) DEFAULT '0' NOT NULL, - topic_time_limit number(11) DEFAULT '0' NOT NULL, - topic_views number(8) DEFAULT '0' NOT NULL, - topic_replies number(8) DEFAULT '0' NOT NULL, - topic_replies_real number(8) DEFAULT '0' NOT NULL, - topic_status number(3) DEFAULT '0' NOT NULL, - topic_type number(3) DEFAULT '0' NOT NULL, - topic_first_post_id number(8) DEFAULT '0' NOT NULL, - topic_first_poster_name varchar2(765) DEFAULT '' , - topic_first_poster_colour varchar2(6) DEFAULT '' , - topic_last_post_id number(8) DEFAULT '0' NOT NULL, - topic_last_poster_id number(8) DEFAULT '0' NOT NULL, - topic_last_poster_name varchar2(765) DEFAULT '' , - topic_last_poster_colour varchar2(6) DEFAULT '' , - topic_last_post_subject varchar2(765) DEFAULT '' , - topic_last_post_time number(11) DEFAULT '0' NOT NULL, - topic_last_view_time number(11) DEFAULT '0' NOT NULL, - topic_moved_id number(8) DEFAULT '0' NOT NULL, - topic_bumped number(1) DEFAULT '0' NOT NULL, - topic_bumper number(8) DEFAULT '0' NOT NULL, - poll_title varchar2(765) DEFAULT '' , - poll_start number(11) DEFAULT '0' NOT NULL, - poll_length number(11) DEFAULT '0' NOT NULL, - poll_max_options number(4) DEFAULT '1' NOT NULL, - poll_last_vote number(11) DEFAULT '0' NOT NULL, - poll_vote_change number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id) -) -/ - -CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id) -/ -CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type) -/ -CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time) -/ -CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved) -/ -CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id) -/ -CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) -/ - -CREATE SEQUENCE phpbb_topics_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_topics -BEFORE INSERT ON phpbb_topics -FOR EACH ROW WHEN ( - new.topic_id IS NULL OR new.topic_id = 0 -) -BEGIN - SELECT phpbb_topics_seq.nextval - INTO :new.topic_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_topics_track' -*/ -CREATE TABLE phpbb_topics_track ( - user_id number(8) DEFAULT '0' NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - forum_id number(8) DEFAULT '0' NOT NULL, - mark_time number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id) -) -/ - -CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id) -/ -CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id) -/ - -/* - Table: 'phpbb_topics_posted' -*/ -CREATE TABLE phpbb_topics_posted ( - user_id number(8) DEFAULT '0' NOT NULL, - topic_id number(8) DEFAULT '0' NOT NULL, - topic_posted number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id) -) -/ - - -/* - Table: 'phpbb_topics_watch' -*/ -CREATE TABLE phpbb_topics_watch ( - topic_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - notify_status number(1) DEFAULT '0' NOT NULL -) -/ - -CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id) -/ -CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id) -/ -CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status) -/ - -/* - Table: 'phpbb_user_group' -*/ -CREATE TABLE phpbb_user_group ( - group_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - group_leader number(1) DEFAULT '0' NOT NULL, - user_pending number(1) DEFAULT '1' NOT NULL -) -/ - -CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id) -/ -CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id) -/ -CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader) -/ - -/* - Table: 'phpbb_users' -*/ -CREATE TABLE phpbb_users ( - user_id number(8) NOT NULL, - user_type number(2) DEFAULT '0' NOT NULL, - group_id number(8) DEFAULT '3' NOT NULL, - user_permissions clob DEFAULT '' , - user_perm_from number(8) DEFAULT '0' NOT NULL, - user_ip varchar2(40) DEFAULT '' , - user_regdate number(11) DEFAULT '0' NOT NULL, - username varchar2(255) DEFAULT '' , - username_clean varchar2(255) DEFAULT '' , - user_password varchar2(120) DEFAULT '' , - user_passchg number(11) DEFAULT '0' NOT NULL, - user_pass_convert number(1) DEFAULT '0' NOT NULL, - user_email varchar2(300) DEFAULT '' , - user_email_hash number(20) DEFAULT '0' NOT NULL, - user_birthday varchar2(10) DEFAULT '' , - user_lastvisit number(11) DEFAULT '0' NOT NULL, - user_lastmark number(11) DEFAULT '0' NOT NULL, - user_lastpost_time number(11) DEFAULT '0' NOT NULL, - user_lastpage varchar2(600) DEFAULT '' , - user_last_confirm_key varchar2(10) DEFAULT '' , - user_last_search number(11) DEFAULT '0' NOT NULL, - user_warnings number(4) DEFAULT '0' NOT NULL, - user_last_warning number(11) DEFAULT '0' NOT NULL, - user_login_attempts number(4) DEFAULT '0' NOT NULL, - user_inactive_reason number(2) DEFAULT '0' NOT NULL, - user_inactive_time number(11) DEFAULT '0' NOT NULL, - user_posts number(8) DEFAULT '0' NOT NULL, - user_lang varchar2(30) DEFAULT '' , - user_timezone varchar2(100) DEFAULT 'UTC' NOT NULL, - user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL, - user_style number(8) DEFAULT '0' NOT NULL, - user_rank number(8) DEFAULT '0' NOT NULL, - user_colour varchar2(6) DEFAULT '' , - user_new_privmsg number(4) DEFAULT '0' NOT NULL, - user_unread_privmsg number(4) DEFAULT '0' NOT NULL, - user_last_privmsg number(11) DEFAULT '0' NOT NULL, - user_message_rules number(1) DEFAULT '0' NOT NULL, - user_full_folder number(11) DEFAULT '-3' NOT NULL, - user_emailtime number(11) DEFAULT '0' NOT NULL, - user_topic_show_days number(4) DEFAULT '0' NOT NULL, - user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL, - user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL, - user_post_show_days number(4) DEFAULT '0' NOT NULL, - user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL, - user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL, - user_notify number(1) DEFAULT '0' NOT NULL, - user_notify_pm number(1) DEFAULT '1' NOT NULL, - user_notify_type number(4) DEFAULT '0' NOT NULL, - user_allow_pm number(1) DEFAULT '1' NOT NULL, - user_allow_viewonline number(1) DEFAULT '1' NOT NULL, - user_allow_viewemail number(1) DEFAULT '1' NOT NULL, - user_allow_massemail number(1) DEFAULT '1' NOT NULL, - user_options number(11) DEFAULT '230271' NOT NULL, - user_avatar varchar2(255) DEFAULT '' , - user_avatar_type number(2) DEFAULT '0' NOT NULL, - user_avatar_width number(4) DEFAULT '0' NOT NULL, - user_avatar_height number(4) DEFAULT '0' NOT NULL, - user_sig clob DEFAULT '' , - user_sig_bbcode_uid varchar2(8) DEFAULT '' , - user_sig_bbcode_bitfield varchar2(255) DEFAULT '' , - user_from varchar2(300) DEFAULT '' , - user_icq varchar2(15) DEFAULT '' , - user_aim varchar2(765) DEFAULT '' , - user_yim varchar2(765) DEFAULT '' , - user_msnm varchar2(765) DEFAULT '' , - user_jabber varchar2(765) DEFAULT '' , - user_website varchar2(600) DEFAULT '' , - user_occ clob DEFAULT '' , - user_interests clob DEFAULT '' , - user_actkey varchar2(32) DEFAULT '' , - user_newpasswd varchar2(120) DEFAULT '' , - user_form_salt varchar2(96) DEFAULT '' , - user_new number(1) DEFAULT '1' NOT NULL, - user_reminded number(4) DEFAULT '0' NOT NULL, - user_reminded_time number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id), - CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean) -) -/ - -CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday) -/ -CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash) -/ -CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type) -/ - -CREATE SEQUENCE phpbb_users_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_users -BEFORE INSERT ON phpbb_users -FOR EACH ROW WHEN ( - new.user_id IS NULL OR new.user_id = 0 -) -BEGIN - SELECT phpbb_users_seq.nextval - INTO :new.user_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_warnings' -*/ -CREATE TABLE phpbb_warnings ( - warning_id number(8) NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - post_id number(8) DEFAULT '0' NOT NULL, - log_id number(8) DEFAULT '0' NOT NULL, - warning_time number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id) -) -/ - - -CREATE SEQUENCE phpbb_warnings_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_warnings -BEFORE INSERT ON phpbb_warnings -FOR EACH ROW WHEN ( - new.warning_id IS NULL OR new.warning_id = 0 -) -BEGIN - SELECT phpbb_warnings_seq.nextval - INTO :new.warning_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_words' -*/ -CREATE TABLE phpbb_words ( - word_id number(8) NOT NULL, - word varchar2(765) DEFAULT '' , - replacement varchar2(765) DEFAULT '' , - CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id) -) -/ - - -CREATE SEQUENCE phpbb_words_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_words -BEFORE INSERT ON phpbb_words -FOR EACH ROW WHEN ( - new.word_id IS NULL OR new.word_id = 0 -) -BEGIN - SELECT phpbb_words_seq.nextval - INTO :new.word_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_zebra' -*/ -CREATE TABLE phpbb_zebra ( - user_id number(8) DEFAULT '0' NOT NULL, - zebra_id number(8) DEFAULT '0' NOT NULL, - friend number(1) DEFAULT '0' NOT NULL, - foe number(1) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id) -) -/ - - +/*
+ * DO NOT EDIT THIS FILE, IT IS GENERATED
+ *
+ * To change the contents of this file, edit
+ * phpBB/develop/create_schema_files.php and
+ * run it.
+ */
+
+/*
+ This first section is optional, however its probably the best method
+ of running phpBB on Oracle. If you already have a tablespace and user created
+ for phpBB you can leave this section commented out!
+
+ The first set of statements create a phpBB tablespace and a phpBB user,
+ make sure you change the password of the phpBB user before you run this script!!
+*/
+
+/*
+CREATE TABLESPACE "PHPBB"
+ LOGGING
+ DATAFILE 'E:\ORACLE\ORADATA\LOCAL\PHPBB.ora'
+ SIZE 10M
+ AUTOEXTEND ON NEXT 10M
+ MAXSIZE 100M;
+
+CREATE USER "PHPBB"
+ PROFILE "DEFAULT"
+ IDENTIFIED BY "phpbb_password"
+ DEFAULT TABLESPACE "PHPBB"
+ QUOTA UNLIMITED ON "PHPBB"
+ ACCOUNT UNLOCK;
+
+GRANT ANALYZE ANY TO "PHPBB";
+GRANT CREATE SEQUENCE TO "PHPBB";
+GRANT CREATE SESSION TO "PHPBB";
+GRANT CREATE TABLE TO "PHPBB";
+GRANT CREATE TRIGGER TO "PHPBB";
+GRANT CREATE VIEW TO "PHPBB";
+GRANT "CONNECT" TO "PHPBB";
+
+COMMIT;
+DISCONNECT;
+
+CONNECT phpbb/phpbb_password;
+*/
+/*
+ Table: 'phpbb_attachments'
+*/
+CREATE TABLE phpbb_attachments (
+ attach_id number(8) NOT NULL,
+ post_msg_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ in_message number(1) DEFAULT '0' NOT NULL,
+ poster_id number(8) DEFAULT '0' NOT NULL,
+ is_orphan number(1) DEFAULT '1' NOT NULL,
+ physical_filename varchar2(255) DEFAULT '' ,
+ real_filename varchar2(255) DEFAULT '' ,
+ download_count number(8) DEFAULT '0' NOT NULL,
+ attach_comment clob DEFAULT '' ,
+ extension varchar2(100) DEFAULT '' ,
+ mimetype varchar2(100) DEFAULT '' ,
+ filesize number(20) DEFAULT '0' NOT NULL,
+ filetime number(11) DEFAULT '0' NOT NULL,
+ thumbnail number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_attachments PRIMARY KEY (attach_id)
+)
+/
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime)
+/
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id)
+/
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id)
+/
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id)
+/
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan)
+/
+
+CREATE SEQUENCE phpbb_attachments_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_attachments
+BEFORE INSERT ON phpbb_attachments
+FOR EACH ROW WHEN (
+ new.attach_id IS NULL OR new.attach_id = 0
+)
+BEGIN
+ SELECT phpbb_attachments_seq.nextval
+ INTO :new.attach_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_acl_groups'
+*/
+CREATE TABLE phpbb_acl_groups (
+ group_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ auth_option_id number(8) DEFAULT '0' NOT NULL,
+ auth_role_id number(8) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id)
+/
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id)
+/
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id)
+/
+
+/*
+ Table: 'phpbb_acl_options'
+*/
+CREATE TABLE phpbb_acl_options (
+ auth_option_id number(8) NOT NULL,
+ auth_option varchar2(50) DEFAULT '' ,
+ is_global number(1) DEFAULT '0' NOT NULL,
+ is_local number(1) DEFAULT '0' NOT NULL,
+ founder_only number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_acl_options PRIMARY KEY (auth_option_id),
+ CONSTRAINT u_phpbb_auth_option UNIQUE (auth_option)
+)
+/
+
+
+CREATE SEQUENCE phpbb_acl_options_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_acl_options
+BEFORE INSERT ON phpbb_acl_options
+FOR EACH ROW WHEN (
+ new.auth_option_id IS NULL OR new.auth_option_id = 0
+)
+BEGIN
+ SELECT phpbb_acl_options_seq.nextval
+ INTO :new.auth_option_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_acl_roles'
+*/
+CREATE TABLE phpbb_acl_roles (
+ role_id number(8) NOT NULL,
+ role_name varchar2(765) DEFAULT '' ,
+ role_description clob DEFAULT '' ,
+ role_type varchar2(10) DEFAULT '' ,
+ role_order number(4) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_acl_roles PRIMARY KEY (role_id)
+)
+/
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type)
+/
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order)
+/
+
+CREATE SEQUENCE phpbb_acl_roles_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_acl_roles
+BEFORE INSERT ON phpbb_acl_roles
+FOR EACH ROW WHEN (
+ new.role_id IS NULL OR new.role_id = 0
+)
+BEGIN
+ SELECT phpbb_acl_roles_seq.nextval
+ INTO :new.role_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_acl_roles_data'
+*/
+CREATE TABLE phpbb_acl_roles_data (
+ role_id number(8) DEFAULT '0' NOT NULL,
+ auth_option_id number(8) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_acl_roles_data PRIMARY KEY (role_id, auth_option_id)
+)
+/
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id)
+/
+
+/*
+ Table: 'phpbb_acl_users'
+*/
+CREATE TABLE phpbb_acl_users (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ auth_option_id number(8) DEFAULT '0' NOT NULL,
+ auth_role_id number(8) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id)
+/
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
+/
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
+/
+
+/*
+ Table: 'phpbb_banlist'
+*/
+CREATE TABLE phpbb_banlist (
+ ban_id number(8) NOT NULL,
+ ban_userid number(8) DEFAULT '0' NOT NULL,
+ ban_ip varchar2(40) DEFAULT '' ,
+ ban_email varchar2(300) DEFAULT '' ,
+ ban_start number(11) DEFAULT '0' NOT NULL,
+ ban_end number(11) DEFAULT '0' NOT NULL,
+ ban_exclude number(1) DEFAULT '0' NOT NULL,
+ ban_reason varchar2(765) DEFAULT '' ,
+ ban_give_reason varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_banlist PRIMARY KEY (ban_id)
+)
+/
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end)
+/
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude)
+/
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude)
+/
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude)
+/
+
+CREATE SEQUENCE phpbb_banlist_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_banlist
+BEFORE INSERT ON phpbb_banlist
+FOR EACH ROW WHEN (
+ new.ban_id IS NULL OR new.ban_id = 0
+)
+BEGIN
+ SELECT phpbb_banlist_seq.nextval
+ INTO :new.ban_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_bbcodes'
+*/
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id number(4) DEFAULT '0' NOT NULL,
+ bbcode_tag varchar2(16) DEFAULT '' ,
+ bbcode_helpline varchar2(765) DEFAULT '' ,
+ display_on_posting number(1) DEFAULT '0' NOT NULL,
+ bbcode_match clob DEFAULT '' ,
+ bbcode_tpl clob DEFAULT '' ,
+ first_pass_match clob DEFAULT '' ,
+ first_pass_replace clob DEFAULT '' ,
+ second_pass_match clob DEFAULT '' ,
+ second_pass_replace clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
+)
+/
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting)
+/
+
+/*
+ Table: 'phpbb_bookmarks'
+*/
+CREATE TABLE phpbb_bookmarks (
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_bookmarks PRIMARY KEY (topic_id, user_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_bots'
+*/
+CREATE TABLE phpbb_bots (
+ bot_id number(8) NOT NULL,
+ bot_active number(1) DEFAULT '1' NOT NULL,
+ bot_name varchar2(765) DEFAULT '' ,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ bot_agent varchar2(255) DEFAULT '' ,
+ bot_ip varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id)
+)
+/
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active)
+/
+
+CREATE SEQUENCE phpbb_bots_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_bots
+BEFORE INSERT ON phpbb_bots
+FOR EACH ROW WHEN (
+ new.bot_id IS NULL OR new.bot_id = 0
+)
+BEGIN
+ SELECT phpbb_bots_seq.nextval
+ INTO :new.bot_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_config'
+*/
+CREATE TABLE phpbb_config (
+ config_name varchar2(255) DEFAULT '' ,
+ config_value varchar2(765) DEFAULT '' ,
+ is_dynamic number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name)
+)
+/
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic)
+/
+
+/*
+ Table: 'phpbb_confirm'
+*/
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' ,
+ session_id char(32) DEFAULT '' ,
+ confirm_type number(3) DEFAULT '0' NOT NULL,
+ code varchar2(8) DEFAULT '' ,
+ seed number(10) DEFAULT '0' NOT NULL,
+ attempts number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id)
+)
+/
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type)
+/
+
+/*
+ Table: 'phpbb_disallow'
+*/
+CREATE TABLE phpbb_disallow (
+ disallow_id number(8) NOT NULL,
+ disallow_username varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_disallow_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_disallow
+BEFORE INSERT ON phpbb_disallow
+FOR EACH ROW WHEN (
+ new.disallow_id IS NULL OR new.disallow_id = 0
+)
+BEGIN
+ SELECT phpbb_disallow_seq.nextval
+ INTO :new.disallow_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_drafts'
+*/
+CREATE TABLE phpbb_drafts (
+ draft_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ save_time number(11) DEFAULT '0' NOT NULL,
+ draft_subject varchar2(765) DEFAULT '' ,
+ draft_message clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_drafts PRIMARY KEY (draft_id)
+)
+/
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time)
+/
+
+CREATE SEQUENCE phpbb_drafts_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_drafts
+BEFORE INSERT ON phpbb_drafts
+FOR EACH ROW WHEN (
+ new.draft_id IS NULL OR new.draft_id = 0
+)
+BEGIN
+ SELECT phpbb_drafts_seq.nextval
+ INTO :new.draft_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_ext'
+*/
+CREATE TABLE phpbb_ext (
+ ext_name varchar2(255) DEFAULT '' ,
+ ext_active number(1) DEFAULT '0' NOT NULL,
+ ext_state clob DEFAULT '' ,
+ CONSTRAINT u_phpbb_ext_name UNIQUE (ext_name)
+)
+/
+
+
+/*
+ Table: 'phpbb_extensions'
+*/
+CREATE TABLE phpbb_extensions (
+ extension_id number(8) NOT NULL,
+ group_id number(8) DEFAULT '0' NOT NULL,
+ extension varchar2(100) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_extensions_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_extensions
+BEFORE INSERT ON phpbb_extensions
+FOR EACH ROW WHEN (
+ new.extension_id IS NULL OR new.extension_id = 0
+)
+BEGIN
+ SELECT phpbb_extensions_seq.nextval
+ INTO :new.extension_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_extension_groups'
+*/
+CREATE TABLE phpbb_extension_groups (
+ group_id number(8) NOT NULL,
+ group_name varchar2(765) DEFAULT '' ,
+ cat_id number(2) DEFAULT '0' NOT NULL,
+ allow_group number(1) DEFAULT '0' NOT NULL,
+ download_mode number(1) DEFAULT '1' NOT NULL,
+ upload_icon varchar2(255) DEFAULT '' ,
+ max_filesize number(20) DEFAULT '0' NOT NULL,
+ allowed_forums clob DEFAULT '' ,
+ allow_in_pm number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_extension_groups PRIMARY KEY (group_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_extension_groups_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_extension_groups
+BEFORE INSERT ON phpbb_extension_groups
+FOR EACH ROW WHEN (
+ new.group_id IS NULL OR new.group_id = 0
+)
+BEGIN
+ SELECT phpbb_extension_groups_seq.nextval
+ INTO :new.group_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_forums'
+*/
+CREATE TABLE phpbb_forums (
+ forum_id number(8) NOT NULL,
+ parent_id number(8) DEFAULT '0' NOT NULL,
+ left_id number(8) DEFAULT '0' NOT NULL,
+ right_id number(8) DEFAULT '0' NOT NULL,
+ forum_parents clob DEFAULT '' ,
+ forum_name varchar2(765) DEFAULT '' ,
+ forum_desc clob DEFAULT '' ,
+ forum_desc_bitfield varchar2(255) DEFAULT '' ,
+ forum_desc_options number(11) DEFAULT '7' NOT NULL,
+ forum_desc_uid varchar2(8) DEFAULT '' ,
+ forum_link varchar2(765) DEFAULT '' ,
+ forum_password varchar2(120) DEFAULT '' ,
+ forum_style number(8) DEFAULT '0' NOT NULL,
+ forum_image varchar2(255) DEFAULT '' ,
+ forum_rules clob DEFAULT '' ,
+ forum_rules_link varchar2(765) DEFAULT '' ,
+ forum_rules_bitfield varchar2(255) DEFAULT '' ,
+ forum_rules_options number(11) DEFAULT '7' NOT NULL,
+ forum_rules_uid varchar2(8) DEFAULT '' ,
+ forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
+ forum_type number(4) DEFAULT '0' NOT NULL,
+ forum_status number(4) DEFAULT '0' NOT NULL,
+ forum_posts number(8) DEFAULT '0' NOT NULL,
+ forum_topics number(8) DEFAULT '0' NOT NULL,
+ forum_topics_real number(8) DEFAULT '0' NOT NULL,
+ forum_last_post_id number(8) DEFAULT '0' NOT NULL,
+ forum_last_poster_id number(8) DEFAULT '0' NOT NULL,
+ forum_last_post_subject varchar2(765) DEFAULT '' ,
+ forum_last_post_time number(11) DEFAULT '0' NOT NULL,
+ forum_last_poster_name varchar2(765) DEFAULT '' ,
+ forum_last_poster_colour varchar2(6) DEFAULT '' ,
+ forum_flags number(4) DEFAULT '32' NOT NULL,
+ forum_options number(20) DEFAULT '0' NOT NULL,
+ display_subforum_list number(1) DEFAULT '1' NOT NULL,
+ display_on_index number(1) DEFAULT '1' NOT NULL,
+ enable_indexing number(1) DEFAULT '1' NOT NULL,
+ enable_icons number(1) DEFAULT '1' NOT NULL,
+ enable_prune number(1) DEFAULT '0' NOT NULL,
+ prune_next number(11) DEFAULT '0' NOT NULL,
+ prune_days number(8) DEFAULT '0' NOT NULL,
+ prune_viewed number(8) DEFAULT '0' NOT NULL,
+ prune_freq number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id)
+)
+/
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id)
+/
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id)
+/
+
+CREATE SEQUENCE phpbb_forums_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_forums
+BEFORE INSERT ON phpbb_forums
+FOR EACH ROW WHEN (
+ new.forum_id IS NULL OR new.forum_id = 0
+)
+BEGIN
+ SELECT phpbb_forums_seq.nextval
+ INTO :new.forum_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_forums_access'
+*/
+CREATE TABLE phpbb_forums_access (
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ session_id char(32) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_forums_access PRIMARY KEY (forum_id, user_id, session_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_forums_track'
+*/
+CREATE TABLE phpbb_forums_track (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ mark_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_forums_track PRIMARY KEY (user_id, forum_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_forums_watch'
+*/
+CREATE TABLE phpbb_forums_watch (
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ notify_status number(1) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id)
+/
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id)
+/
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status)
+/
+
+/*
+ Table: 'phpbb_groups'
+*/
+CREATE TABLE phpbb_groups (
+ group_id number(8) NOT NULL,
+ group_type number(4) DEFAULT '1' NOT NULL,
+ group_founder_manage number(1) DEFAULT '0' NOT NULL,
+ group_skip_auth number(1) DEFAULT '0' NOT NULL,
+ group_name varchar2(255) DEFAULT '' ,
+ group_desc clob DEFAULT '' ,
+ group_desc_bitfield varchar2(255) DEFAULT '' ,
+ group_desc_options number(11) DEFAULT '7' NOT NULL,
+ group_desc_uid varchar2(8) DEFAULT '' ,
+ group_display number(1) DEFAULT '0' NOT NULL,
+ group_avatar varchar2(255) DEFAULT '' ,
+ group_avatar_type number(2) DEFAULT '0' NOT NULL,
+ group_avatar_width number(4) DEFAULT '0' NOT NULL,
+ group_avatar_height number(4) DEFAULT '0' NOT NULL,
+ group_rank number(8) DEFAULT '0' NOT NULL,
+ group_colour varchar2(6) DEFAULT '' ,
+ group_sig_chars number(8) DEFAULT '0' NOT NULL,
+ group_receive_pm number(1) DEFAULT '0' NOT NULL,
+ group_message_limit number(8) DEFAULT '0' NOT NULL,
+ group_max_recipients number(8) DEFAULT '0' NOT NULL,
+ group_legend number(8) DEFAULT '0' NOT NULL,
+ group_teampage number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id)
+)
+/
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name)
+/
+
+CREATE SEQUENCE phpbb_groups_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_groups
+BEFORE INSERT ON phpbb_groups
+FOR EACH ROW WHEN (
+ new.group_id IS NULL OR new.group_id = 0
+)
+BEGIN
+ SELECT phpbb_groups_seq.nextval
+ INTO :new.group_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_icons'
+*/
+CREATE TABLE phpbb_icons (
+ icons_id number(8) NOT NULL,
+ icons_url varchar2(255) DEFAULT '' ,
+ icons_width number(4) DEFAULT '0' NOT NULL,
+ icons_height number(4) DEFAULT '0' NOT NULL,
+ icons_order number(8) DEFAULT '0' NOT NULL,
+ display_on_posting number(1) DEFAULT '1' NOT NULL,
+ CONSTRAINT pk_phpbb_icons PRIMARY KEY (icons_id)
+)
+/
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting)
+/
+
+CREATE SEQUENCE phpbb_icons_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_icons
+BEFORE INSERT ON phpbb_icons
+FOR EACH ROW WHEN (
+ new.icons_id IS NULL OR new.icons_id = 0
+)
+BEGIN
+ SELECT phpbb_icons_seq.nextval
+ INTO :new.icons_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_lang'
+*/
+CREATE TABLE phpbb_lang (
+ lang_id number(4) NOT NULL,
+ lang_iso varchar2(30) DEFAULT '' ,
+ lang_dir varchar2(30) DEFAULT '' ,
+ lang_english_name varchar2(300) DEFAULT '' ,
+ lang_local_name varchar2(765) DEFAULT '' ,
+ lang_author varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_lang PRIMARY KEY (lang_id)
+)
+/
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso)
+/
+
+CREATE SEQUENCE phpbb_lang_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_lang
+BEFORE INSERT ON phpbb_lang
+FOR EACH ROW WHEN (
+ new.lang_id IS NULL OR new.lang_id = 0
+)
+BEGIN
+ SELECT phpbb_lang_seq.nextval
+ INTO :new.lang_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_log'
+*/
+CREATE TABLE phpbb_log (
+ log_id number(8) NOT NULL,
+ log_type number(4) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ reportee_id number(8) DEFAULT '0' NOT NULL,
+ log_ip varchar2(40) DEFAULT '' ,
+ log_time number(11) DEFAULT '0' NOT NULL,
+ log_operation clob DEFAULT '' ,
+ log_data clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_log PRIMARY KEY (log_id)
+)
+/
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
+/
+CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time)
+/
+CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
+/
+CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
+/
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id)
+/
+CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id)
+/
+
+CREATE SEQUENCE phpbb_log_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_log
+BEFORE INSERT ON phpbb_log
+FOR EACH ROW WHEN (
+ new.log_id IS NULL OR new.log_id = 0
+)
+BEGIN
+ SELECT phpbb_log_seq.nextval
+ INTO :new.log_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_login_attempts'
+*/
+CREATE TABLE phpbb_login_attempts (
+ attempt_ip varchar2(40) DEFAULT '' ,
+ attempt_browser varchar2(150) DEFAULT '' ,
+ attempt_forwarded_for varchar2(255) DEFAULT '' ,
+ attempt_time number(11) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ username varchar2(765) DEFAULT '0' NOT NULL,
+ username_clean varchar2(255) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time)
+/
+CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time)
+/
+CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time)
+/
+CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id)
+/
+
+/*
+ Table: 'phpbb_moderator_cache'
+*/
+CREATE TABLE phpbb_moderator_cache (
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ username varchar2(765) DEFAULT '' ,
+ group_id number(8) DEFAULT '0' NOT NULL,
+ group_name varchar2(765) DEFAULT '' ,
+ display_on_index number(1) DEFAULT '1' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index)
+/
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id)
+/
+
+/*
+ Table: 'phpbb_modules'
+*/
+CREATE TABLE phpbb_modules (
+ module_id number(8) NOT NULL,
+ module_enabled number(1) DEFAULT '1' NOT NULL,
+ module_display number(1) DEFAULT '1' NOT NULL,
+ module_basename varchar2(255) DEFAULT '' ,
+ module_class varchar2(10) DEFAULT '' ,
+ parent_id number(8) DEFAULT '0' NOT NULL,
+ left_id number(8) DEFAULT '0' NOT NULL,
+ right_id number(8) DEFAULT '0' NOT NULL,
+ module_langname varchar2(255) DEFAULT '' ,
+ module_mode varchar2(255) DEFAULT '' ,
+ module_auth varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id)
+)
+/
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id)
+/
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled)
+/
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id)
+/
+
+CREATE SEQUENCE phpbb_modules_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_modules
+BEFORE INSERT ON phpbb_modules
+FOR EACH ROW WHEN (
+ new.module_id IS NULL OR new.module_id = 0
+)
+BEGIN
+ SELECT phpbb_modules_seq.nextval
+ INTO :new.module_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_poll_options'
+*/
+CREATE TABLE phpbb_poll_options (
+ poll_option_id number(4) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ poll_option_text clob DEFAULT '' ,
+ poll_option_total number(8) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id)
+/
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id)
+/
+
+/*
+ Table: 'phpbb_poll_votes'
+*/
+CREATE TABLE phpbb_poll_votes (
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ poll_option_id number(4) DEFAULT '0' NOT NULL,
+ vote_user_id number(8) DEFAULT '0' NOT NULL,
+ vote_user_ip varchar2(40) DEFAULT ''
+)
+/
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id)
+/
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id)
+/
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip)
+/
+
+/*
+ Table: 'phpbb_posts'
+*/
+CREATE TABLE phpbb_posts (
+ post_id number(8) NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ poster_id number(8) DEFAULT '0' NOT NULL,
+ icon_id number(8) DEFAULT '0' NOT NULL,
+ poster_ip varchar2(40) DEFAULT '' ,
+ post_time number(11) DEFAULT '0' NOT NULL,
+ post_approved number(1) DEFAULT '1' NOT NULL,
+ post_reported number(1) DEFAULT '0' NOT NULL,
+ enable_bbcode number(1) DEFAULT '1' NOT NULL,
+ enable_smilies number(1) DEFAULT '1' NOT NULL,
+ enable_magic_url number(1) DEFAULT '1' NOT NULL,
+ enable_sig number(1) DEFAULT '1' NOT NULL,
+ post_username varchar2(765) DEFAULT '' ,
+ post_subject varchar2(765) DEFAULT '' ,
+ post_text clob DEFAULT '' ,
+ post_checksum varchar2(32) DEFAULT '' ,
+ post_attachment number(1) DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar2(255) DEFAULT '' ,
+ bbcode_uid varchar2(8) DEFAULT '' ,
+ post_postcount number(1) DEFAULT '1' NOT NULL,
+ post_edit_time number(11) DEFAULT '0' NOT NULL,
+ post_edit_reason varchar2(765) DEFAULT '' ,
+ post_edit_user number(8) DEFAULT '0' NOT NULL,
+ post_edit_count number(4) DEFAULT '0' NOT NULL,
+ post_edit_locked number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
+)
+/
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id)
+/
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id)
+/
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip)
+/
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id)
+/
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved)
+/
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username)
+/
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time)
+/
+
+CREATE SEQUENCE phpbb_posts_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_posts
+BEFORE INSERT ON phpbb_posts
+FOR EACH ROW WHEN (
+ new.post_id IS NULL OR new.post_id = 0
+)
+BEGIN
+ SELECT phpbb_posts_seq.nextval
+ INTO :new.post_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs'
+*/
+CREATE TABLE phpbb_privmsgs (
+ msg_id number(8) NOT NULL,
+ root_level number(8) DEFAULT '0' NOT NULL,
+ author_id number(8) DEFAULT '0' NOT NULL,
+ icon_id number(8) DEFAULT '0' NOT NULL,
+ author_ip varchar2(40) DEFAULT '' ,
+ message_time number(11) DEFAULT '0' NOT NULL,
+ enable_bbcode number(1) DEFAULT '1' NOT NULL,
+ enable_smilies number(1) DEFAULT '1' NOT NULL,
+ enable_magic_url number(1) DEFAULT '1' NOT NULL,
+ enable_sig number(1) DEFAULT '1' NOT NULL,
+ message_subject varchar2(765) DEFAULT '' ,
+ message_text clob DEFAULT '' ,
+ message_edit_reason varchar2(765) DEFAULT '' ,
+ message_edit_user number(8) DEFAULT '0' NOT NULL,
+ message_attachment number(1) DEFAULT '0' NOT NULL,
+ bbcode_bitfield varchar2(255) DEFAULT '' ,
+ bbcode_uid varchar2(8) DEFAULT '' ,
+ message_edit_time number(11) DEFAULT '0' NOT NULL,
+ message_edit_count number(4) DEFAULT '0' NOT NULL,
+ to_address clob DEFAULT '' ,
+ bcc_address clob DEFAULT '' ,
+ message_reported number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_privmsgs PRIMARY KEY (msg_id)
+)
+/
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip)
+/
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time)
+/
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id)
+/
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level)
+/
+
+CREATE SEQUENCE phpbb_privmsgs_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_privmsgs
+BEFORE INSERT ON phpbb_privmsgs
+FOR EACH ROW WHEN (
+ new.msg_id IS NULL OR new.msg_id = 0
+)
+BEGIN
+ SELECT phpbb_privmsgs_seq.nextval
+ INTO :new.msg_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs_folder'
+*/
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ folder_name varchar2(765) DEFAULT '' ,
+ pm_count number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id)
+)
+/
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id)
+/
+
+CREATE SEQUENCE phpbb_privmsgs_folder_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_folder
+BEFORE INSERT ON phpbb_privmsgs_folder
+FOR EACH ROW WHEN (
+ new.folder_id IS NULL OR new.folder_id = 0
+)
+BEGIN
+ SELECT phpbb_privmsgs_folder_seq.nextval
+ INTO :new.folder_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs_rules'
+*/
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ rule_check number(8) DEFAULT '0' NOT NULL,
+ rule_connection number(8) DEFAULT '0' NOT NULL,
+ rule_string varchar2(765) DEFAULT '' ,
+ rule_user_id number(8) DEFAULT '0' NOT NULL,
+ rule_group_id number(8) DEFAULT '0' NOT NULL,
+ rule_action number(8) DEFAULT '0' NOT NULL,
+ rule_folder_id number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_privmsgs_rules PRIMARY KEY (rule_id)
+)
+/
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id)
+/
+
+CREATE SEQUENCE phpbb_privmsgs_rules_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_privmsgs_rules
+BEFORE INSERT ON phpbb_privmsgs_rules
+FOR EACH ROW WHEN (
+ new.rule_id IS NULL OR new.rule_id = 0
+)
+BEGIN
+ SELECT phpbb_privmsgs_rules_seq.nextval
+ INTO :new.rule_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_privmsgs_to'
+*/
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ author_id number(8) DEFAULT '0' NOT NULL,
+ pm_deleted number(1) DEFAULT '0' NOT NULL,
+ pm_new number(1) DEFAULT '1' NOT NULL,
+ pm_unread number(1) DEFAULT '1' NOT NULL,
+ pm_replied number(1) DEFAULT '0' NOT NULL,
+ pm_marked number(1) DEFAULT '0' NOT NULL,
+ pm_forwarded number(1) DEFAULT '0' NOT NULL,
+ folder_id number(11) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id)
+/
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id)
+/
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id)
+/
+
+/*
+ Table: 'phpbb_profile_fields'
+*/
+CREATE TABLE phpbb_profile_fields (
+ field_id number(8) NOT NULL,
+ field_name varchar2(765) DEFAULT '' ,
+ field_type number(4) DEFAULT '0' NOT NULL,
+ field_ident varchar2(20) DEFAULT '' ,
+ field_length varchar2(20) DEFAULT '' ,
+ field_minlen varchar2(255) DEFAULT '' ,
+ field_maxlen varchar2(255) DEFAULT '' ,
+ field_novalue varchar2(765) DEFAULT '' ,
+ field_default_value varchar2(765) DEFAULT '' ,
+ field_validation varchar2(60) DEFAULT '' ,
+ field_required number(1) DEFAULT '0' NOT NULL,
+ field_show_novalue number(1) DEFAULT '0' NOT NULL,
+ field_show_on_reg number(1) DEFAULT '0' NOT NULL,
+ field_show_on_pm number(1) DEFAULT '0' NOT NULL,
+ field_show_on_vt number(1) DEFAULT '0' NOT NULL,
+ field_show_profile number(1) DEFAULT '0' NOT NULL,
+ field_hide number(1) DEFAULT '0' NOT NULL,
+ field_no_view number(1) DEFAULT '0' NOT NULL,
+ field_active number(1) DEFAULT '0' NOT NULL,
+ field_order number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_profile_fields PRIMARY KEY (field_id)
+)
+/
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type)
+/
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order)
+/
+
+CREATE SEQUENCE phpbb_profile_fields_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_profile_fields
+BEFORE INSERT ON phpbb_profile_fields
+FOR EACH ROW WHEN (
+ new.field_id IS NULL OR new.field_id = 0
+)
+BEGIN
+ SELECT phpbb_profile_fields_seq.nextval
+ INTO :new.field_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_profile_fields_data'
+*/
+CREATE TABLE phpbb_profile_fields_data (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_profile_fields_lang'
+*/
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id number(8) DEFAULT '0' NOT NULL,
+ lang_id number(8) DEFAULT '0' NOT NULL,
+ option_id number(8) DEFAULT '0' NOT NULL,
+ field_type number(4) DEFAULT '0' NOT NULL,
+ lang_value varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_profile_lang'
+*/
+CREATE TABLE phpbb_profile_lang (
+ field_id number(8) DEFAULT '0' NOT NULL,
+ lang_id number(8) DEFAULT '0' NOT NULL,
+ lang_name varchar2(765) DEFAULT '' ,
+ lang_explain clob DEFAULT '' ,
+ lang_default_value varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_ranks'
+*/
+CREATE TABLE phpbb_ranks (
+ rank_id number(8) NOT NULL,
+ rank_title varchar2(765) DEFAULT '' ,
+ rank_min number(8) DEFAULT '0' NOT NULL,
+ rank_special number(1) DEFAULT '0' NOT NULL,
+ rank_image varchar2(255) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_ranks PRIMARY KEY (rank_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_ranks_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_ranks
+BEFORE INSERT ON phpbb_ranks
+FOR EACH ROW WHEN (
+ new.rank_id IS NULL OR new.rank_id = 0
+)
+BEGIN
+ SELECT phpbb_ranks_seq.nextval
+ INTO :new.rank_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_reports'
+*/
+CREATE TABLE phpbb_reports (
+ report_id number(8) NOT NULL,
+ reason_id number(4) DEFAULT '0' NOT NULL,
+ post_id number(8) DEFAULT '0' NOT NULL,
+ pm_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ user_notify number(1) DEFAULT '0' NOT NULL,
+ report_closed number(1) DEFAULT '0' NOT NULL,
+ report_time number(11) DEFAULT '0' NOT NULL,
+ report_text clob DEFAULT '' ,
+ reported_post_text clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
+)
+/
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id)
+/
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id)
+/
+
+CREATE SEQUENCE phpbb_reports_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_reports
+BEFORE INSERT ON phpbb_reports
+FOR EACH ROW WHEN (
+ new.report_id IS NULL OR new.report_id = 0
+)
+BEGIN
+ SELECT phpbb_reports_seq.nextval
+ INTO :new.report_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_reports_reasons'
+*/
+CREATE TABLE phpbb_reports_reasons (
+ reason_id number(4) NOT NULL,
+ reason_title varchar2(765) DEFAULT '' ,
+ reason_description clob DEFAULT '' ,
+ reason_order number(4) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_reports_reasons_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_reports_reasons
+BEFORE INSERT ON phpbb_reports_reasons
+FOR EACH ROW WHEN (
+ new.reason_id IS NULL OR new.reason_id = 0
+)
+BEGIN
+ SELECT phpbb_reports_reasons_seq.nextval
+ INTO :new.reason_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_search_results'
+*/
+CREATE TABLE phpbb_search_results (
+ search_key varchar2(32) DEFAULT '' ,
+ search_time number(11) DEFAULT '0' NOT NULL,
+ search_keywords clob DEFAULT '' ,
+ search_authors clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_search_results PRIMARY KEY (search_key)
+)
+/
+
+
+/*
+ Table: 'phpbb_search_wordlist'
+*/
+CREATE TABLE phpbb_search_wordlist (
+ word_id number(8) NOT NULL,
+ word_text varchar2(765) DEFAULT '' ,
+ word_common number(1) DEFAULT '0' NOT NULL,
+ word_count number(8) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id),
+ CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text)
+)
+/
+
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count)
+/
+
+CREATE SEQUENCE phpbb_search_wordlist_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_search_wordlist
+BEFORE INSERT ON phpbb_search_wordlist
+FOR EACH ROW WHEN (
+ new.word_id IS NULL OR new.word_id = 0
+)
+BEGIN
+ SELECT phpbb_search_wordlist_seq.nextval
+ INTO :new.word_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_search_wordmatch'
+*/
+CREATE TABLE phpbb_search_wordmatch (
+ post_id number(8) DEFAULT '0' NOT NULL,
+ word_id number(8) DEFAULT '0' NOT NULL,
+ title_match number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT u_phpbb_unq_mtch UNIQUE (word_id, post_id, title_match)
+)
+/
+
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id)
+/
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id)
+/
+
+/*
+ Table: 'phpbb_sessions'
+*/
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' ,
+ session_user_id number(8) DEFAULT '0' NOT NULL,
+ session_forum_id number(8) DEFAULT '0' NOT NULL,
+ session_last_visit number(11) DEFAULT '0' NOT NULL,
+ session_start number(11) DEFAULT '0' NOT NULL,
+ session_time number(11) DEFAULT '0' NOT NULL,
+ session_ip varchar2(40) DEFAULT '' ,
+ session_browser varchar2(150) DEFAULT '' ,
+ session_forwarded_for varchar2(255) DEFAULT '' ,
+ session_page varchar2(765) DEFAULT '' ,
+ session_viewonline number(1) DEFAULT '1' NOT NULL,
+ session_autologin number(1) DEFAULT '0' NOT NULL,
+ session_admin number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id)
+)
+/
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time)
+/
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id)
+/
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id)
+/
+
+/*
+ Table: 'phpbb_sessions_keys'
+*/
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' ,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ last_ip varchar2(40) DEFAULT '' ,
+ last_login number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id, user_id)
+)
+/
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login)
+/
+
+/*
+ Table: 'phpbb_sitelist'
+*/
+CREATE TABLE phpbb_sitelist (
+ site_id number(8) NOT NULL,
+ site_ip varchar2(40) DEFAULT '' ,
+ site_hostname varchar2(255) DEFAULT '' ,
+ ip_exclude number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_sitelist_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_sitelist
+BEFORE INSERT ON phpbb_sitelist
+FOR EACH ROW WHEN (
+ new.site_id IS NULL OR new.site_id = 0
+)
+BEGIN
+ SELECT phpbb_sitelist_seq.nextval
+ INTO :new.site_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_smilies'
+*/
+CREATE TABLE phpbb_smilies (
+ smiley_id number(8) NOT NULL,
+ code varchar2(150) DEFAULT '' ,
+ emotion varchar2(150) DEFAULT '' ,
+ smiley_url varchar2(50) DEFAULT '' ,
+ smiley_width number(4) DEFAULT '0' NOT NULL,
+ smiley_height number(4) DEFAULT '0' NOT NULL,
+ smiley_order number(8) DEFAULT '0' NOT NULL,
+ display_on_posting number(1) DEFAULT '1' NOT NULL,
+ CONSTRAINT pk_phpbb_smilies PRIMARY KEY (smiley_id)
+)
+/
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting)
+/
+
+CREATE SEQUENCE phpbb_smilies_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_smilies
+BEFORE INSERT ON phpbb_smilies
+FOR EACH ROW WHEN (
+ new.smiley_id IS NULL OR new.smiley_id = 0
+)
+BEGIN
+ SELECT phpbb_smilies_seq.nextval
+ INTO :new.smiley_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_styles'
+*/
+CREATE TABLE phpbb_styles (
+ style_id number(8) NOT NULL,
+ style_name varchar2(765) DEFAULT '' ,
+ style_copyright varchar2(765) DEFAULT '' ,
+ style_active number(1) DEFAULT '1' NOT NULL,
+ style_path varchar2(100) DEFAULT '' ,
+ bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL,
+ style_parent_id number(4) DEFAULT '0' NOT NULL,
+ style_parent_tree clob DEFAULT '' ,
+ CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id),
+ CONSTRAINT u_phpbb_style_name UNIQUE (style_name)
+)
+/
+
+
+CREATE SEQUENCE phpbb_styles_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_styles
+BEFORE INSERT ON phpbb_styles
+FOR EACH ROW WHEN (
+ new.style_id IS NULL OR new.style_id = 0
+)
+BEGIN
+ SELECT phpbb_styles_seq.nextval
+ INTO :new.style_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_topics'
+*/
+CREATE TABLE phpbb_topics (
+ topic_id number(8) NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ icon_id number(8) DEFAULT '0' NOT NULL,
+ topic_attachment number(1) DEFAULT '0' NOT NULL,
+ topic_approved number(1) DEFAULT '1' NOT NULL,
+ topic_reported number(1) DEFAULT '0' NOT NULL,
+ topic_title varchar2(765) DEFAULT '' ,
+ topic_poster number(8) DEFAULT '0' NOT NULL,
+ topic_time number(11) DEFAULT '0' NOT NULL,
+ topic_time_limit number(11) DEFAULT '0' NOT NULL,
+ topic_views number(8) DEFAULT '0' NOT NULL,
+ topic_replies number(8) DEFAULT '0' NOT NULL,
+ topic_replies_real number(8) DEFAULT '0' NOT NULL,
+ topic_status number(3) DEFAULT '0' NOT NULL,
+ topic_type number(3) DEFAULT '0' NOT NULL,
+ topic_first_post_id number(8) DEFAULT '0' NOT NULL,
+ topic_first_poster_name varchar2(765) DEFAULT '' ,
+ topic_first_poster_colour varchar2(6) DEFAULT '' ,
+ topic_last_post_id number(8) DEFAULT '0' NOT NULL,
+ topic_last_poster_id number(8) DEFAULT '0' NOT NULL,
+ topic_last_poster_name varchar2(765) DEFAULT '' ,
+ topic_last_poster_colour varchar2(6) DEFAULT '' ,
+ topic_last_post_subject varchar2(765) DEFAULT '' ,
+ topic_last_post_time number(11) DEFAULT '0' NOT NULL,
+ topic_last_view_time number(11) DEFAULT '0' NOT NULL,
+ topic_moved_id number(8) DEFAULT '0' NOT NULL,
+ topic_bumped number(1) DEFAULT '0' NOT NULL,
+ topic_bumper number(8) DEFAULT '0' NOT NULL,
+ poll_title varchar2(765) DEFAULT '' ,
+ poll_start number(11) DEFAULT '0' NOT NULL,
+ poll_length number(11) DEFAULT '0' NOT NULL,
+ poll_max_options number(4) DEFAULT '1' NOT NULL,
+ poll_last_vote number(11) DEFAULT '0' NOT NULL,
+ poll_vote_change number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
+)
+/
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id)
+/
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type)
+/
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time)
+/
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved)
+/
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id)
+/
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id)
+/
+
+CREATE SEQUENCE phpbb_topics_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_topics
+BEFORE INSERT ON phpbb_topics
+FOR EACH ROW WHEN (
+ new.topic_id IS NULL OR new.topic_id = 0
+)
+BEGIN
+ SELECT phpbb_topics_seq.nextval
+ INTO :new.topic_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_topics_track'
+*/
+CREATE TABLE phpbb_topics_track (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(8) DEFAULT '0' NOT NULL,
+ mark_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_topics_track PRIMARY KEY (user_id, topic_id)
+)
+/
+
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id)
+/
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
+/
+
+/*
+ Table: 'phpbb_topics_posted'
+*/
+CREATE TABLE phpbb_topics_posted (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ topic_posted number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_topics_posted PRIMARY KEY (user_id, topic_id)
+)
+/
+
+
+/*
+ Table: 'phpbb_topics_watch'
+*/
+CREATE TABLE phpbb_topics_watch (
+ topic_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ notify_status number(1) DEFAULT '0' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id)
+/
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id)
+/
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status)
+/
+
+/*
+ Table: 'phpbb_user_group'
+*/
+CREATE TABLE phpbb_user_group (
+ group_id number(8) DEFAULT '0' NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ group_leader number(1) DEFAULT '0' NOT NULL,
+ user_pending number(1) DEFAULT '1' NOT NULL
+)
+/
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id)
+/
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id)
+/
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader)
+/
+
+/*
+ Table: 'phpbb_users'
+*/
+CREATE TABLE phpbb_users (
+ user_id number(8) NOT NULL,
+ user_type number(2) DEFAULT '0' NOT NULL,
+ group_id number(8) DEFAULT '3' NOT NULL,
+ user_permissions clob DEFAULT '' ,
+ user_perm_from number(8) DEFAULT '0' NOT NULL,
+ user_ip varchar2(40) DEFAULT '' ,
+ user_regdate number(11) DEFAULT '0' NOT NULL,
+ username varchar2(255) DEFAULT '' ,
+ username_clean varchar2(255) DEFAULT '' ,
+ user_password varchar2(120) DEFAULT '' ,
+ user_passchg number(11) DEFAULT '0' NOT NULL,
+ user_pass_convert number(1) DEFAULT '0' NOT NULL,
+ user_email varchar2(300) DEFAULT '' ,
+ user_email_hash number(20) DEFAULT '0' NOT NULL,
+ user_birthday varchar2(10) DEFAULT '' ,
+ user_lastvisit number(11) DEFAULT '0' NOT NULL,
+ user_lastmark number(11) DEFAULT '0' NOT NULL,
+ user_lastpost_time number(11) DEFAULT '0' NOT NULL,
+ user_lastpage varchar2(600) DEFAULT '' ,
+ user_last_confirm_key varchar2(10) DEFAULT '' ,
+ user_last_search number(11) DEFAULT '0' NOT NULL,
+ user_warnings number(4) DEFAULT '0' NOT NULL,
+ user_last_warning number(11) DEFAULT '0' NOT NULL,
+ user_login_attempts number(4) DEFAULT '0' NOT NULL,
+ user_inactive_reason number(2) DEFAULT '0' NOT NULL,
+ user_inactive_time number(11) DEFAULT '0' NOT NULL,
+ user_posts number(8) DEFAULT '0' NOT NULL,
+ user_lang varchar2(30) DEFAULT '' ,
+ user_timezone varchar2(100) DEFAULT 'UTC' NOT NULL,
+ user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style number(8) DEFAULT '0' NOT NULL,
+ user_rank number(8) DEFAULT '0' NOT NULL,
+ user_colour varchar2(6) DEFAULT '' ,
+ user_new_privmsg number(4) DEFAULT '0' NOT NULL,
+ user_unread_privmsg number(4) DEFAULT '0' NOT NULL,
+ user_last_privmsg number(11) DEFAULT '0' NOT NULL,
+ user_message_rules number(1) DEFAULT '0' NOT NULL,
+ user_full_folder number(11) DEFAULT '-3' NOT NULL,
+ user_emailtime number(11) DEFAULT '0' NOT NULL,
+ user_topic_show_days number(4) DEFAULT '0' NOT NULL,
+ user_topic_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar2(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days number(4) DEFAULT '0' NOT NULL,
+ user_post_sortby_type varchar2(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar2(1) DEFAULT 'a' NOT NULL,
+ user_notify number(1) DEFAULT '0' NOT NULL,
+ user_notify_pm number(1) DEFAULT '1' NOT NULL,
+ user_notify_type number(4) DEFAULT '0' NOT NULL,
+ user_allow_pm number(1) DEFAULT '1' NOT NULL,
+ user_allow_viewonline number(1) DEFAULT '1' NOT NULL,
+ user_allow_viewemail number(1) DEFAULT '1' NOT NULL,
+ user_allow_massemail number(1) DEFAULT '1' NOT NULL,
+ user_options number(11) DEFAULT '230271' NOT NULL,
+ user_avatar varchar2(255) DEFAULT '' ,
+ user_avatar_type number(2) DEFAULT '0' NOT NULL,
+ user_avatar_width number(4) DEFAULT '0' NOT NULL,
+ user_avatar_height number(4) DEFAULT '0' NOT NULL,
+ user_sig clob DEFAULT '' ,
+ user_sig_bbcode_uid varchar2(8) DEFAULT '' ,
+ user_sig_bbcode_bitfield varchar2(255) DEFAULT '' ,
+ user_from varchar2(300) DEFAULT '' ,
+ user_icq varchar2(15) DEFAULT '' ,
+ user_aim varchar2(765) DEFAULT '' ,
+ user_yim varchar2(765) DEFAULT '' ,
+ user_msnm varchar2(765) DEFAULT '' ,
+ user_jabber varchar2(765) DEFAULT '' ,
+ user_website varchar2(600) DEFAULT '' ,
+ user_occ clob DEFAULT '' ,
+ user_interests clob DEFAULT '' ,
+ user_actkey varchar2(32) DEFAULT '' ,
+ user_newpasswd varchar2(120) DEFAULT '' ,
+ user_form_salt varchar2(96) DEFAULT '' ,
+ user_new number(1) DEFAULT '1' NOT NULL,
+ user_reminded number(4) DEFAULT '0' NOT NULL,
+ user_reminded_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_users PRIMARY KEY (user_id),
+ CONSTRAINT u_phpbb_username_clean UNIQUE (username_clean)
+)
+/
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday)
+/
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash)
+/
+CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type)
+/
+
+CREATE SEQUENCE phpbb_users_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_users
+BEFORE INSERT ON phpbb_users
+FOR EACH ROW WHEN (
+ new.user_id IS NULL OR new.user_id = 0
+)
+BEGIN
+ SELECT phpbb_users_seq.nextval
+ INTO :new.user_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_warnings'
+*/
+CREATE TABLE phpbb_warnings (
+ warning_id number(8) NOT NULL,
+ user_id number(8) DEFAULT '0' NOT NULL,
+ post_id number(8) DEFAULT '0' NOT NULL,
+ log_id number(8) DEFAULT '0' NOT NULL,
+ warning_time number(11) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_warnings PRIMARY KEY (warning_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_warnings_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_warnings
+BEFORE INSERT ON phpbb_warnings
+FOR EACH ROW WHEN (
+ new.warning_id IS NULL OR new.warning_id = 0
+)
+BEGIN
+ SELECT phpbb_warnings_seq.nextval
+ INTO :new.warning_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_words'
+*/
+CREATE TABLE phpbb_words (
+ word_id number(8) NOT NULL,
+ word varchar2(765) DEFAULT '' ,
+ replacement varchar2(765) DEFAULT '' ,
+ CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id)
+)
+/
+
+
+CREATE SEQUENCE phpbb_words_seq
+/
+
+CREATE OR REPLACE TRIGGER t_phpbb_words
+BEFORE INSERT ON phpbb_words
+FOR EACH ROW WHEN (
+ new.word_id IS NULL OR new.word_id = 0
+)
+BEGIN
+ SELECT phpbb_words_seq.nextval
+ INTO :new.word_id
+ FROM dual;
+END;
+/
+
+
+/*
+ Table: 'phpbb_zebra'
+*/
+CREATE TABLE phpbb_zebra (
+ user_id number(8) DEFAULT '0' NOT NULL,
+ zebra_id number(8) DEFAULT '0' NOT NULL,
+ friend number(1) DEFAULT '0' NOT NULL,
+ foe number(1) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_zebra PRIMARY KEY (user_id, zebra_id)
+)
+/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 659a32bf19..e1678c9cc5 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1,1240 +1,1236 @@ -/* - * DO NOT EDIT THIS FILE, IT IS GENERATED - * - * To change the contents of this file, edit - * phpBB/develop/create_schema_files.php and - * run it. - */ - -BEGIN; - -/* - Domain definition -*/ -CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying; - -/* - Operation Functions -*/ -CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT; -CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT; -CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT; -CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT; -CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT; -CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT; - -/* - Operators -*/ -CREATE OPERATOR <( - PROCEDURE = _varchar_ci_less_than, - LEFTARG = varchar_ci, - RIGHTARG = varchar_ci, - COMMUTATOR = >, - NEGATOR = >=, - RESTRICT = scalarltsel, - JOIN = scalarltjoinsel); - -CREATE OPERATOR <=( - PROCEDURE = _varchar_ci_less_equal, - LEFTARG = varchar_ci, - RIGHTARG = varchar_ci, - COMMUTATOR = >=, - NEGATOR = >, - RESTRICT = scalarltsel, - JOIN = scalarltjoinsel); - -CREATE OPERATOR >( - PROCEDURE = _varchar_ci_greater_than, - LEFTARG = varchar_ci, - RIGHTARG = varchar_ci, - COMMUTATOR = <, - NEGATOR = <=, - RESTRICT = scalargtsel, - JOIN = scalargtjoinsel); - -CREATE OPERATOR >=( - PROCEDURE = _varchar_ci_greater_equals, - LEFTARG = varchar_ci, - RIGHTARG = varchar_ci, - COMMUTATOR = <=, - NEGATOR = <, - RESTRICT = scalargtsel, - JOIN = scalargtjoinsel); - -CREATE OPERATOR <>( - PROCEDURE = _varchar_ci_not_equal, - LEFTARG = varchar_ci, - RIGHTARG = varchar_ci, - COMMUTATOR = <>, - NEGATOR = =, - RESTRICT = neqsel, - JOIN = neqjoinsel); - -CREATE OPERATOR =( - PROCEDURE = _varchar_ci_equal, - LEFTARG = varchar_ci, - RIGHTARG = varchar_ci, - COMMUTATOR = =, - NEGATOR = <>, - RESTRICT = eqsel, - JOIN = eqjoinsel, - HASHES, - MERGES, - SORT1= <); - -/* - Table: 'phpbb_attachments' -*/ -CREATE SEQUENCE phpbb_attachments_seq; - -CREATE TABLE phpbb_attachments ( - attach_id INT4 DEFAULT nextval('phpbb_attachments_seq'), - post_msg_id INT4 DEFAULT '0' NOT NULL CHECK (post_msg_id >= 0), - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - in_message INT2 DEFAULT '0' NOT NULL CHECK (in_message >= 0), - poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0), - is_orphan INT2 DEFAULT '1' NOT NULL CHECK (is_orphan >= 0), - physical_filename varchar(255) DEFAULT '' NOT NULL, - real_filename varchar(255) DEFAULT '' NOT NULL, - download_count INT4 DEFAULT '0' NOT NULL CHECK (download_count >= 0), - attach_comment varchar(4000) DEFAULT '' NOT NULL, - extension varchar(100) DEFAULT '' NOT NULL, - mimetype varchar(100) DEFAULT '' NOT NULL, - filesize INT4 DEFAULT '0' NOT NULL CHECK (filesize >= 0), - filetime INT4 DEFAULT '0' NOT NULL CHECK (filetime >= 0), - thumbnail INT2 DEFAULT '0' NOT NULL CHECK (thumbnail >= 0), - PRIMARY KEY (attach_id) -); - -CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime); -CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id); -CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id); -CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id); -CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan); - -/* - Table: 'phpbb_acl_groups' -*/ -CREATE TABLE phpbb_acl_groups ( - group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0), - auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0), - auth_setting INT2 DEFAULT '0' NOT NULL -); - -CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id); -CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id); -CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id); - -/* - Table: 'phpbb_acl_options' -*/ -CREATE SEQUENCE phpbb_acl_options_seq; - -CREATE TABLE phpbb_acl_options ( - auth_option_id INT4 DEFAULT nextval('phpbb_acl_options_seq'), - auth_option varchar(50) DEFAULT '' NOT NULL, - is_global INT2 DEFAULT '0' NOT NULL CHECK (is_global >= 0), - is_local INT2 DEFAULT '0' NOT NULL CHECK (is_local >= 0), - founder_only INT2 DEFAULT '0' NOT NULL CHECK (founder_only >= 0), - PRIMARY KEY (auth_option_id) -); - -CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option); - -/* - Table: 'phpbb_acl_roles' -*/ -CREATE SEQUENCE phpbb_acl_roles_seq; - -CREATE TABLE phpbb_acl_roles ( - role_id INT4 DEFAULT nextval('phpbb_acl_roles_seq'), - role_name varchar(255) DEFAULT '' NOT NULL, - role_description varchar(4000) DEFAULT '' NOT NULL, - role_type varchar(10) DEFAULT '' NOT NULL, - role_order INT2 DEFAULT '0' NOT NULL CHECK (role_order >= 0), - PRIMARY KEY (role_id) -); - -CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type); -CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order); - -/* - Table: 'phpbb_acl_roles_data' -*/ -CREATE TABLE phpbb_acl_roles_data ( - role_id INT4 DEFAULT '0' NOT NULL CHECK (role_id >= 0), - auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0), - auth_setting INT2 DEFAULT '0' NOT NULL, - PRIMARY KEY (role_id, auth_option_id) -); - -CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id); - -/* - Table: 'phpbb_acl_users' -*/ -CREATE TABLE phpbb_acl_users ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0), - auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0), - auth_setting INT2 DEFAULT '0' NOT NULL -); - -CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); -CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); -CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); - -/* - Table: 'phpbb_banlist' -*/ -CREATE SEQUENCE phpbb_banlist_seq; - -CREATE TABLE phpbb_banlist ( - ban_id INT4 DEFAULT nextval('phpbb_banlist_seq'), - ban_userid INT4 DEFAULT '0' NOT NULL CHECK (ban_userid >= 0), - ban_ip varchar(40) DEFAULT '' NOT NULL, - ban_email varchar(100) DEFAULT '' NOT NULL, - ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0), - ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0), - ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0), - ban_reason varchar(255) DEFAULT '' NOT NULL, - ban_give_reason varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (ban_id) -); - -CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end); -CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude); -CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude); -CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude); - -/* - Table: 'phpbb_bbcodes' -*/ -CREATE TABLE phpbb_bbcodes ( - bbcode_id INT2 DEFAULT '0' NOT NULL CHECK (bbcode_id >= 0), - bbcode_tag varchar(16) DEFAULT '' NOT NULL, - bbcode_helpline varchar(255) DEFAULT '' NOT NULL, - display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0), - bbcode_match varchar(4000) DEFAULT '' NOT NULL, - bbcode_tpl TEXT DEFAULT '' NOT NULL, - first_pass_match TEXT DEFAULT '' NOT NULL, - first_pass_replace TEXT DEFAULT '' NOT NULL, - second_pass_match TEXT DEFAULT '' NOT NULL, - second_pass_replace TEXT DEFAULT '' NOT NULL, - PRIMARY KEY (bbcode_id) -); - -CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting); - -/* - Table: 'phpbb_bookmarks' -*/ -CREATE TABLE phpbb_bookmarks ( - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - PRIMARY KEY (topic_id, user_id) -); - - -/* - Table: 'phpbb_bots' -*/ -CREATE SEQUENCE phpbb_bots_seq; - -CREATE TABLE phpbb_bots ( - bot_id INT4 DEFAULT nextval('phpbb_bots_seq'), - bot_active INT2 DEFAULT '1' NOT NULL CHECK (bot_active >= 0), - bot_name varchar(255) DEFAULT '' NOT NULL, - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - bot_agent varchar(255) DEFAULT '' NOT NULL, - bot_ip varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (bot_id) -); - -CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active); - -/* - Table: 'phpbb_config' -*/ -CREATE TABLE phpbb_config ( - config_name varchar(255) DEFAULT '' NOT NULL, - config_value varchar(255) DEFAULT '' NOT NULL, - is_dynamic INT2 DEFAULT '0' NOT NULL CHECK (is_dynamic >= 0), - PRIMARY KEY (config_name) -); - -CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic); - -/* - Table: 'phpbb_confirm' -*/ -CREATE TABLE phpbb_confirm ( - confirm_id char(32) DEFAULT '' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, - confirm_type INT2 DEFAULT '0' NOT NULL, - code varchar(8) DEFAULT '' NOT NULL, - seed INT4 DEFAULT '0' NOT NULL CHECK (seed >= 0), - attempts INT4 DEFAULT '0' NOT NULL CHECK (attempts >= 0), - PRIMARY KEY (session_id, confirm_id) -); - -CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type); - -/* - Table: 'phpbb_disallow' -*/ -CREATE SEQUENCE phpbb_disallow_seq; - -CREATE TABLE phpbb_disallow ( - disallow_id INT4 DEFAULT nextval('phpbb_disallow_seq'), - disallow_username varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (disallow_id) -); - - -/* - Table: 'phpbb_drafts' -*/ -CREATE SEQUENCE phpbb_drafts_seq; - -CREATE TABLE phpbb_drafts ( - draft_id INT4 DEFAULT nextval('phpbb_drafts_seq'), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - save_time INT4 DEFAULT '0' NOT NULL CHECK (save_time >= 0), - draft_subject varchar(255) DEFAULT '' NOT NULL, - draft_message TEXT DEFAULT '' NOT NULL, - PRIMARY KEY (draft_id) -); - -CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time); - -/* - Table: 'phpbb_ext' -*/ -CREATE TABLE phpbb_ext ( - ext_name varchar(255) DEFAULT '' NOT NULL, - ext_active INT2 DEFAULT '0' NOT NULL CHECK (ext_active >= 0), - ext_state varchar(8000) DEFAULT '' NOT NULL -); - -CREATE UNIQUE INDEX phpbb_ext_ext_name ON phpbb_ext (ext_name); - -/* - Table: 'phpbb_extensions' -*/ -CREATE SEQUENCE phpbb_extensions_seq; - -CREATE TABLE phpbb_extensions ( - extension_id INT4 DEFAULT nextval('phpbb_extensions_seq'), - group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), - extension varchar(100) DEFAULT '' NOT NULL, - PRIMARY KEY (extension_id) -); - - -/* - Table: 'phpbb_extension_groups' -*/ -CREATE SEQUENCE phpbb_extension_groups_seq; - -CREATE TABLE phpbb_extension_groups ( - group_id INT4 DEFAULT nextval('phpbb_extension_groups_seq'), - group_name varchar(255) DEFAULT '' NOT NULL, - cat_id INT2 DEFAULT '0' NOT NULL, - allow_group INT2 DEFAULT '0' NOT NULL CHECK (allow_group >= 0), - download_mode INT2 DEFAULT '1' NOT NULL CHECK (download_mode >= 0), - upload_icon varchar(255) DEFAULT '' NOT NULL, - max_filesize INT4 DEFAULT '0' NOT NULL CHECK (max_filesize >= 0), - allowed_forums varchar(8000) DEFAULT '' NOT NULL, - allow_in_pm INT2 DEFAULT '0' NOT NULL CHECK (allow_in_pm >= 0), - PRIMARY KEY (group_id) -); - - -/* - Table: 'phpbb_forums' -*/ -CREATE SEQUENCE phpbb_forums_seq; - -CREATE TABLE phpbb_forums ( - forum_id INT4 DEFAULT nextval('phpbb_forums_seq'), - parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0), - left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0), - right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0), - forum_parents TEXT DEFAULT '' NOT NULL, - forum_name varchar(255) DEFAULT '' NOT NULL, - forum_desc varchar(4000) DEFAULT '' NOT NULL, - forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL, - forum_desc_options INT4 DEFAULT '7' NOT NULL CHECK (forum_desc_options >= 0), - forum_desc_uid varchar(8) DEFAULT '' NOT NULL, - forum_link varchar(255) DEFAULT '' NOT NULL, - forum_password varchar(40) DEFAULT '' NOT NULL, - forum_style INT4 DEFAULT '0' NOT NULL CHECK (forum_style >= 0), - forum_image varchar(255) DEFAULT '' NOT NULL, - forum_rules varchar(4000) DEFAULT '' NOT NULL, - forum_rules_link varchar(255) DEFAULT '' NOT NULL, - forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL, - forum_rules_options INT4 DEFAULT '7' NOT NULL CHECK (forum_rules_options >= 0), - forum_rules_uid varchar(8) DEFAULT '' NOT NULL, - forum_topics_per_page INT2 DEFAULT '0' NOT NULL, - forum_type INT2 DEFAULT '0' NOT NULL, - forum_status INT2 DEFAULT '0' NOT NULL, - forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0), - forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0), - forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0), - forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0), - forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0), - forum_last_post_subject varchar(255) DEFAULT '' NOT NULL, - forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0), - forum_last_poster_name varchar(255) DEFAULT '' NOT NULL, - forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL, - forum_flags INT2 DEFAULT '32' NOT NULL, - forum_options INT4 DEFAULT '0' NOT NULL CHECK (forum_options >= 0), - display_subforum_list INT2 DEFAULT '1' NOT NULL CHECK (display_subforum_list >= 0), - display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0), - enable_indexing INT2 DEFAULT '1' NOT NULL CHECK (enable_indexing >= 0), - enable_icons INT2 DEFAULT '1' NOT NULL CHECK (enable_icons >= 0), - enable_prune INT2 DEFAULT '0' NOT NULL CHECK (enable_prune >= 0), - prune_next INT4 DEFAULT '0' NOT NULL CHECK (prune_next >= 0), - prune_days INT4 DEFAULT '0' NOT NULL CHECK (prune_days >= 0), - prune_viewed INT4 DEFAULT '0' NOT NULL CHECK (prune_viewed >= 0), - prune_freq INT4 DEFAULT '0' NOT NULL CHECK (prune_freq >= 0), - PRIMARY KEY (forum_id) -); - -CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id); -CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id); - -/* - Table: 'phpbb_forums_access' -*/ -CREATE TABLE phpbb_forums_access ( - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - session_id char(32) DEFAULT '' NOT NULL, - PRIMARY KEY (forum_id, user_id, session_id) -); - - -/* - Table: 'phpbb_forums_track' -*/ -CREATE TABLE phpbb_forums_track ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0), - PRIMARY KEY (user_id, forum_id) -); - - -/* - Table: 'phpbb_forums_watch' -*/ -CREATE TABLE phpbb_forums_watch ( - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0) -); - -CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id); -CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id); -CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status); - -/* - Table: 'phpbb_groups' -*/ -CREATE SEQUENCE phpbb_groups_seq; - -CREATE TABLE phpbb_groups ( - group_id INT4 DEFAULT nextval('phpbb_groups_seq'), - group_type INT2 DEFAULT '1' NOT NULL, - group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0), - group_skip_auth INT2 DEFAULT '0' NOT NULL CHECK (group_skip_auth >= 0), - group_name varchar_ci DEFAULT '' NOT NULL, - group_desc varchar(4000) DEFAULT '' NOT NULL, - group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, - group_desc_options INT4 DEFAULT '7' NOT NULL CHECK (group_desc_options >= 0), - group_desc_uid varchar(8) DEFAULT '' NOT NULL, - group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0), - group_avatar varchar(255) DEFAULT '' NOT NULL, - group_avatar_type INT2 DEFAULT '0' NOT NULL, - group_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_width >= 0), - group_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_height >= 0), - group_rank INT4 DEFAULT '0' NOT NULL CHECK (group_rank >= 0), - group_colour varchar(6) DEFAULT '' NOT NULL, - group_sig_chars INT4 DEFAULT '0' NOT NULL CHECK (group_sig_chars >= 0), - group_receive_pm INT2 DEFAULT '0' NOT NULL CHECK (group_receive_pm >= 0), - group_message_limit INT4 DEFAULT '0' NOT NULL CHECK (group_message_limit >= 0), - group_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0), - group_legend INT4 DEFAULT '0' NOT NULL CHECK (group_legend >= 0), - group_teampage INT4 DEFAULT '0' NOT NULL CHECK (group_teampage >= 0), - PRIMARY KEY (group_id) -); - -CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name); - -/* - Table: 'phpbb_icons' -*/ -CREATE SEQUENCE phpbb_icons_seq; - -CREATE TABLE phpbb_icons ( - icons_id INT4 DEFAULT nextval('phpbb_icons_seq'), - icons_url varchar(255) DEFAULT '' NOT NULL, - icons_width INT2 DEFAULT '0' NOT NULL, - icons_height INT2 DEFAULT '0' NOT NULL, - icons_order INT4 DEFAULT '0' NOT NULL CHECK (icons_order >= 0), - display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0), - PRIMARY KEY (icons_id) -); - -CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting); - -/* - Table: 'phpbb_lang' -*/ -CREATE SEQUENCE phpbb_lang_seq; - -CREATE TABLE phpbb_lang ( - lang_id INT2 DEFAULT nextval('phpbb_lang_seq'), - lang_iso varchar(30) DEFAULT '' NOT NULL, - lang_dir varchar(30) DEFAULT '' NOT NULL, - lang_english_name varchar(100) DEFAULT '' NOT NULL, - lang_local_name varchar(255) DEFAULT '' NOT NULL, - lang_author varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (lang_id) -); - -CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso); - -/* - Table: 'phpbb_log' -*/ -CREATE SEQUENCE phpbb_log_seq; - -CREATE TABLE phpbb_log ( - log_id INT4 DEFAULT nextval('phpbb_log_seq'), - log_type INT2 DEFAULT '0' NOT NULL, - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - reportee_id INT4 DEFAULT '0' NOT NULL CHECK (reportee_id >= 0), - log_ip varchar(40) DEFAULT '' NOT NULL, - log_time INT4 DEFAULT '0' NOT NULL CHECK (log_time >= 0), - log_operation varchar(4000) DEFAULT '' NOT NULL, - log_data TEXT DEFAULT '' NOT NULL, - PRIMARY KEY (log_id) -); - -CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type); -CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time); -CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id); -CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id); -CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id); -CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id); - -/* - Table: 'phpbb_login_attempts' -*/ -CREATE TABLE phpbb_login_attempts ( - attempt_ip varchar(40) DEFAULT '' NOT NULL, - attempt_browser varchar(150) DEFAULT '' NOT NULL, - attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL, - attempt_time INT4 DEFAULT '0' NOT NULL CHECK (attempt_time >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - username varchar(255) DEFAULT '0' NOT NULL, - username_clean varchar_ci DEFAULT '0' NOT NULL -); - -CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time); -CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time); -CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time); -CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id); - -/* - Table: 'phpbb_moderator_cache' -*/ -CREATE TABLE phpbb_moderator_cache ( - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - username varchar(255) DEFAULT '' NOT NULL, - group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), - group_name varchar(255) DEFAULT '' NOT NULL, - display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0) -); - -CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index); -CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id); - -/* - Table: 'phpbb_modules' -*/ -CREATE SEQUENCE phpbb_modules_seq; - -CREATE TABLE phpbb_modules ( - module_id INT4 DEFAULT nextval('phpbb_modules_seq'), - module_enabled INT2 DEFAULT '1' NOT NULL CHECK (module_enabled >= 0), - module_display INT2 DEFAULT '1' NOT NULL CHECK (module_display >= 0), - module_basename varchar(255) DEFAULT '' NOT NULL, - module_class varchar(10) DEFAULT '' NOT NULL, - parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0), - left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0), - right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0), - module_langname varchar(255) DEFAULT '' NOT NULL, - module_mode varchar(255) DEFAULT '' NOT NULL, - module_auth varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (module_id) -); - -CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id); -CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled); -CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id); - -/* - Table: 'phpbb_poll_options' -*/ -CREATE TABLE phpbb_poll_options ( - poll_option_id INT2 DEFAULT '0' NOT NULL, - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - poll_option_text varchar(4000) DEFAULT '' NOT NULL, - poll_option_total INT4 DEFAULT '0' NOT NULL CHECK (poll_option_total >= 0) -); - -CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id); -CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id); - -/* - Table: 'phpbb_poll_votes' -*/ -CREATE TABLE phpbb_poll_votes ( - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - poll_option_id INT2 DEFAULT '0' NOT NULL, - vote_user_id INT4 DEFAULT '0' NOT NULL CHECK (vote_user_id >= 0), - vote_user_ip varchar(40) DEFAULT '' NOT NULL -); - -CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id); -CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id); -CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip); - -/* - Table: 'phpbb_posts' -*/ -CREATE SEQUENCE phpbb_posts_seq; - -CREATE TABLE phpbb_posts ( - post_id INT4 DEFAULT nextval('phpbb_posts_seq'), - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0), - icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0), - poster_ip varchar(40) DEFAULT '' NOT NULL, - post_time INT4 DEFAULT '0' NOT NULL CHECK (post_time >= 0), - post_approved INT2 DEFAULT '1' NOT NULL CHECK (post_approved >= 0), - post_reported INT2 DEFAULT '0' NOT NULL CHECK (post_reported >= 0), - enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0), - enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0), - enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0), - enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0), - post_username varchar(255) DEFAULT '' NOT NULL, - post_subject varchar(255) DEFAULT '' NOT NULL, - post_text TEXT DEFAULT '' NOT NULL, - post_checksum varchar(32) DEFAULT '' NOT NULL, - post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0), - bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(8) DEFAULT '' NOT NULL, - post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0), - post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0), - post_edit_reason varchar(255) DEFAULT '' NOT NULL, - post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0), - post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0), - post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0), - PRIMARY KEY (post_id) -); - -CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id); -CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id); -CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip); -CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id); -CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved); -CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username); -CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time); - -/* - Table: 'phpbb_privmsgs' -*/ -CREATE SEQUENCE phpbb_privmsgs_seq; - -CREATE TABLE phpbb_privmsgs ( - msg_id INT4 DEFAULT nextval('phpbb_privmsgs_seq'), - root_level INT4 DEFAULT '0' NOT NULL CHECK (root_level >= 0), - author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0), - icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0), - author_ip varchar(40) DEFAULT '' NOT NULL, - message_time INT4 DEFAULT '0' NOT NULL CHECK (message_time >= 0), - enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0), - enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0), - enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0), - enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0), - message_subject varchar(255) DEFAULT '' NOT NULL, - message_text TEXT DEFAULT '' NOT NULL, - message_edit_reason varchar(255) DEFAULT '' NOT NULL, - message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0), - message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0), - bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - bbcode_uid varchar(8) DEFAULT '' NOT NULL, - message_edit_time INT4 DEFAULT '0' NOT NULL CHECK (message_edit_time >= 0), - message_edit_count INT2 DEFAULT '0' NOT NULL CHECK (message_edit_count >= 0), - to_address varchar(4000) DEFAULT '' NOT NULL, - bcc_address varchar(4000) DEFAULT '' NOT NULL, - message_reported INT2 DEFAULT '0' NOT NULL CHECK (message_reported >= 0), - PRIMARY KEY (msg_id) -); - -CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip); -CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time); -CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id); -CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level); - -/* - Table: 'phpbb_privmsgs_folder' -*/ -CREATE SEQUENCE phpbb_privmsgs_folder_seq; - -CREATE TABLE phpbb_privmsgs_folder ( - folder_id INT4 DEFAULT nextval('phpbb_privmsgs_folder_seq'), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - folder_name varchar(255) DEFAULT '' NOT NULL, - pm_count INT4 DEFAULT '0' NOT NULL CHECK (pm_count >= 0), - PRIMARY KEY (folder_id) -); - -CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id); - -/* - Table: 'phpbb_privmsgs_rules' -*/ -CREATE SEQUENCE phpbb_privmsgs_rules_seq; - -CREATE TABLE phpbb_privmsgs_rules ( - rule_id INT4 DEFAULT nextval('phpbb_privmsgs_rules_seq'), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - rule_check INT4 DEFAULT '0' NOT NULL CHECK (rule_check >= 0), - rule_connection INT4 DEFAULT '0' NOT NULL CHECK (rule_connection >= 0), - rule_string varchar(255) DEFAULT '' NOT NULL, - rule_user_id INT4 DEFAULT '0' NOT NULL CHECK (rule_user_id >= 0), - rule_group_id INT4 DEFAULT '0' NOT NULL CHECK (rule_group_id >= 0), - rule_action INT4 DEFAULT '0' NOT NULL CHECK (rule_action >= 0), - rule_folder_id INT4 DEFAULT '0' NOT NULL, - PRIMARY KEY (rule_id) -); - -CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id); - -/* - Table: 'phpbb_privmsgs_to' -*/ -CREATE TABLE phpbb_privmsgs_to ( - msg_id INT4 DEFAULT '0' NOT NULL CHECK (msg_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0), - pm_deleted INT2 DEFAULT '0' NOT NULL CHECK (pm_deleted >= 0), - pm_new INT2 DEFAULT '1' NOT NULL CHECK (pm_new >= 0), - pm_unread INT2 DEFAULT '1' NOT NULL CHECK (pm_unread >= 0), - pm_replied INT2 DEFAULT '0' NOT NULL CHECK (pm_replied >= 0), - pm_marked INT2 DEFAULT '0' NOT NULL CHECK (pm_marked >= 0), - pm_forwarded INT2 DEFAULT '0' NOT NULL CHECK (pm_forwarded >= 0), - folder_id INT4 DEFAULT '0' NOT NULL -); - -CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id); -CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id); -CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id); - -/* - Table: 'phpbb_profile_fields' -*/ -CREATE SEQUENCE phpbb_profile_fields_seq; - -CREATE TABLE phpbb_profile_fields ( - field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'), - field_name varchar(255) DEFAULT '' NOT NULL, - field_type INT2 DEFAULT '0' NOT NULL, - field_ident varchar(20) DEFAULT '' NOT NULL, - field_length varchar(20) DEFAULT '' NOT NULL, - field_minlen varchar(255) DEFAULT '' NOT NULL, - field_maxlen varchar(255) DEFAULT '' NOT NULL, - field_novalue varchar(255) DEFAULT '' NOT NULL, - field_default_value varchar(255) DEFAULT '' NOT NULL, - field_validation varchar(20) DEFAULT '' NOT NULL, - field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0), - field_show_novalue INT2 DEFAULT '0' NOT NULL CHECK (field_show_novalue >= 0), - field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 0), - field_show_on_pm INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_pm >= 0), - field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0), - field_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0), - field_hide INT2 DEFAULT '0' NOT NULL CHECK (field_hide >= 0), - field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0), - field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0), - field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0), - PRIMARY KEY (field_id) -); - -CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type); -CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order); - -/* - Table: 'phpbb_profile_fields_data' -*/ -CREATE TABLE phpbb_profile_fields_data ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - PRIMARY KEY (user_id) -); - - -/* - Table: 'phpbb_profile_fields_lang' -*/ -CREATE TABLE phpbb_profile_fields_lang ( - field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0), - lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0), - option_id INT4 DEFAULT '0' NOT NULL CHECK (option_id >= 0), - field_type INT2 DEFAULT '0' NOT NULL, - lang_value varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (field_id, lang_id, option_id) -); - - -/* - Table: 'phpbb_profile_lang' -*/ -CREATE TABLE phpbb_profile_lang ( - field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0), - lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0), - lang_name varchar(255) DEFAULT '' NOT NULL, - lang_explain varchar(4000) DEFAULT '' NOT NULL, - lang_default_value varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (field_id, lang_id) -); - - -/* - Table: 'phpbb_ranks' -*/ -CREATE SEQUENCE phpbb_ranks_seq; - -CREATE TABLE phpbb_ranks ( - rank_id INT4 DEFAULT nextval('phpbb_ranks_seq'), - rank_title varchar(255) DEFAULT '' NOT NULL, - rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= 0), - rank_special INT2 DEFAULT '0' NOT NULL CHECK (rank_special >= 0), - rank_image varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (rank_id) -); - - -/* - Table: 'phpbb_reports' -*/ -CREATE SEQUENCE phpbb_reports_seq; - -CREATE TABLE phpbb_reports ( - report_id INT4 DEFAULT nextval('phpbb_reports_seq'), - reason_id INT2 DEFAULT '0' NOT NULL CHECK (reason_id >= 0), - post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0), - pm_id INT4 DEFAULT '0' NOT NULL CHECK (pm_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0), - report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0), - report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0), - report_text TEXT DEFAULT '' NOT NULL, - reported_post_text TEXT DEFAULT '' NOT NULL, - PRIMARY KEY (report_id) -); - -CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); -CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id); - -/* - Table: 'phpbb_reports_reasons' -*/ -CREATE SEQUENCE phpbb_reports_reasons_seq; - -CREATE TABLE phpbb_reports_reasons ( - reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'), - reason_title varchar(255) DEFAULT '' NOT NULL, - reason_description TEXT DEFAULT '' NOT NULL, - reason_order INT2 DEFAULT '0' NOT NULL CHECK (reason_order >= 0), - PRIMARY KEY (reason_id) -); - - -/* - Table: 'phpbb_search_results' -*/ -CREATE TABLE phpbb_search_results ( - search_key varchar(32) DEFAULT '' NOT NULL, - search_time INT4 DEFAULT '0' NOT NULL CHECK (search_time >= 0), - search_keywords TEXT DEFAULT '' NOT NULL, - search_authors TEXT DEFAULT '' NOT NULL, - PRIMARY KEY (search_key) -); - - -/* - Table: 'phpbb_search_wordlist' -*/ -CREATE SEQUENCE phpbb_search_wordlist_seq; - -CREATE TABLE phpbb_search_wordlist ( - word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'), - word_text varchar(255) DEFAULT '' NOT NULL, - word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0), - word_count INT4 DEFAULT '0' NOT NULL CHECK (word_count >= 0), - PRIMARY KEY (word_id) -); - -CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text); -CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count); - -/* - Table: 'phpbb_search_wordmatch' -*/ -CREATE TABLE phpbb_search_wordmatch ( - post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0), - word_id INT4 DEFAULT '0' NOT NULL CHECK (word_id >= 0), - title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0) -); - -CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match); -CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id); -CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); - -/* - Table: 'phpbb_sessions' -*/ -CREATE TABLE phpbb_sessions ( - session_id char(32) DEFAULT '' NOT NULL, - session_user_id INT4 DEFAULT '0' NOT NULL CHECK (session_user_id >= 0), - session_forum_id INT4 DEFAULT '0' NOT NULL CHECK (session_forum_id >= 0), - session_last_visit INT4 DEFAULT '0' NOT NULL CHECK (session_last_visit >= 0), - session_start INT4 DEFAULT '0' NOT NULL CHECK (session_start >= 0), - session_time INT4 DEFAULT '0' NOT NULL CHECK (session_time >= 0), - session_ip varchar(40) DEFAULT '' NOT NULL, - session_browser varchar(150) DEFAULT '' NOT NULL, - session_forwarded_for varchar(255) DEFAULT '' NOT NULL, - session_page varchar(255) DEFAULT '' NOT NULL, - session_viewonline INT2 DEFAULT '1' NOT NULL CHECK (session_viewonline >= 0), - session_autologin INT2 DEFAULT '0' NOT NULL CHECK (session_autologin >= 0), - session_admin INT2 DEFAULT '0' NOT NULL CHECK (session_admin >= 0), - PRIMARY KEY (session_id) -); - -CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time); -CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id); -CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id); - -/* - Table: 'phpbb_sessions_keys' -*/ -CREATE TABLE phpbb_sessions_keys ( - key_id char(32) DEFAULT '' NOT NULL, - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - last_ip varchar(40) DEFAULT '' NOT NULL, - last_login INT4 DEFAULT '0' NOT NULL CHECK (last_login >= 0), - PRIMARY KEY (key_id, user_id) -); - -CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login); - -/* - Table: 'phpbb_sitelist' -*/ -CREATE SEQUENCE phpbb_sitelist_seq; - -CREATE TABLE phpbb_sitelist ( - site_id INT4 DEFAULT nextval('phpbb_sitelist_seq'), - site_ip varchar(40) DEFAULT '' NOT NULL, - site_hostname varchar(255) DEFAULT '' NOT NULL, - ip_exclude INT2 DEFAULT '0' NOT NULL CHECK (ip_exclude >= 0), - PRIMARY KEY (site_id) -); - - -/* - Table: 'phpbb_smilies' -*/ -CREATE SEQUENCE phpbb_smilies_seq; - -CREATE TABLE phpbb_smilies ( - smiley_id INT4 DEFAULT nextval('phpbb_smilies_seq'), - code varchar(50) DEFAULT '' NOT NULL, - emotion varchar(50) DEFAULT '' NOT NULL, - smiley_url varchar(50) DEFAULT '' NOT NULL, - smiley_width INT2 DEFAULT '0' NOT NULL CHECK (smiley_width >= 0), - smiley_height INT2 DEFAULT '0' NOT NULL CHECK (smiley_height >= 0), - smiley_order INT4 DEFAULT '0' NOT NULL CHECK (smiley_order >= 0), - display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0), - PRIMARY KEY (smiley_id) -); - -CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting); - -/* - Table: 'phpbb_styles' -*/ -CREATE SEQUENCE phpbb_styles_seq; - -CREATE TABLE phpbb_styles ( - style_id INT4 DEFAULT nextval('phpbb_styles_seq'), - style_name varchar(255) DEFAULT '' NOT NULL, - style_copyright varchar(255) DEFAULT '' NOT NULL, - style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0), - style_path varchar(100) DEFAULT '' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, - style_parent_id INT4 DEFAULT '0' NOT NULL CHECK (style_parent_id >= 0), - style_parent_tree varchar(8000) DEFAULT '' NOT NULL, - PRIMARY KEY (style_id) -); - -CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); - -/* - Table: 'phpbb_topics' -*/ -CREATE SEQUENCE phpbb_topics_seq; - -CREATE TABLE phpbb_topics ( - topic_id INT4 DEFAULT nextval('phpbb_topics_seq'), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0), - topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0), - topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0), - topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0), - topic_title varchar(255) DEFAULT '' NOT NULL, - topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0), - topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0), - topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0), - topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0), - topic_replies INT4 DEFAULT '0' NOT NULL CHECK (topic_replies >= 0), - topic_replies_real INT4 DEFAULT '0' NOT NULL CHECK (topic_replies_real >= 0), - topic_status INT2 DEFAULT '0' NOT NULL, - topic_type INT2 DEFAULT '0' NOT NULL, - topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0), - topic_first_poster_name varchar(255) DEFAULT '' NOT NULL, - topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, - topic_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_id >= 0), - topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0), - topic_last_poster_name varchar(255) DEFAULT '' NOT NULL, - topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, - topic_last_post_subject varchar(255) DEFAULT '' NOT NULL, - topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0), - topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0), - topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0), - topic_bumped INT2 DEFAULT '0' NOT NULL CHECK (topic_bumped >= 0), - topic_bumper INT4 DEFAULT '0' NOT NULL CHECK (topic_bumper >= 0), - poll_title varchar(255) DEFAULT '' NOT NULL, - poll_start INT4 DEFAULT '0' NOT NULL CHECK (poll_start >= 0), - poll_length INT4 DEFAULT '0' NOT NULL CHECK (poll_length >= 0), - poll_max_options INT2 DEFAULT '1' NOT NULL, - poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0), - poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0), - PRIMARY KEY (topic_id) -); - -CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); -CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); -CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); -CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); -CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); -CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); - -/* - Table: 'phpbb_topics_track' -*/ -CREATE TABLE phpbb_topics_track ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0), - PRIMARY KEY (user_id, topic_id) -); - -CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id); -CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id); - -/* - Table: 'phpbb_topics_posted' -*/ -CREATE TABLE phpbb_topics_posted ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 0), - PRIMARY KEY (user_id, topic_id) -); - - -/* - Table: 'phpbb_topics_watch' -*/ -CREATE TABLE phpbb_topics_watch ( - topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0) -); - -CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id); -CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id); -CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status); - -/* - Table: 'phpbb_user_group' -*/ -CREATE TABLE phpbb_user_group ( - group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - group_leader INT2 DEFAULT '0' NOT NULL CHECK (group_leader >= 0), - user_pending INT2 DEFAULT '1' NOT NULL CHECK (user_pending >= 0) -); - -CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id); -CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id); -CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader); - -/* - Table: 'phpbb_users' -*/ -CREATE SEQUENCE phpbb_users_seq; - -CREATE TABLE phpbb_users ( - user_id INT4 DEFAULT nextval('phpbb_users_seq'), - user_type INT2 DEFAULT '0' NOT NULL, - group_id INT4 DEFAULT '3' NOT NULL CHECK (group_id >= 0), - user_permissions TEXT DEFAULT '' NOT NULL, - user_perm_from INT4 DEFAULT '0' NOT NULL CHECK (user_perm_from >= 0), - user_ip varchar(40) DEFAULT '' NOT NULL, - user_regdate INT4 DEFAULT '0' NOT NULL CHECK (user_regdate >= 0), - username varchar_ci DEFAULT '' NOT NULL, - username_clean varchar_ci DEFAULT '' NOT NULL, - user_password varchar(40) DEFAULT '' NOT NULL, - user_passchg INT4 DEFAULT '0' NOT NULL CHECK (user_passchg >= 0), - user_pass_convert INT2 DEFAULT '0' NOT NULL CHECK (user_pass_convert >= 0), - user_email varchar(100) DEFAULT '' NOT NULL, - user_email_hash INT8 DEFAULT '0' NOT NULL, - user_birthday varchar(10) DEFAULT '' NOT NULL, - user_lastvisit INT4 DEFAULT '0' NOT NULL CHECK (user_lastvisit >= 0), - user_lastmark INT4 DEFAULT '0' NOT NULL CHECK (user_lastmark >= 0), - user_lastpost_time INT4 DEFAULT '0' NOT NULL CHECK (user_lastpost_time >= 0), - user_lastpage varchar(200) DEFAULT '' NOT NULL, - user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, - user_last_search INT4 DEFAULT '0' NOT NULL CHECK (user_last_search >= 0), - user_warnings INT2 DEFAULT '0' NOT NULL, - user_last_warning INT4 DEFAULT '0' NOT NULL CHECK (user_last_warning >= 0), - user_login_attempts INT2 DEFAULT '0' NOT NULL, - user_inactive_reason INT2 DEFAULT '0' NOT NULL, - user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0), - user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0), - user_lang varchar(30) DEFAULT '' NOT NULL, - user_timezone varchar(100) DEFAULT 'UTC' NOT NULL, - user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, - user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0), - user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), - user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg INT4 DEFAULT '0' NOT NULL, - user_unread_privmsg INT4 DEFAULT '0' NOT NULL, - user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0), - user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0), - user_full_folder INT4 DEFAULT '-3' NOT NULL, - user_emailtime INT4 DEFAULT '0' NOT NULL CHECK (user_emailtime >= 0), - user_topic_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_topic_show_days >= 0), - user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, - user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, - user_post_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_post_show_days >= 0), - user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, - user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, - user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0), - user_notify_pm INT2 DEFAULT '1' NOT NULL CHECK (user_notify_pm >= 0), - user_notify_type INT2 DEFAULT '0' NOT NULL, - user_allow_pm INT2 DEFAULT '1' NOT NULL CHECK (user_allow_pm >= 0), - user_allow_viewonline INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewonline >= 0), - user_allow_viewemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewemail >= 0), - user_allow_massemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_massemail >= 0), - user_options INT4 DEFAULT '230271' NOT NULL CHECK (user_options >= 0), - user_avatar varchar(255) DEFAULT '' NOT NULL, - user_avatar_type INT2 DEFAULT '0' NOT NULL, - user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0), - user_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_height >= 0), - user_sig TEXT DEFAULT '' NOT NULL, - user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, - user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, - user_from varchar(100) DEFAULT '' NOT NULL, - user_icq varchar(15) DEFAULT '' NOT NULL, - user_aim varchar(255) DEFAULT '' NOT NULL, - user_yim varchar(255) DEFAULT '' NOT NULL, - user_msnm varchar(255) DEFAULT '' NOT NULL, - user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, - user_occ varchar(4000) DEFAULT '' NOT NULL, - user_interests varchar(4000) DEFAULT '' NOT NULL, - user_actkey varchar(32) DEFAULT '' NOT NULL, - user_newpasswd varchar(40) DEFAULT '' NOT NULL, - user_form_salt varchar(32) DEFAULT '' NOT NULL, - user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0), - user_reminded INT2 DEFAULT '0' NOT NULL, - user_reminded_time INT4 DEFAULT '0' NOT NULL CHECK (user_reminded_time >= 0), - PRIMARY KEY (user_id) -); - -CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); -CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash); -CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type); -CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); - -/* - Table: 'phpbb_warnings' -*/ -CREATE SEQUENCE phpbb_warnings_seq; - -CREATE TABLE phpbb_warnings ( - warning_id INT4 DEFAULT nextval('phpbb_warnings_seq'), - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0), - log_id INT4 DEFAULT '0' NOT NULL CHECK (log_id >= 0), - warning_time INT4 DEFAULT '0' NOT NULL CHECK (warning_time >= 0), - PRIMARY KEY (warning_id) -); - - -/* - Table: 'phpbb_words' -*/ -CREATE SEQUENCE phpbb_words_seq; - -CREATE TABLE phpbb_words ( - word_id INT4 DEFAULT nextval('phpbb_words_seq'), - word varchar(255) DEFAULT '' NOT NULL, - replacement varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (word_id) -); - - -/* - Table: 'phpbb_zebra' -*/ -CREATE TABLE phpbb_zebra ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - zebra_id INT4 DEFAULT '0' NOT NULL CHECK (zebra_id >= 0), - friend INT2 DEFAULT '0' NOT NULL CHECK (friend >= 0), - foe INT2 DEFAULT '0' NOT NULL CHECK (foe >= 0), - PRIMARY KEY (user_id, zebra_id) -); - - - -COMMIT;
\ No newline at end of file +/*
+ * DO NOT EDIT THIS FILE, IT IS GENERATED
+ *
+ * To change the contents of this file, edit
+ * phpBB/develop/create_schema_files.php and
+ * run it.
+ */
+
+BEGIN;
+
+/*
+ Domain definition
+*/
+CREATE DOMAIN varchar_ci AS varchar(255) NOT NULL DEFAULT ''::character varying;
+
+/*
+ Operation Functions
+*/
+CREATE FUNCTION _varchar_ci_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) = LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_not_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) != LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_less_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) < LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_less_equal(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) <= LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_greater_than(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) > LOWER($2)' LANGUAGE SQL STRICT;
+CREATE FUNCTION _varchar_ci_greater_equals(varchar_ci, varchar_ci) RETURNS boolean AS 'SELECT LOWER($1) >= LOWER($2)' LANGUAGE SQL STRICT;
+
+/*
+ Operators
+*/
+CREATE OPERATOR <(
+ PROCEDURE = _varchar_ci_less_than,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = >,
+ NEGATOR = >=,
+ RESTRICT = scalarltsel,
+ JOIN = scalarltjoinsel);
+
+CREATE OPERATOR <=(
+ PROCEDURE = _varchar_ci_less_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = >=,
+ NEGATOR = >,
+ RESTRICT = scalarltsel,
+ JOIN = scalarltjoinsel);
+
+CREATE OPERATOR >(
+ PROCEDURE = _varchar_ci_greater_than,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <,
+ NEGATOR = <=,
+ RESTRICT = scalargtsel,
+ JOIN = scalargtjoinsel);
+
+CREATE OPERATOR >=(
+ PROCEDURE = _varchar_ci_greater_equals,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <=,
+ NEGATOR = <,
+ RESTRICT = scalargtsel,
+ JOIN = scalargtjoinsel);
+
+CREATE OPERATOR <>(
+ PROCEDURE = _varchar_ci_not_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = <>,
+ NEGATOR = =,
+ RESTRICT = neqsel,
+ JOIN = neqjoinsel);
+
+CREATE OPERATOR =(
+ PROCEDURE = _varchar_ci_equal,
+ LEFTARG = varchar_ci,
+ RIGHTARG = varchar_ci,
+ COMMUTATOR = =,
+ NEGATOR = <>,
+ RESTRICT = eqsel,
+ JOIN = eqjoinsel,
+ HASHES,
+ MERGES,
+ SORT1= <);
+
+/*
+ Table: 'phpbb_attachments'
+*/
+CREATE SEQUENCE phpbb_attachments_seq;
+
+CREATE TABLE phpbb_attachments (
+ attach_id INT4 DEFAULT nextval('phpbb_attachments_seq'),
+ post_msg_id INT4 DEFAULT '0' NOT NULL CHECK (post_msg_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ in_message INT2 DEFAULT '0' NOT NULL CHECK (in_message >= 0),
+ poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0),
+ is_orphan INT2 DEFAULT '1' NOT NULL CHECK (is_orphan >= 0),
+ physical_filename varchar(255) DEFAULT '' NOT NULL,
+ real_filename varchar(255) DEFAULT '' NOT NULL,
+ download_count INT4 DEFAULT '0' NOT NULL CHECK (download_count >= 0),
+ attach_comment varchar(4000) DEFAULT '' NOT NULL,
+ extension varchar(100) DEFAULT '' NOT NULL,
+ mimetype varchar(100) DEFAULT '' NOT NULL,
+ filesize INT4 DEFAULT '0' NOT NULL CHECK (filesize >= 0),
+ filetime INT4 DEFAULT '0' NOT NULL CHECK (filetime >= 0),
+ thumbnail INT2 DEFAULT '0' NOT NULL CHECK (thumbnail >= 0),
+ PRIMARY KEY (attach_id)
+);
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
+
+/*
+ Table: 'phpbb_acl_groups'
+*/
+CREATE TABLE phpbb_acl_groups (
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
+ auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0),
+ auth_setting INT2 DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
+
+/*
+ Table: 'phpbb_acl_options'
+*/
+CREATE SEQUENCE phpbb_acl_options_seq;
+
+CREATE TABLE phpbb_acl_options (
+ auth_option_id INT4 DEFAULT nextval('phpbb_acl_options_seq'),
+ auth_option varchar(50) DEFAULT '' NOT NULL,
+ is_global INT2 DEFAULT '0' NOT NULL CHECK (is_global >= 0),
+ is_local INT2 DEFAULT '0' NOT NULL CHECK (is_local >= 0),
+ founder_only INT2 DEFAULT '0' NOT NULL CHECK (founder_only >= 0),
+ PRIMARY KEY (auth_option_id)
+);
+
+CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
+
+/*
+ Table: 'phpbb_acl_roles'
+*/
+CREATE SEQUENCE phpbb_acl_roles_seq;
+
+CREATE TABLE phpbb_acl_roles (
+ role_id INT4 DEFAULT nextval('phpbb_acl_roles_seq'),
+ role_name varchar(255) DEFAULT '' NOT NULL,
+ role_description varchar(4000) DEFAULT '' NOT NULL,
+ role_type varchar(10) DEFAULT '' NOT NULL,
+ role_order INT2 DEFAULT '0' NOT NULL CHECK (role_order >= 0),
+ PRIMARY KEY (role_id)
+);
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
+
+/*
+ Table: 'phpbb_acl_roles_data'
+*/
+CREATE TABLE phpbb_acl_roles_data (
+ role_id INT4 DEFAULT '0' NOT NULL CHECK (role_id >= 0),
+ auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
+ auth_setting INT2 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (role_id, auth_option_id)
+);
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
+
+/*
+ Table: 'phpbb_acl_users'
+*/
+CREATE TABLE phpbb_acl_users (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ auth_option_id INT4 DEFAULT '0' NOT NULL CHECK (auth_option_id >= 0),
+ auth_role_id INT4 DEFAULT '0' NOT NULL CHECK (auth_role_id >= 0),
+ auth_setting INT2 DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
+
+/*
+ Table: 'phpbb_banlist'
+*/
+CREATE SEQUENCE phpbb_banlist_seq;
+
+CREATE TABLE phpbb_banlist (
+ ban_id INT4 DEFAULT nextval('phpbb_banlist_seq'),
+ ban_userid INT4 DEFAULT '0' NOT NULL CHECK (ban_userid >= 0),
+ ban_ip varchar(40) DEFAULT '' NOT NULL,
+ ban_email varchar(100) DEFAULT '' NOT NULL,
+ ban_start INT4 DEFAULT '0' NOT NULL CHECK (ban_start >= 0),
+ ban_end INT4 DEFAULT '0' NOT NULL CHECK (ban_end >= 0),
+ ban_exclude INT2 DEFAULT '0' NOT NULL CHECK (ban_exclude >= 0),
+ ban_reason varchar(255) DEFAULT '' NOT NULL,
+ ban_give_reason varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (ban_id)
+);
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
+
+/*
+ Table: 'phpbb_bbcodes'
+*/
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id INT2 DEFAULT '0' NOT NULL CHECK (bbcode_id >= 0),
+ bbcode_tag varchar(16) DEFAULT '' NOT NULL,
+ bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
+ display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0),
+ bbcode_match varchar(4000) DEFAULT '' NOT NULL,
+ bbcode_tpl TEXT DEFAULT '' NOT NULL,
+ first_pass_match TEXT DEFAULT '' NOT NULL,
+ first_pass_replace TEXT DEFAULT '' NOT NULL,
+ second_pass_match TEXT DEFAULT '' NOT NULL,
+ second_pass_replace TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (bbcode_id)
+);
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
+
+/*
+ Table: 'phpbb_bookmarks'
+*/
+CREATE TABLE phpbb_bookmarks (
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ PRIMARY KEY (topic_id, user_id)
+);
+
+
+/*
+ Table: 'phpbb_bots'
+*/
+CREATE SEQUENCE phpbb_bots_seq;
+
+CREATE TABLE phpbb_bots (
+ bot_id INT4 DEFAULT nextval('phpbb_bots_seq'),
+ bot_active INT2 DEFAULT '1' NOT NULL CHECK (bot_active >= 0),
+ bot_name varchar(255) DEFAULT '' NOT NULL,
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ bot_agent varchar(255) DEFAULT '' NOT NULL,
+ bot_ip varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (bot_id)
+);
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
+
+/*
+ Table: 'phpbb_config'
+*/
+CREATE TABLE phpbb_config (
+ config_name varchar(255) DEFAULT '' NOT NULL,
+ config_value varchar(255) DEFAULT '' NOT NULL,
+ is_dynamic INT2 DEFAULT '0' NOT NULL CHECK (is_dynamic >= 0),
+ PRIMARY KEY (config_name)
+);
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
+
+/*
+ Table: 'phpbb_confirm'
+*/
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
+ confirm_type INT2 DEFAULT '0' NOT NULL,
+ code varchar(8) DEFAULT '' NOT NULL,
+ seed INT4 DEFAULT '0' NOT NULL CHECK (seed >= 0),
+ attempts INT4 DEFAULT '0' NOT NULL CHECK (attempts >= 0),
+ PRIMARY KEY (session_id, confirm_id)
+);
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
+
+/*
+ Table: 'phpbb_disallow'
+*/
+CREATE SEQUENCE phpbb_disallow_seq;
+
+CREATE TABLE phpbb_disallow (
+ disallow_id INT4 DEFAULT nextval('phpbb_disallow_seq'),
+ disallow_username varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (disallow_id)
+);
+
+
+/*
+ Table: 'phpbb_drafts'
+*/
+CREATE SEQUENCE phpbb_drafts_seq;
+
+CREATE TABLE phpbb_drafts (
+ draft_id INT4 DEFAULT nextval('phpbb_drafts_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ save_time INT4 DEFAULT '0' NOT NULL CHECK (save_time >= 0),
+ draft_subject varchar(255) DEFAULT '' NOT NULL,
+ draft_message TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (draft_id)
+);
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
+
+/*
+ Table: 'phpbb_ext'
+*/
+CREATE TABLE phpbb_ext (
+ ext_name varchar(255) DEFAULT '' NOT NULL,
+ ext_active INT2 DEFAULT '0' NOT NULL CHECK (ext_active >= 0),
+ ext_state varchar(8000) DEFAULT '' NOT NULL
+);
+
+CREATE UNIQUE INDEX phpbb_ext_ext_name ON phpbb_ext (ext_name);
+
+/*
+ Table: 'phpbb_extensions'
+*/
+CREATE SEQUENCE phpbb_extensions_seq;
+
+CREATE TABLE phpbb_extensions (
+ extension_id INT4 DEFAULT nextval('phpbb_extensions_seq'),
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ extension varchar(100) DEFAULT '' NOT NULL,
+ PRIMARY KEY (extension_id)
+);
+
+
+/*
+ Table: 'phpbb_extension_groups'
+*/
+CREATE SEQUENCE phpbb_extension_groups_seq;
+
+CREATE TABLE phpbb_extension_groups (
+ group_id INT4 DEFAULT nextval('phpbb_extension_groups_seq'),
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ cat_id INT2 DEFAULT '0' NOT NULL,
+ allow_group INT2 DEFAULT '0' NOT NULL CHECK (allow_group >= 0),
+ download_mode INT2 DEFAULT '1' NOT NULL CHECK (download_mode >= 0),
+ upload_icon varchar(255) DEFAULT '' NOT NULL,
+ max_filesize INT4 DEFAULT '0' NOT NULL CHECK (max_filesize >= 0),
+ allowed_forums varchar(8000) DEFAULT '' NOT NULL,
+ allow_in_pm INT2 DEFAULT '0' NOT NULL CHECK (allow_in_pm >= 0),
+ PRIMARY KEY (group_id)
+);
+
+
+/*
+ Table: 'phpbb_forums'
+*/
+CREATE SEQUENCE phpbb_forums_seq;
+
+CREATE TABLE phpbb_forums (
+ forum_id INT4 DEFAULT nextval('phpbb_forums_seq'),
+ parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0),
+ left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0),
+ right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0),
+ forum_parents TEXT DEFAULT '' NOT NULL,
+ forum_name varchar(255) DEFAULT '' NOT NULL,
+ forum_desc varchar(4000) DEFAULT '' NOT NULL,
+ forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_desc_options INT4 DEFAULT '7' NOT NULL CHECK (forum_desc_options >= 0),
+ forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_link varchar(255) DEFAULT '' NOT NULL,
+ forum_password varchar(40) DEFAULT '' NOT NULL,
+ forum_style INT4 DEFAULT '0' NOT NULL CHECK (forum_style >= 0),
+ forum_image varchar(255) DEFAULT '' NOT NULL,
+ forum_rules varchar(4000) DEFAULT '' NOT NULL,
+ forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_options INT4 DEFAULT '7' NOT NULL CHECK (forum_rules_options >= 0),
+ forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
+ forum_topics_per_page INT2 DEFAULT '0' NOT NULL,
+ forum_type INT2 DEFAULT '0' NOT NULL,
+ forum_status INT2 DEFAULT '0' NOT NULL,
+ forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0),
+ forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0),
+ forum_topics_real INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_real >= 0),
+ forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0),
+ forum_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_poster_id >= 0),
+ forum_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ forum_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_time >= 0),
+ forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ forum_flags INT2 DEFAULT '32' NOT NULL,
+ forum_options INT4 DEFAULT '0' NOT NULL CHECK (forum_options >= 0),
+ display_subforum_list INT2 DEFAULT '1' NOT NULL CHECK (display_subforum_list >= 0),
+ display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0),
+ enable_indexing INT2 DEFAULT '1' NOT NULL CHECK (enable_indexing >= 0),
+ enable_icons INT2 DEFAULT '1' NOT NULL CHECK (enable_icons >= 0),
+ enable_prune INT2 DEFAULT '0' NOT NULL CHECK (enable_prune >= 0),
+ prune_next INT4 DEFAULT '0' NOT NULL CHECK (prune_next >= 0),
+ prune_days INT4 DEFAULT '0' NOT NULL CHECK (prune_days >= 0),
+ prune_viewed INT4 DEFAULT '0' NOT NULL CHECK (prune_viewed >= 0),
+ prune_freq INT4 DEFAULT '0' NOT NULL CHECK (prune_freq >= 0),
+ PRIMARY KEY (forum_id)
+);
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
+
+/*
+ Table: 'phpbb_forums_access'
+*/
+CREATE TABLE phpbb_forums_access (
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ session_id char(32) DEFAULT '' NOT NULL,
+ PRIMARY KEY (forum_id, user_id, session_id)
+);
+
+
+/*
+ Table: 'phpbb_forums_track'
+*/
+CREATE TABLE phpbb_forums_track (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0),
+ PRIMARY KEY (user_id, forum_id)
+);
+
+
+/*
+ Table: 'phpbb_forums_watch'
+*/
+CREATE TABLE phpbb_forums_watch (
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0)
+);
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
+
+/*
+ Table: 'phpbb_groups'
+*/
+CREATE SEQUENCE phpbb_groups_seq;
+
+CREATE TABLE phpbb_groups (
+ group_id INT4 DEFAULT nextval('phpbb_groups_seq'),
+ group_type INT2 DEFAULT '1' NOT NULL,
+ group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0),
+ group_skip_auth INT2 DEFAULT '0' NOT NULL CHECK (group_skip_auth >= 0),
+ group_name varchar_ci DEFAULT '' NOT NULL,
+ group_desc varchar(4000) DEFAULT '' NOT NULL,
+ group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
+ group_desc_options INT4 DEFAULT '7' NOT NULL CHECK (group_desc_options >= 0),
+ group_desc_uid varchar(8) DEFAULT '' NOT NULL,
+ group_display INT2 DEFAULT '0' NOT NULL CHECK (group_display >= 0),
+ group_avatar varchar(255) DEFAULT '' NOT NULL,
+ group_avatar_type INT2 DEFAULT '0' NOT NULL,
+ group_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_width >= 0),
+ group_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (group_avatar_height >= 0),
+ group_rank INT4 DEFAULT '0' NOT NULL CHECK (group_rank >= 0),
+ group_colour varchar(6) DEFAULT '' NOT NULL,
+ group_sig_chars INT4 DEFAULT '0' NOT NULL CHECK (group_sig_chars >= 0),
+ group_receive_pm INT2 DEFAULT '0' NOT NULL CHECK (group_receive_pm >= 0),
+ group_message_limit INT4 DEFAULT '0' NOT NULL CHECK (group_message_limit >= 0),
+ group_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0),
+ group_legend INT4 DEFAULT '0' NOT NULL CHECK (group_legend >= 0),
+ group_teampage INT4 DEFAULT '0' NOT NULL CHECK (group_teampage >= 0),
+ PRIMARY KEY (group_id)
+);
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name);
+
+/*
+ Table: 'phpbb_icons'
+*/
+CREATE SEQUENCE phpbb_icons_seq;
+
+CREATE TABLE phpbb_icons (
+ icons_id INT4 DEFAULT nextval('phpbb_icons_seq'),
+ icons_url varchar(255) DEFAULT '' NOT NULL,
+ icons_width INT2 DEFAULT '0' NOT NULL,
+ icons_height INT2 DEFAULT '0' NOT NULL,
+ icons_order INT4 DEFAULT '0' NOT NULL CHECK (icons_order >= 0),
+ display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0),
+ PRIMARY KEY (icons_id)
+);
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
+
+/*
+ Table: 'phpbb_lang'
+*/
+CREATE SEQUENCE phpbb_lang_seq;
+
+CREATE TABLE phpbb_lang (
+ lang_id INT2 DEFAULT nextval('phpbb_lang_seq'),
+ lang_iso varchar(30) DEFAULT '' NOT NULL,
+ lang_dir varchar(30) DEFAULT '' NOT NULL,
+ lang_english_name varchar(100) DEFAULT '' NOT NULL,
+ lang_local_name varchar(255) DEFAULT '' NOT NULL,
+ lang_author varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (lang_id)
+);
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
+
+/*
+ Table: 'phpbb_log'
+*/
+CREATE SEQUENCE phpbb_log_seq;
+
+CREATE TABLE phpbb_log (
+ log_id INT4 DEFAULT nextval('phpbb_log_seq'),
+ log_type INT2 DEFAULT '0' NOT NULL,
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ reportee_id INT4 DEFAULT '0' NOT NULL CHECK (reportee_id >= 0),
+ log_ip varchar(40) DEFAULT '' NOT NULL,
+ log_time INT4 DEFAULT '0' NOT NULL CHECK (log_time >= 0),
+ log_operation varchar(4000) DEFAULT '' NOT NULL,
+ log_data TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (log_id)
+);
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
+CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
+CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
+CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
+CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
+
+/*
+ Table: 'phpbb_login_attempts'
+*/
+CREATE TABLE phpbb_login_attempts (
+ attempt_ip varchar(40) DEFAULT '' NOT NULL,
+ attempt_browser varchar(150) DEFAULT '' NOT NULL,
+ attempt_forwarded_for varchar(255) DEFAULT '' NOT NULL,
+ attempt_time INT4 DEFAULT '0' NOT NULL CHECK (attempt_time >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ username varchar(255) DEFAULT '0' NOT NULL,
+ username_clean varchar_ci DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time);
+CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time);
+CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time);
+CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id);
+
+/*
+ Table: 'phpbb_moderator_cache'
+*/
+CREATE TABLE phpbb_moderator_cache (
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ username varchar(255) DEFAULT '' NOT NULL,
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ display_on_index INT2 DEFAULT '1' NOT NULL CHECK (display_on_index >= 0)
+);
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
+
+/*
+ Table: 'phpbb_modules'
+*/
+CREATE SEQUENCE phpbb_modules_seq;
+
+CREATE TABLE phpbb_modules (
+ module_id INT4 DEFAULT nextval('phpbb_modules_seq'),
+ module_enabled INT2 DEFAULT '1' NOT NULL CHECK (module_enabled >= 0),
+ module_display INT2 DEFAULT '1' NOT NULL CHECK (module_display >= 0),
+ module_basename varchar(255) DEFAULT '' NOT NULL,
+ module_class varchar(10) DEFAULT '' NOT NULL,
+ parent_id INT4 DEFAULT '0' NOT NULL CHECK (parent_id >= 0),
+ left_id INT4 DEFAULT '0' NOT NULL CHECK (left_id >= 0),
+ right_id INT4 DEFAULT '0' NOT NULL CHECK (right_id >= 0),
+ module_langname varchar(255) DEFAULT '' NOT NULL,
+ module_mode varchar(255) DEFAULT '' NOT NULL,
+ module_auth varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (module_id)
+);
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
+
+/*
+ Table: 'phpbb_poll_options'
+*/
+CREATE TABLE phpbb_poll_options (
+ poll_option_id INT2 DEFAULT '0' NOT NULL,
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ poll_option_text varchar(4000) DEFAULT '' NOT NULL,
+ poll_option_total INT4 DEFAULT '0' NOT NULL CHECK (poll_option_total >= 0)
+);
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
+
+/*
+ Table: 'phpbb_poll_votes'
+*/
+CREATE TABLE phpbb_poll_votes (
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ poll_option_id INT2 DEFAULT '0' NOT NULL,
+ vote_user_id INT4 DEFAULT '0' NOT NULL CHECK (vote_user_id >= 0),
+ vote_user_ip varchar(40) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
+
+/*
+ Table: 'phpbb_posts'
+*/
+CREATE SEQUENCE phpbb_posts_seq;
+
+CREATE TABLE phpbb_posts (
+ post_id INT4 DEFAULT nextval('phpbb_posts_seq'),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ poster_id INT4 DEFAULT '0' NOT NULL CHECK (poster_id >= 0),
+ icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
+ poster_ip varchar(40) DEFAULT '' NOT NULL,
+ post_time INT4 DEFAULT '0' NOT NULL CHECK (post_time >= 0),
+ post_approved INT2 DEFAULT '1' NOT NULL CHECK (post_approved >= 0),
+ post_reported INT2 DEFAULT '0' NOT NULL CHECK (post_reported >= 0),
+ enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
+ enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
+ enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
+ enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
+ post_username varchar(255) DEFAULT '' NOT NULL,
+ post_subject varchar(255) DEFAULT '' NOT NULL,
+ post_text TEXT DEFAULT '' NOT NULL,
+ post_checksum varchar(32) DEFAULT '' NOT NULL,
+ post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0),
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0),
+ post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0),
+ post_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0),
+ post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0),
+ post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0),
+ PRIMARY KEY (post_id)
+);
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
+
+/*
+ Table: 'phpbb_privmsgs'
+*/
+CREATE SEQUENCE phpbb_privmsgs_seq;
+
+CREATE TABLE phpbb_privmsgs (
+ msg_id INT4 DEFAULT nextval('phpbb_privmsgs_seq'),
+ root_level INT4 DEFAULT '0' NOT NULL CHECK (root_level >= 0),
+ author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0),
+ icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
+ author_ip varchar(40) DEFAULT '' NOT NULL,
+ message_time INT4 DEFAULT '0' NOT NULL CHECK (message_time >= 0),
+ enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (enable_bbcode >= 0),
+ enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (enable_smilies >= 0),
+ enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (enable_magic_url >= 0),
+ enable_sig INT2 DEFAULT '1' NOT NULL CHECK (enable_sig >= 0),
+ message_subject varchar(255) DEFAULT '' NOT NULL,
+ message_text TEXT DEFAULT '' NOT NULL,
+ message_edit_reason varchar(255) DEFAULT '' NOT NULL,
+ message_edit_user INT4 DEFAULT '0' NOT NULL CHECK (message_edit_user >= 0),
+ message_attachment INT2 DEFAULT '0' NOT NULL CHECK (message_attachment >= 0),
+ bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ message_edit_time INT4 DEFAULT '0' NOT NULL CHECK (message_edit_time >= 0),
+ message_edit_count INT2 DEFAULT '0' NOT NULL CHECK (message_edit_count >= 0),
+ to_address varchar(4000) DEFAULT '' NOT NULL,
+ bcc_address varchar(4000) DEFAULT '' NOT NULL,
+ message_reported INT2 DEFAULT '0' NOT NULL CHECK (message_reported >= 0),
+ PRIMARY KEY (msg_id)
+);
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
+
+/*
+ Table: 'phpbb_privmsgs_folder'
+*/
+CREATE SEQUENCE phpbb_privmsgs_folder_seq;
+
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id INT4 DEFAULT nextval('phpbb_privmsgs_folder_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ folder_name varchar(255) DEFAULT '' NOT NULL,
+ pm_count INT4 DEFAULT '0' NOT NULL CHECK (pm_count >= 0),
+ PRIMARY KEY (folder_id)
+);
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
+
+/*
+ Table: 'phpbb_privmsgs_rules'
+*/
+CREATE SEQUENCE phpbb_privmsgs_rules_seq;
+
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id INT4 DEFAULT nextval('phpbb_privmsgs_rules_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ rule_check INT4 DEFAULT '0' NOT NULL CHECK (rule_check >= 0),
+ rule_connection INT4 DEFAULT '0' NOT NULL CHECK (rule_connection >= 0),
+ rule_string varchar(255) DEFAULT '' NOT NULL,
+ rule_user_id INT4 DEFAULT '0' NOT NULL CHECK (rule_user_id >= 0),
+ rule_group_id INT4 DEFAULT '0' NOT NULL CHECK (rule_group_id >= 0),
+ rule_action INT4 DEFAULT '0' NOT NULL CHECK (rule_action >= 0),
+ rule_folder_id INT4 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id)
+);
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
+
+/*
+ Table: 'phpbb_privmsgs_to'
+*/
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id INT4 DEFAULT '0' NOT NULL CHECK (msg_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ author_id INT4 DEFAULT '0' NOT NULL CHECK (author_id >= 0),
+ pm_deleted INT2 DEFAULT '0' NOT NULL CHECK (pm_deleted >= 0),
+ pm_new INT2 DEFAULT '1' NOT NULL CHECK (pm_new >= 0),
+ pm_unread INT2 DEFAULT '1' NOT NULL CHECK (pm_unread >= 0),
+ pm_replied INT2 DEFAULT '0' NOT NULL CHECK (pm_replied >= 0),
+ pm_marked INT2 DEFAULT '0' NOT NULL CHECK (pm_marked >= 0),
+ pm_forwarded INT2 DEFAULT '0' NOT NULL CHECK (pm_forwarded >= 0),
+ folder_id INT4 DEFAULT '0' NOT NULL
+);
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
+
+/*
+ Table: 'phpbb_profile_fields'
+*/
+CREATE SEQUENCE phpbb_profile_fields_seq;
+
+CREATE TABLE phpbb_profile_fields (
+ field_id INT4 DEFAULT nextval('phpbb_profile_fields_seq'),
+ field_name varchar(255) DEFAULT '' NOT NULL,
+ field_type INT2 DEFAULT '0' NOT NULL,
+ field_ident varchar(20) DEFAULT '' NOT NULL,
+ field_length varchar(20) DEFAULT '' NOT NULL,
+ field_minlen varchar(255) DEFAULT '' NOT NULL,
+ field_maxlen varchar(255) DEFAULT '' NOT NULL,
+ field_novalue varchar(255) DEFAULT '' NOT NULL,
+ field_default_value varchar(255) DEFAULT '' NOT NULL,
+ field_validation varchar(20) DEFAULT '' NOT NULL,
+ field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0),
+ field_show_novalue INT2 DEFAULT '0' NOT NULL CHECK (field_show_novalue >= 0),
+ field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 0),
+ field_show_on_pm INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_pm >= 0),
+ field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0),
+ field_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0),
+ field_hide INT2 DEFAULT '0' NOT NULL CHECK (field_hide >= 0),
+ field_no_view INT2 DEFAULT '0' NOT NULL CHECK (field_no_view >= 0),
+ field_active INT2 DEFAULT '0' NOT NULL CHECK (field_active >= 0),
+ field_order INT4 DEFAULT '0' NOT NULL CHECK (field_order >= 0),
+ PRIMARY KEY (field_id)
+);
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
+
+/*
+ Table: 'phpbb_profile_fields_data'
+*/
+CREATE TABLE phpbb_profile_fields_data (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ PRIMARY KEY (user_id)
+);
+
+
+/*
+ Table: 'phpbb_profile_fields_lang'
+*/
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
+ lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
+ option_id INT4 DEFAULT '0' NOT NULL CHECK (option_id >= 0),
+ field_type INT2 DEFAULT '0' NOT NULL,
+ lang_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
+);
+
+
+/*
+ Table: 'phpbb_profile_lang'
+*/
+CREATE TABLE phpbb_profile_lang (
+ field_id INT4 DEFAULT '0' NOT NULL CHECK (field_id >= 0),
+ lang_id INT4 DEFAULT '0' NOT NULL CHECK (lang_id >= 0),
+ lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_explain varchar(4000) DEFAULT '' NOT NULL,
+ lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
+);
+
+
+/*
+ Table: 'phpbb_ranks'
+*/
+CREATE SEQUENCE phpbb_ranks_seq;
+
+CREATE TABLE phpbb_ranks (
+ rank_id INT4 DEFAULT nextval('phpbb_ranks_seq'),
+ rank_title varchar(255) DEFAULT '' NOT NULL,
+ rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= 0),
+ rank_special INT2 DEFAULT '0' NOT NULL CHECK (rank_special >= 0),
+ rank_image varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (rank_id)
+);
+
+
+/*
+ Table: 'phpbb_reports'
+*/
+CREATE SEQUENCE phpbb_reports_seq;
+
+CREATE TABLE phpbb_reports (
+ report_id INT4 DEFAULT nextval('phpbb_reports_seq'),
+ reason_id INT2 DEFAULT '0' NOT NULL CHECK (reason_id >= 0),
+ post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
+ pm_id INT4 DEFAULT '0' NOT NULL CHECK (pm_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0),
+ report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0),
+ report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
+ report_text TEXT DEFAULT '' NOT NULL,
+ reported_post_text TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (report_id)
+);
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id);
+
+/*
+ Table: 'phpbb_reports_reasons'
+*/
+CREATE SEQUENCE phpbb_reports_reasons_seq;
+
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'),
+ reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_description TEXT DEFAULT '' NOT NULL,
+ reason_order INT2 DEFAULT '0' NOT NULL CHECK (reason_order >= 0),
+ PRIMARY KEY (reason_id)
+);
+
+
+/*
+ Table: 'phpbb_search_results'
+*/
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) DEFAULT '' NOT NULL,
+ search_time INT4 DEFAULT '0' NOT NULL CHECK (search_time >= 0),
+ search_keywords TEXT DEFAULT '' NOT NULL,
+ search_authors TEXT DEFAULT '' NOT NULL,
+ PRIMARY KEY (search_key)
+);
+
+
+/*
+ Table: 'phpbb_search_wordlist'
+*/
+CREATE SEQUENCE phpbb_search_wordlist_seq;
+
+CREATE TABLE phpbb_search_wordlist (
+ word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'),
+ word_text varchar(255) DEFAULT '' NOT NULL,
+ word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0),
+ word_count INT4 DEFAULT '0' NOT NULL CHECK (word_count >= 0),
+ PRIMARY KEY (word_id)
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
+
+/*
+ Table: 'phpbb_search_wordmatch'
+*/
+CREATE TABLE phpbb_search_wordmatch (
+ post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
+ word_id INT4 DEFAULT '0' NOT NULL CHECK (word_id >= 0),
+ title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0)
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
+
+/*
+ Table: 'phpbb_sessions'
+*/
+CREATE TABLE phpbb_sessions (
+ session_id char(32) DEFAULT '' NOT NULL,
+ session_user_id INT4 DEFAULT '0' NOT NULL CHECK (session_user_id >= 0),
+ session_forum_id INT4 DEFAULT '0' NOT NULL CHECK (session_forum_id >= 0),
+ session_last_visit INT4 DEFAULT '0' NOT NULL CHECK (session_last_visit >= 0),
+ session_start INT4 DEFAULT '0' NOT NULL CHECK (session_start >= 0),
+ session_time INT4 DEFAULT '0' NOT NULL CHECK (session_time >= 0),
+ session_ip varchar(40) DEFAULT '' NOT NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
+ session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
+ session_page varchar(255) DEFAULT '' NOT NULL,
+ session_viewonline INT2 DEFAULT '1' NOT NULL CHECK (session_viewonline >= 0),
+ session_autologin INT2 DEFAULT '0' NOT NULL CHECK (session_autologin >= 0),
+ session_admin INT2 DEFAULT '0' NOT NULL CHECK (session_admin >= 0),
+ PRIMARY KEY (session_id)
+);
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
+
+/*
+ Table: 'phpbb_sessions_keys'
+*/
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) DEFAULT '' NOT NULL,
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ last_ip varchar(40) DEFAULT '' NOT NULL,
+ last_login INT4 DEFAULT '0' NOT NULL CHECK (last_login >= 0),
+ PRIMARY KEY (key_id, user_id)
+);
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
+
+/*
+ Table: 'phpbb_sitelist'
+*/
+CREATE SEQUENCE phpbb_sitelist_seq;
+
+CREATE TABLE phpbb_sitelist (
+ site_id INT4 DEFAULT nextval('phpbb_sitelist_seq'),
+ site_ip varchar(40) DEFAULT '' NOT NULL,
+ site_hostname varchar(255) DEFAULT '' NOT NULL,
+ ip_exclude INT2 DEFAULT '0' NOT NULL CHECK (ip_exclude >= 0),
+ PRIMARY KEY (site_id)
+);
+
+
+/*
+ Table: 'phpbb_smilies'
+*/
+CREATE SEQUENCE phpbb_smilies_seq;
+
+CREATE TABLE phpbb_smilies (
+ smiley_id INT4 DEFAULT nextval('phpbb_smilies_seq'),
+ code varchar(50) DEFAULT '' NOT NULL,
+ emotion varchar(50) DEFAULT '' NOT NULL,
+ smiley_url varchar(50) DEFAULT '' NOT NULL,
+ smiley_width INT2 DEFAULT '0' NOT NULL CHECK (smiley_width >= 0),
+ smiley_height INT2 DEFAULT '0' NOT NULL CHECK (smiley_height >= 0),
+ smiley_order INT4 DEFAULT '0' NOT NULL CHECK (smiley_order >= 0),
+ display_on_posting INT2 DEFAULT '1' NOT NULL CHECK (display_on_posting >= 0),
+ PRIMARY KEY (smiley_id)
+);
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
+
+/*
+ Table: 'phpbb_styles'
+*/
+CREATE SEQUENCE phpbb_styles_seq;
+
+CREATE TABLE phpbb_styles (
+ style_id INT4 DEFAULT nextval('phpbb_styles_seq'),
+ style_name varchar(255) DEFAULT '' NOT NULL,
+ style_copyright varchar(255) DEFAULT '' NOT NULL,
+ style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0),
+ style_path varchar(100) DEFAULT '' NOT NULL,
+ bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
+ style_parent_id INT4 DEFAULT '0' NOT NULL CHECK (style_parent_id >= 0),
+ style_parent_tree varchar(8000) DEFAULT '' NOT NULL,
+ PRIMARY KEY (style_id)
+);
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
+
+/*
+ Table: 'phpbb_topics'
+*/
+CREATE SEQUENCE phpbb_topics_seq;
+
+CREATE TABLE phpbb_topics (
+ topic_id INT4 DEFAULT nextval('phpbb_topics_seq'),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ icon_id INT4 DEFAULT '0' NOT NULL CHECK (icon_id >= 0),
+ topic_attachment INT2 DEFAULT '0' NOT NULL CHECK (topic_attachment >= 0),
+ topic_approved INT2 DEFAULT '1' NOT NULL CHECK (topic_approved >= 0),
+ topic_reported INT2 DEFAULT '0' NOT NULL CHECK (topic_reported >= 0),
+ topic_title varchar(255) DEFAULT '' NOT NULL,
+ topic_poster INT4 DEFAULT '0' NOT NULL CHECK (topic_poster >= 0),
+ topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0),
+ topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0),
+ topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0),
+ topic_replies INT4 DEFAULT '0' NOT NULL CHECK (topic_replies >= 0),
+ topic_replies_real INT4 DEFAULT '0' NOT NULL CHECK (topic_replies_real >= 0),
+ topic_status INT2 DEFAULT '0' NOT NULL,
+ topic_type INT2 DEFAULT '0' NOT NULL,
+ topic_first_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_first_post_id >= 0),
+ topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_id >= 0),
+ topic_last_poster_id INT4 DEFAULT '0' NOT NULL CHECK (topic_last_poster_id >= 0),
+ topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
+ topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
+ topic_last_post_subject varchar(255) DEFAULT '' NOT NULL,
+ topic_last_post_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_post_time >= 0),
+ topic_last_view_time INT4 DEFAULT '0' NOT NULL CHECK (topic_last_view_time >= 0),
+ topic_moved_id INT4 DEFAULT '0' NOT NULL CHECK (topic_moved_id >= 0),
+ topic_bumped INT2 DEFAULT '0' NOT NULL CHECK (topic_bumped >= 0),
+ topic_bumper INT4 DEFAULT '0' NOT NULL CHECK (topic_bumper >= 0),
+ poll_title varchar(255) DEFAULT '' NOT NULL,
+ poll_start INT4 DEFAULT '0' NOT NULL CHECK (poll_start >= 0),
+ poll_length INT4 DEFAULT '0' NOT NULL CHECK (poll_length >= 0),
+ poll_max_options INT2 DEFAULT '1' NOT NULL,
+ poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0),
+ poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0),
+ PRIMARY KEY (topic_id)
+);
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
+
+/*
+ Table: 'phpbb_topics_track'
+*/
+CREATE TABLE phpbb_topics_track (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0),
+ mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0),
+ PRIMARY KEY (user_id, topic_id)
+);
+
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
+
+/*
+ Table: 'phpbb_topics_posted'
+*/
+CREATE TABLE phpbb_topics_posted (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 0),
+ PRIMARY KEY (user_id, topic_id)
+);
+
+
+/*
+ Table: 'phpbb_topics_watch'
+*/
+CREATE TABLE phpbb_topics_watch (
+ topic_id INT4 DEFAULT '0' NOT NULL CHECK (topic_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ notify_status INT2 DEFAULT '0' NOT NULL CHECK (notify_status >= 0)
+);
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
+
+/*
+ Table: 'phpbb_user_group'
+*/
+CREATE TABLE phpbb_user_group (
+ group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ group_leader INT2 DEFAULT '0' NOT NULL CHECK (group_leader >= 0),
+ user_pending INT2 DEFAULT '1' NOT NULL CHECK (user_pending >= 0)
+);
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
+
+/*
+ Table: 'phpbb_users'
+*/
+CREATE SEQUENCE phpbb_users_seq;
+
+CREATE TABLE phpbb_users (
+ user_id INT4 DEFAULT nextval('phpbb_users_seq'),
+ user_type INT2 DEFAULT '0' NOT NULL,
+ group_id INT4 DEFAULT '3' NOT NULL CHECK (group_id >= 0),
+ user_permissions TEXT DEFAULT '' NOT NULL,
+ user_perm_from INT4 DEFAULT '0' NOT NULL CHECK (user_perm_from >= 0),
+ user_ip varchar(40) DEFAULT '' NOT NULL,
+ user_regdate INT4 DEFAULT '0' NOT NULL CHECK (user_regdate >= 0),
+ username varchar_ci DEFAULT '' NOT NULL,
+ username_clean varchar_ci DEFAULT '' NOT NULL,
+ user_password varchar(40) DEFAULT '' NOT NULL,
+ user_passchg INT4 DEFAULT '0' NOT NULL CHECK (user_passchg >= 0),
+ user_pass_convert INT2 DEFAULT '0' NOT NULL CHECK (user_pass_convert >= 0),
+ user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email_hash INT8 DEFAULT '0' NOT NULL,
+ user_birthday varchar(10) DEFAULT '' NOT NULL,
+ user_lastvisit INT4 DEFAULT '0' NOT NULL CHECK (user_lastvisit >= 0),
+ user_lastmark INT4 DEFAULT '0' NOT NULL CHECK (user_lastmark >= 0),
+ user_lastpost_time INT4 DEFAULT '0' NOT NULL CHECK (user_lastpost_time >= 0),
+ user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
+ user_last_search INT4 DEFAULT '0' NOT NULL CHECK (user_last_search >= 0),
+ user_warnings INT2 DEFAULT '0' NOT NULL,
+ user_last_warning INT4 DEFAULT '0' NOT NULL CHECK (user_last_warning >= 0),
+ user_login_attempts INT2 DEFAULT '0' NOT NULL,
+ user_inactive_reason INT2 DEFAULT '0' NOT NULL,
+ user_inactive_time INT4 DEFAULT '0' NOT NULL CHECK (user_inactive_time >= 0),
+ user_posts INT4 DEFAULT '0' NOT NULL CHECK (user_posts >= 0),
+ user_lang varchar(30) DEFAULT '' NOT NULL,
+ user_timezone varchar(100) DEFAULT 'UTC' NOT NULL,
+ user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
+ user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0),
+ user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0),
+ user_colour varchar(6) DEFAULT '' NOT NULL,
+ user_new_privmsg INT4 DEFAULT '0' NOT NULL,
+ user_unread_privmsg INT4 DEFAULT '0' NOT NULL,
+ user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0),
+ user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0),
+ user_full_folder INT4 DEFAULT '-3' NOT NULL,
+ user_emailtime INT4 DEFAULT '0' NOT NULL CHECK (user_emailtime >= 0),
+ user_topic_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_topic_show_days >= 0),
+ user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
+ user_post_show_days INT2 DEFAULT '0' NOT NULL CHECK (user_post_show_days >= 0),
+ user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
+ user_notify INT2 DEFAULT '0' NOT NULL CHECK (user_notify >= 0),
+ user_notify_pm INT2 DEFAULT '1' NOT NULL CHECK (user_notify_pm >= 0),
+ user_notify_type INT2 DEFAULT '0' NOT NULL,
+ user_allow_pm INT2 DEFAULT '1' NOT NULL CHECK (user_allow_pm >= 0),
+ user_allow_viewonline INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewonline >= 0),
+ user_allow_viewemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_viewemail >= 0),
+ user_allow_massemail INT2 DEFAULT '1' NOT NULL CHECK (user_allow_massemail >= 0),
+ user_options INT4 DEFAULT '230271' NOT NULL CHECK (user_options >= 0),
+ user_avatar varchar(255) DEFAULT '' NOT NULL,
+ user_avatar_type INT2 DEFAULT '0' NOT NULL,
+ user_avatar_width INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_width >= 0),
+ user_avatar_height INT2 DEFAULT '0' NOT NULL CHECK (user_avatar_height >= 0),
+ user_sig TEXT DEFAULT '' NOT NULL,
+ user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
+ user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
+ user_from varchar(100) DEFAULT '' NOT NULL,
+ user_icq varchar(15) DEFAULT '' NOT NULL,
+ user_aim varchar(255) DEFAULT '' NOT NULL,
+ user_yim varchar(255) DEFAULT '' NOT NULL,
+ user_msnm varchar(255) DEFAULT '' NOT NULL,
+ user_jabber varchar(255) DEFAULT '' NOT NULL,
+ user_website varchar(200) DEFAULT '' NOT NULL,
+ user_occ varchar(4000) DEFAULT '' NOT NULL,
+ user_interests varchar(4000) DEFAULT '' NOT NULL,
+ user_actkey varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(40) DEFAULT '' NOT NULL,
+ user_form_salt varchar(32) DEFAULT '' NOT NULL,
+ user_new INT2 DEFAULT '1' NOT NULL CHECK (user_new >= 0),
+ user_reminded INT2 DEFAULT '0' NOT NULL,
+ user_reminded_time INT4 DEFAULT '0' NOT NULL CHECK (user_reminded_time >= 0),
+ PRIMARY KEY (user_id)
+);
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
+CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
+CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
+
+/*
+ Table: 'phpbb_warnings'
+*/
+CREATE SEQUENCE phpbb_warnings_seq;
+
+CREATE TABLE phpbb_warnings (
+ warning_id INT4 DEFAULT nextval('phpbb_warnings_seq'),
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ post_id INT4 DEFAULT '0' NOT NULL CHECK (post_id >= 0),
+ log_id INT4 DEFAULT '0' NOT NULL CHECK (log_id >= 0),
+ warning_time INT4 DEFAULT '0' NOT NULL CHECK (warning_time >= 0),
+ PRIMARY KEY (warning_id)
+);
+
+
+/*
+ Table: 'phpbb_words'
+*/
+CREATE SEQUENCE phpbb_words_seq;
+
+CREATE TABLE phpbb_words (
+ word_id INT4 DEFAULT nextval('phpbb_words_seq'),
+ word varchar(255) DEFAULT '' NOT NULL,
+ replacement varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (word_id)
+);
+
+
+/*
+ Table: 'phpbb_zebra'
+*/
+CREATE TABLE phpbb_zebra (
+ user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
+ zebra_id INT4 DEFAULT '0' NOT NULL CHECK (zebra_id >= 0),
+ friend INT2 DEFAULT '0' NOT NULL CHECK (friend >= 0),
+ foe INT2 DEFAULT '0' NOT NULL CHECK (foe >= 0),
+ PRIMARY KEY (user_id, zebra_id)
+);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index ea7864bd4c..938b11388b 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -314,6 +314,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_subscribe', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_user_lock', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_vote', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_votechg', 1); +INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_restore', 1); # -- Moderator related auth options INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_', 1, 1); @@ -327,6 +328,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_merg INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_move', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_report', 1, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1); +INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_restore', 1, 1); # -- Global moderator auth option (not a local option) INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 8360bc30ea..361e0ca9c6 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -1,951 +1,947 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. -BEGIN TRANSACTION; - -# Table: 'phpbb_attachments' -CREATE TABLE phpbb_attachments ( - attach_id INTEGER PRIMARY KEY NOT NULL , - post_msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - in_message INTEGER UNSIGNED NOT NULL DEFAULT '0', - poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - is_orphan INTEGER UNSIGNED NOT NULL DEFAULT '1', - physical_filename varchar(255) NOT NULL DEFAULT '', - real_filename varchar(255) NOT NULL DEFAULT '', - download_count INTEGER UNSIGNED NOT NULL DEFAULT '0', - attach_comment text(65535) NOT NULL DEFAULT '', - extension varchar(100) NOT NULL DEFAULT '', - mimetype varchar(100) NOT NULL DEFAULT '', - filesize INTEGER UNSIGNED NOT NULL DEFAULT '0', - filetime INTEGER UNSIGNED NOT NULL DEFAULT '0', - thumbnail INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime); -CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id); -CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id); -CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id); -CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan); - -# Table: 'phpbb_acl_groups' -CREATE TABLE phpbb_acl_groups ( - group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_setting tinyint(2) NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id); -CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id); -CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id); - -# Table: 'phpbb_acl_options' -CREATE TABLE phpbb_acl_options ( - auth_option_id INTEGER PRIMARY KEY NOT NULL , - auth_option varchar(50) NOT NULL DEFAULT '', - is_global INTEGER UNSIGNED NOT NULL DEFAULT '0', - is_local INTEGER UNSIGNED NOT NULL DEFAULT '0', - founder_only INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option); - -# Table: 'phpbb_acl_roles' -CREATE TABLE phpbb_acl_roles ( - role_id INTEGER PRIMARY KEY NOT NULL , - role_name varchar(255) NOT NULL DEFAULT '', - role_description text(65535) NOT NULL DEFAULT '', - role_type varchar(10) NOT NULL DEFAULT '', - role_order INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type); -CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order); - -# Table: 'phpbb_acl_roles_data' -CREATE TABLE phpbb_acl_roles_data ( - role_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_setting tinyint(2) NOT NULL DEFAULT '0', - PRIMARY KEY (role_id, auth_option_id) -); - -CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id); - -# Table: 'phpbb_acl_users' -CREATE TABLE phpbb_acl_users ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - auth_setting tinyint(2) NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); -CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); -CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); - -# Table: 'phpbb_banlist' -CREATE TABLE phpbb_banlist ( - ban_id INTEGER PRIMARY KEY NOT NULL , - ban_userid INTEGER UNSIGNED NOT NULL DEFAULT '0', - ban_ip varchar(40) NOT NULL DEFAULT '', - ban_email varchar(100) NOT NULL DEFAULT '', - ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0', - ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0', - ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0', - ban_reason varchar(255) NOT NULL DEFAULT '', - ban_give_reason varchar(255) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end); -CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude); -CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude); -CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude); - -# Table: 'phpbb_bbcodes' -CREATE TABLE phpbb_bbcodes ( - bbcode_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - bbcode_tag varchar(16) NOT NULL DEFAULT '', - bbcode_helpline varchar(255) NOT NULL DEFAULT '', - display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0', - bbcode_match text(65535) NOT NULL DEFAULT '', - bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '', - first_pass_match mediumtext(16777215) NOT NULL DEFAULT '', - first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '', - second_pass_match mediumtext(16777215) NOT NULL DEFAULT '', - second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '', - PRIMARY KEY (bbcode_id) -); - -CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting); - -# Table: 'phpbb_bookmarks' -CREATE TABLE phpbb_bookmarks ( - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (topic_id, user_id) -); - - -# Table: 'phpbb_bots' -CREATE TABLE phpbb_bots ( - bot_id INTEGER PRIMARY KEY NOT NULL , - bot_active INTEGER UNSIGNED NOT NULL DEFAULT '1', - bot_name text(65535) NOT NULL DEFAULT '', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - bot_agent varchar(255) NOT NULL DEFAULT '', - bot_ip varchar(255) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active); - -# Table: 'phpbb_config' -CREATE TABLE phpbb_config ( - config_name varchar(255) NOT NULL DEFAULT '', - config_value varchar(255) NOT NULL DEFAULT '', - is_dynamic INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (config_name) -); - -CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic); - -# Table: 'phpbb_confirm' -CREATE TABLE phpbb_confirm ( - confirm_id char(32) NOT NULL DEFAULT '', - session_id char(32) NOT NULL DEFAULT '', - confirm_type tinyint(3) NOT NULL DEFAULT '0', - code varchar(8) NOT NULL DEFAULT '', - seed INTEGER UNSIGNED NOT NULL DEFAULT '0', - attempts INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (session_id, confirm_id) -); - -CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type); - -# Table: 'phpbb_disallow' -CREATE TABLE phpbb_disallow ( - disallow_id INTEGER PRIMARY KEY NOT NULL , - disallow_username varchar(255) NOT NULL DEFAULT '' -); - - -# Table: 'phpbb_drafts' -CREATE TABLE phpbb_drafts ( - draft_id INTEGER PRIMARY KEY NOT NULL , - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - save_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - draft_subject text(65535) NOT NULL DEFAULT '', - draft_message mediumtext(16777215) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time); - -# Table: 'phpbb_ext' -CREATE TABLE phpbb_ext ( - ext_name varchar(255) NOT NULL DEFAULT '', - ext_active INTEGER UNSIGNED NOT NULL DEFAULT '0', - ext_state text(65535) NOT NULL DEFAULT '' -); - -CREATE UNIQUE INDEX phpbb_ext_ext_name ON phpbb_ext (ext_name); - -# Table: 'phpbb_extensions' -CREATE TABLE phpbb_extensions ( - extension_id INTEGER PRIMARY KEY NOT NULL , - group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - extension varchar(100) NOT NULL DEFAULT '' -); - - -# Table: 'phpbb_extension_groups' -CREATE TABLE phpbb_extension_groups ( - group_id INTEGER PRIMARY KEY NOT NULL , - group_name varchar(255) NOT NULL DEFAULT '', - cat_id tinyint(2) NOT NULL DEFAULT '0', - allow_group INTEGER UNSIGNED NOT NULL DEFAULT '0', - download_mode INTEGER UNSIGNED NOT NULL DEFAULT '1', - upload_icon varchar(255) NOT NULL DEFAULT '', - max_filesize INTEGER UNSIGNED NOT NULL DEFAULT '0', - allowed_forums text(65535) NOT NULL DEFAULT '', - allow_in_pm INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - - -# Table: 'phpbb_forums' -CREATE TABLE phpbb_forums ( - forum_id INTEGER PRIMARY KEY NOT NULL , - parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - left_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - right_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_parents mediumtext(16777215) NOT NULL DEFAULT '', - forum_name text(65535) NOT NULL DEFAULT '', - forum_desc text(65535) NOT NULL DEFAULT '', - forum_desc_bitfield varchar(255) NOT NULL DEFAULT '', - forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7', - forum_desc_uid varchar(8) NOT NULL DEFAULT '', - forum_link varchar(255) NOT NULL DEFAULT '', - forum_password varchar(40) NOT NULL DEFAULT '', - forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_image varchar(255) NOT NULL DEFAULT '', - forum_rules text(65535) NOT NULL DEFAULT '', - forum_rules_link varchar(255) NOT NULL DEFAULT '', - forum_rules_bitfield varchar(255) NOT NULL DEFAULT '', - forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7', - forum_rules_uid varchar(8) NOT NULL DEFAULT '', - forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0', - forum_type tinyint(4) NOT NULL DEFAULT '0', - forum_status tinyint(4) NOT NULL DEFAULT '0', - forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_last_post_subject text(65535) NOT NULL DEFAULT '', - forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_last_poster_name varchar(255) NOT NULL DEFAULT '', - forum_last_poster_colour varchar(6) NOT NULL DEFAULT '', - forum_flags tinyint(4) NOT NULL DEFAULT '32', - forum_options INTEGER UNSIGNED NOT NULL DEFAULT '0', - display_subforum_list INTEGER UNSIGNED NOT NULL DEFAULT '1', - display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_icons INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_prune INTEGER UNSIGNED NOT NULL DEFAULT '0', - prune_next INTEGER UNSIGNED NOT NULL DEFAULT '0', - prune_days INTEGER UNSIGNED NOT NULL DEFAULT '0', - prune_viewed INTEGER UNSIGNED NOT NULL DEFAULT '0', - prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id); -CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id); - -# Table: 'phpbb_forums_access' -CREATE TABLE phpbb_forums_access ( - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_id char(32) NOT NULL DEFAULT '', - PRIMARY KEY (forum_id, user_id, session_id) -); - - -# Table: 'phpbb_forums_track' -CREATE TABLE phpbb_forums_track ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (user_id, forum_id) -); - - -# Table: 'phpbb_forums_watch' -CREATE TABLE phpbb_forums_watch ( - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id); -CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id); -CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status); - -# Table: 'phpbb_groups' -CREATE TABLE phpbb_groups ( - group_id INTEGER PRIMARY KEY NOT NULL , - group_type tinyint(4) NOT NULL DEFAULT '1', - group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_skip_auth INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_name varchar(255) NOT NULL DEFAULT '', - group_desc text(65535) NOT NULL DEFAULT '', - group_desc_bitfield varchar(255) NOT NULL DEFAULT '', - group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7', - group_desc_uid varchar(8) NOT NULL DEFAULT '', - group_display INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_avatar varchar(255) NOT NULL DEFAULT '', - group_avatar_type tinyint(2) NOT NULL DEFAULT '0', - group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_colour varchar(6) NOT NULL DEFAULT '', - group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_legend INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_teampage INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name); - -# Table: 'phpbb_icons' -CREATE TABLE phpbb_icons ( - icons_id INTEGER PRIMARY KEY NOT NULL , - icons_url varchar(255) NOT NULL DEFAULT '', - icons_width tinyint(4) NOT NULL DEFAULT '0', - icons_height tinyint(4) NOT NULL DEFAULT '0', - icons_order INTEGER UNSIGNED NOT NULL DEFAULT '0', - display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1' -); - -CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting); - -# Table: 'phpbb_lang' -CREATE TABLE phpbb_lang ( - lang_id INTEGER PRIMARY KEY NOT NULL , - lang_iso varchar(30) NOT NULL DEFAULT '', - lang_dir varchar(30) NOT NULL DEFAULT '', - lang_english_name varchar(100) NOT NULL DEFAULT '', - lang_local_name varchar(255) NOT NULL DEFAULT '', - lang_author varchar(255) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso); - -# Table: 'phpbb_log' -CREATE TABLE phpbb_log ( - log_id INTEGER PRIMARY KEY NOT NULL , - log_type tinyint(4) NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - reportee_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - log_ip varchar(40) NOT NULL DEFAULT '', - log_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - log_operation text(65535) NOT NULL DEFAULT '', - log_data mediumtext(16777215) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type); -CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time); -CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id); -CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id); -CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id); -CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id); - -# Table: 'phpbb_login_attempts' -CREATE TABLE phpbb_login_attempts ( - attempt_ip varchar(40) NOT NULL DEFAULT '', - attempt_browser varchar(150) NOT NULL DEFAULT '', - attempt_forwarded_for varchar(255) NOT NULL DEFAULT '', - attempt_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - username varchar(255) NOT NULL DEFAULT '0', - username_clean varchar(255) NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time); -CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time); -CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time); -CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id); - -# Table: 'phpbb_moderator_cache' -CREATE TABLE phpbb_moderator_cache ( - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - username varchar(255) NOT NULL DEFAULT '', - group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_name varchar(255) NOT NULL DEFAULT '', - display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1' -); - -CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index); -CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id); - -# Table: 'phpbb_modules' -CREATE TABLE phpbb_modules ( - module_id INTEGER PRIMARY KEY NOT NULL , - module_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1', - module_display INTEGER UNSIGNED NOT NULL DEFAULT '1', - module_basename varchar(255) NOT NULL DEFAULT '', - module_class varchar(10) NOT NULL DEFAULT '', - parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - left_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - right_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - module_langname varchar(255) NOT NULL DEFAULT '', - module_mode varchar(255) NOT NULL DEFAULT '', - module_auth varchar(255) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id); -CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled); -CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id); - -# Table: 'phpbb_poll_options' -CREATE TABLE phpbb_poll_options ( - poll_option_id tinyint(4) NOT NULL DEFAULT '0', - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - poll_option_text text(65535) NOT NULL DEFAULT '', - poll_option_total INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id); -CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id); - -# Table: 'phpbb_poll_votes' -CREATE TABLE phpbb_poll_votes ( - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - poll_option_id tinyint(4) NOT NULL DEFAULT '0', - vote_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - vote_user_ip varchar(40) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id); -CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id); -CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip); - -# Table: 'phpbb_posts' -CREATE TABLE phpbb_posts ( - post_id INTEGER PRIMARY KEY NOT NULL , - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - poster_ip varchar(40) NOT NULL DEFAULT '', - post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1', - post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0', - enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1', - post_username varchar(255) NOT NULL DEFAULT '', - post_subject text(65535) NOT NULL DEFAULT '', - post_text mediumtext(16777215) NOT NULL DEFAULT '', - post_checksum varchar(32) NOT NULL DEFAULT '', - post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', - bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - bbcode_uid varchar(8) NOT NULL DEFAULT '', - post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1', - post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_edit_reason text(65535) NOT NULL DEFAULT '', - post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id); -CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id); -CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip); -CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id); -CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved); -CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username); -CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time); - -# Table: 'phpbb_privmsgs' -CREATE TABLE phpbb_privmsgs ( - msg_id INTEGER PRIMARY KEY NOT NULL , - root_level INTEGER UNSIGNED NOT NULL DEFAULT '0', - author_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - author_ip varchar(40) NOT NULL DEFAULT '', - message_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1', - enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1', - message_subject text(65535) NOT NULL DEFAULT '', - message_text mediumtext(16777215) NOT NULL DEFAULT '', - message_edit_reason text(65535) NOT NULL DEFAULT '', - message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0', - message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', - bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - bbcode_uid varchar(8) NOT NULL DEFAULT '', - message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0', - to_address text(65535) NOT NULL DEFAULT '', - bcc_address text(65535) NOT NULL DEFAULT '', - message_reported INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip); -CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time); -CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id); -CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level); - -# Table: 'phpbb_privmsgs_folder' -CREATE TABLE phpbb_privmsgs_folder ( - folder_id INTEGER PRIMARY KEY NOT NULL , - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - folder_name varchar(255) NOT NULL DEFAULT '', - pm_count INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id); - -# Table: 'phpbb_privmsgs_rules' -CREATE TABLE phpbb_privmsgs_rules ( - rule_id INTEGER PRIMARY KEY NOT NULL , - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - rule_check INTEGER UNSIGNED NOT NULL DEFAULT '0', - rule_connection INTEGER UNSIGNED NOT NULL DEFAULT '0', - rule_string varchar(255) NOT NULL DEFAULT '', - rule_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - rule_group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - rule_action INTEGER UNSIGNED NOT NULL DEFAULT '0', - rule_folder_id int(11) NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id); - -# Table: 'phpbb_privmsgs_to' -CREATE TABLE phpbb_privmsgs_to ( - msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - author_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - pm_deleted INTEGER UNSIGNED NOT NULL DEFAULT '0', - pm_new INTEGER UNSIGNED NOT NULL DEFAULT '1', - pm_unread INTEGER UNSIGNED NOT NULL DEFAULT '1', - pm_replied INTEGER UNSIGNED NOT NULL DEFAULT '0', - pm_marked INTEGER UNSIGNED NOT NULL DEFAULT '0', - pm_forwarded INTEGER UNSIGNED NOT NULL DEFAULT '0', - folder_id int(11) NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id); -CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id); -CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id); - -# Table: 'phpbb_profile_fields' -CREATE TABLE phpbb_profile_fields ( - field_id INTEGER PRIMARY KEY NOT NULL , - field_name varchar(255) NOT NULL DEFAULT '', - field_type tinyint(4) NOT NULL DEFAULT '0', - field_ident varchar(20) NOT NULL DEFAULT '', - field_length varchar(20) NOT NULL DEFAULT '', - field_minlen varchar(255) NOT NULL DEFAULT '', - field_maxlen varchar(255) NOT NULL DEFAULT '', - field_novalue varchar(255) NOT NULL DEFAULT '', - field_default_value varchar(255) NOT NULL DEFAULT '', - field_validation varchar(20) NOT NULL DEFAULT '', - field_required INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_show_novalue INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_show_on_pm INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_active INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_order INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type); -CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order); - -# Table: 'phpbb_profile_fields_data' -CREATE TABLE phpbb_profile_fields_data ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (user_id) -); - - -# Table: 'phpbb_profile_fields_lang' -CREATE TABLE phpbb_profile_fields_lang ( - field_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - option_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - field_type tinyint(4) NOT NULL DEFAULT '0', - lang_value varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (field_id, lang_id, option_id) -); - - -# Table: 'phpbb_profile_lang' -CREATE TABLE phpbb_profile_lang ( - field_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - lang_name varchar(255) NOT NULL DEFAULT '', - lang_explain text(65535) NOT NULL DEFAULT '', - lang_default_value varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (field_id, lang_id) -); - - -# Table: 'phpbb_ranks' -CREATE TABLE phpbb_ranks ( - rank_id INTEGER PRIMARY KEY NOT NULL , - rank_title varchar(255) NOT NULL DEFAULT '', - rank_min INTEGER UNSIGNED NOT NULL DEFAULT '0', - rank_special INTEGER UNSIGNED NOT NULL DEFAULT '0', - rank_image varchar(255) NOT NULL DEFAULT '' -); - - -# Table: 'phpbb_reports' -CREATE TABLE phpbb_reports ( - report_id INTEGER PRIMARY KEY NOT NULL , - reason_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - pm_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0', - report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0', - report_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - report_text mediumtext(16777215) NOT NULL DEFAULT '', - reported_post_text mediumtext(16777215) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); -CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id); - -# Table: 'phpbb_reports_reasons' -CREATE TABLE phpbb_reports_reasons ( - reason_id INTEGER PRIMARY KEY NOT NULL , - reason_title varchar(255) NOT NULL DEFAULT '', - reason_description mediumtext(16777215) NOT NULL DEFAULT '', - reason_order INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - - -# Table: 'phpbb_search_results' -CREATE TABLE phpbb_search_results ( - search_key varchar(32) NOT NULL DEFAULT '', - search_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - search_keywords mediumtext(16777215) NOT NULL DEFAULT '', - search_authors mediumtext(16777215) NOT NULL DEFAULT '', - PRIMARY KEY (search_key) -); - - -# Table: 'phpbb_search_wordlist' -CREATE TABLE phpbb_search_wordlist ( - word_id INTEGER PRIMARY KEY NOT NULL , - word_text varchar(255) NOT NULL DEFAULT '', - word_common INTEGER UNSIGNED NOT NULL DEFAULT '0', - word_count INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text); -CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count); - -# Table: 'phpbb_search_wordmatch' -CREATE TABLE phpbb_search_wordmatch ( - post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - word_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - title_match INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match); -CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id); -CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); - -# Table: 'phpbb_sessions' -CREATE TABLE phpbb_sessions ( - session_id char(32) NOT NULL DEFAULT '', - session_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_last_visit INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_start INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_ip varchar(40) NOT NULL DEFAULT '', - session_browser varchar(150) NOT NULL DEFAULT '', - session_forwarded_for varchar(255) NOT NULL DEFAULT '', - session_page varchar(255) NOT NULL DEFAULT '', - session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1', - session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (session_id) -); - -CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time); -CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id); -CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id); - -# Table: 'phpbb_sessions_keys' -CREATE TABLE phpbb_sessions_keys ( - key_id char(32) NOT NULL DEFAULT '', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - last_ip varchar(40) NOT NULL DEFAULT '', - last_login INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (key_id, user_id) -); - -CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login); - -# Table: 'phpbb_sitelist' -CREATE TABLE phpbb_sitelist ( - site_id INTEGER PRIMARY KEY NOT NULL , - site_ip varchar(40) NOT NULL DEFAULT '', - site_hostname varchar(255) NOT NULL DEFAULT '', - ip_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - - -# Table: 'phpbb_smilies' -CREATE TABLE phpbb_smilies ( - smiley_id INTEGER PRIMARY KEY NOT NULL , - code varchar(50) NOT NULL DEFAULT '', - emotion varchar(50) NOT NULL DEFAULT '', - smiley_url varchar(50) NOT NULL DEFAULT '', - smiley_width INTEGER UNSIGNED NOT NULL DEFAULT '0', - smiley_height INTEGER UNSIGNED NOT NULL DEFAULT '0', - smiley_order INTEGER UNSIGNED NOT NULL DEFAULT '0', - display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1' -); - -CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting); - -# Table: 'phpbb_styles' -CREATE TABLE phpbb_styles ( - style_id INTEGER PRIMARY KEY NOT NULL , - style_name varchar(255) NOT NULL DEFAULT '', - style_copyright varchar(255) NOT NULL DEFAULT '', - style_active INTEGER UNSIGNED NOT NULL DEFAULT '1', - style_path varchar(100) NOT NULL DEFAULT '', - bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=', - style_parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - style_parent_tree text(65535) NOT NULL DEFAULT '' -); - -CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); - -# Table: 'phpbb_topics' -CREATE TABLE phpbb_topics ( - topic_id INTEGER PRIMARY KEY NOT NULL , - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1', - topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_title text(65535) NOT NULL DEFAULT '', - topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_status tinyint(3) NOT NULL DEFAULT '0', - topic_type tinyint(3) NOT NULL DEFAULT '0', - topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_first_poster_name varchar(255) NOT NULL DEFAULT '', - topic_first_poster_colour varchar(6) NOT NULL DEFAULT '', - topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_last_poster_name varchar(255) NOT NULL DEFAULT '', - topic_last_poster_colour varchar(6) NOT NULL DEFAULT '', - topic_last_post_subject text(65535) NOT NULL DEFAULT '', - topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_bumped INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_bumper INTEGER UNSIGNED NOT NULL DEFAULT '0', - poll_title text(65535) NOT NULL DEFAULT '', - poll_start INTEGER UNSIGNED NOT NULL DEFAULT '0', - poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0', - poll_max_options tinyint(4) NOT NULL DEFAULT '1', - poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0', - poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); -CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); -CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); -CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); -CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); -CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); - -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (user_id, topic_id) -); - -CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id); -CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id); - -# Table: 'phpbb_topics_posted' -CREATE TABLE phpbb_topics_posted ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_posted INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (user_id, topic_id) -); - - -# Table: 'phpbb_topics_watch' -CREATE TABLE phpbb_topics_watch ( - topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id); -CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id); -CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status); - -# Table: 'phpbb_user_group' -CREATE TABLE phpbb_user_group ( - group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_leader INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_pending INTEGER UNSIGNED NOT NULL DEFAULT '1' -); - -CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id); -CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id); -CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader); - -# Table: 'phpbb_users' -CREATE TABLE phpbb_users ( - user_id INTEGER PRIMARY KEY NOT NULL , - user_type tinyint(2) NOT NULL DEFAULT '0', - group_id INTEGER UNSIGNED NOT NULL DEFAULT '3', - user_permissions mediumtext(16777215) NOT NULL DEFAULT '', - user_perm_from INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_ip varchar(40) NOT NULL DEFAULT '', - user_regdate INTEGER UNSIGNED NOT NULL DEFAULT '0', - username varchar(255) NOT NULL DEFAULT '', - username_clean varchar(255) NOT NULL DEFAULT '', - user_password varchar(40) NOT NULL DEFAULT '', - user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_email varchar(100) NOT NULL DEFAULT '', - user_email_hash bigint(20) NOT NULL DEFAULT '0', - user_birthday varchar(10) NOT NULL DEFAULT '', - user_lastvisit INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_lastmark INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_lastpost_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_lastpage varchar(200) NOT NULL DEFAULT '', - user_last_confirm_key varchar(10) NOT NULL DEFAULT '', - user_last_search INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_warnings tinyint(4) NOT NULL DEFAULT '0', - user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_login_attempts tinyint(4) NOT NULL DEFAULT '0', - user_inactive_reason tinyint(2) NOT NULL DEFAULT '0', - user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_lang varchar(30) NOT NULL DEFAULT '', - user_timezone varchar(100) NOT NULL DEFAULT 'UTC', - user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i', - user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_colour varchar(6) NOT NULL DEFAULT '', - user_new_privmsg int(4) NOT NULL DEFAULT '0', - user_unread_privmsg int(4) NOT NULL DEFAULT '0', - user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_full_folder int(11) NOT NULL DEFAULT '-3', - user_emailtime INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_topic_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't', - user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd', - user_post_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_post_sortby_type varchar(1) NOT NULL DEFAULT 't', - user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a', - user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_notify_pm INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_notify_type tinyint(4) NOT NULL DEFAULT '0', - user_allow_pm INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_options INTEGER UNSIGNED NOT NULL DEFAULT '230271', - user_avatar varchar(255) NOT NULL DEFAULT '', - user_avatar_type tinyint(2) NOT NULL DEFAULT '0', - user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_sig mediumtext(16777215) NOT NULL DEFAULT '', - user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '', - user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '', - user_from varchar(100) NOT NULL DEFAULT '', - user_icq varchar(15) NOT NULL DEFAULT '', - user_aim varchar(255) NOT NULL DEFAULT '', - user_yim varchar(255) NOT NULL DEFAULT '', - user_msnm varchar(255) NOT NULL DEFAULT '', - user_jabber varchar(255) NOT NULL DEFAULT '', - user_website varchar(200) NOT NULL DEFAULT '', - user_occ text(65535) NOT NULL DEFAULT '', - user_interests text(65535) NOT NULL DEFAULT '', - user_actkey varchar(32) NOT NULL DEFAULT '', - user_newpasswd varchar(40) NOT NULL DEFAULT '', - user_form_salt varchar(32) NOT NULL DEFAULT '', - user_new INTEGER UNSIGNED NOT NULL DEFAULT '1', - user_reminded tinyint(4) NOT NULL DEFAULT '0', - user_reminded_time INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday); -CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash); -CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type); -CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean); - -# Table: 'phpbb_warnings' -CREATE TABLE phpbb_warnings ( - warning_id INTEGER PRIMARY KEY NOT NULL , - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - log_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - warning_time INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - - -# Table: 'phpbb_words' -CREATE TABLE phpbb_words ( - word_id INTEGER PRIMARY KEY NOT NULL , - word varchar(255) NOT NULL DEFAULT '', - replacement varchar(255) NOT NULL DEFAULT '' -); - - -# Table: 'phpbb_zebra' -CREATE TABLE phpbb_zebra ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - zebra_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - friend INTEGER UNSIGNED NOT NULL DEFAULT '0', - foe INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (user_id, zebra_id) -); - - - -COMMIT;
\ No newline at end of file +# DO NOT EDIT THIS FILE, IT IS GENERATED
+#
+# To change the contents of this file, edit
+# phpBB/develop/create_schema_files.php and
+# run it.
+BEGIN TRANSACTION;
+
+# Table: 'phpbb_attachments'
+CREATE TABLE phpbb_attachments (
+ attach_id INTEGER PRIMARY KEY NOT NULL ,
+ post_msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ in_message INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ is_orphan INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ physical_filename varchar(255) NOT NULL DEFAULT '',
+ real_filename varchar(255) NOT NULL DEFAULT '',
+ download_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ attach_comment text(65535) NOT NULL DEFAULT '',
+ extension varchar(100) NOT NULL DEFAULT '',
+ mimetype varchar(100) NOT NULL DEFAULT '',
+ filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ filetime INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ thumbnail INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
+CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
+CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
+CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
+CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
+
+# Table: 'phpbb_acl_groups'
+CREATE TABLE phpbb_acl_groups (
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_setting tinyint(2) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
+CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
+CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
+
+# Table: 'phpbb_acl_options'
+CREATE TABLE phpbb_acl_options (
+ auth_option_id INTEGER PRIMARY KEY NOT NULL ,
+ auth_option varchar(50) NOT NULL DEFAULT '',
+ is_global INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ is_local INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ founder_only INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
+
+# Table: 'phpbb_acl_roles'
+CREATE TABLE phpbb_acl_roles (
+ role_id INTEGER PRIMARY KEY NOT NULL ,
+ role_name varchar(255) NOT NULL DEFAULT '',
+ role_description text(65535) NOT NULL DEFAULT '',
+ role_type varchar(10) NOT NULL DEFAULT '',
+ role_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
+CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
+
+# Table: 'phpbb_acl_roles_data'
+CREATE TABLE phpbb_acl_roles_data (
+ role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_setting tinyint(2) NOT NULL DEFAULT '0',
+ PRIMARY KEY (role_id, auth_option_id)
+);
+
+CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
+
+# Table: 'phpbb_acl_users'
+CREATE TABLE phpbb_acl_users (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ auth_setting tinyint(2) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
+CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
+CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
+
+# Table: 'phpbb_banlist'
+CREATE TABLE phpbb_banlist (
+ ban_id INTEGER PRIMARY KEY NOT NULL ,
+ ban_userid INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_ip varchar(40) NOT NULL DEFAULT '',
+ ban_email varchar(100) NOT NULL DEFAULT '',
+ ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ban_reason varchar(255) NOT NULL DEFAULT '',
+ ban_give_reason varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
+CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
+CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
+
+# Table: 'phpbb_bbcodes'
+CREATE TABLE phpbb_bbcodes (
+ bbcode_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_tag varchar(16) NOT NULL DEFAULT '',
+ bbcode_helpline varchar(255) NOT NULL DEFAULT '',
+ display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_match text(65535) NOT NULL DEFAULT '',
+ bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '',
+ first_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
+ first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
+ second_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
+ second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
+ PRIMARY KEY (bbcode_id)
+);
+
+CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
+
+# Table: 'phpbb_bookmarks'
+CREATE TABLE phpbb_bookmarks (
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (topic_id, user_id)
+);
+
+
+# Table: 'phpbb_bots'
+CREATE TABLE phpbb_bots (
+ bot_id INTEGER PRIMARY KEY NOT NULL ,
+ bot_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ bot_name text(65535) NOT NULL DEFAULT '',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bot_agent varchar(255) NOT NULL DEFAULT '',
+ bot_ip varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
+
+# Table: 'phpbb_config'
+CREATE TABLE phpbb_config (
+ config_name varchar(255) NOT NULL DEFAULT '',
+ config_value varchar(255) NOT NULL DEFAULT '',
+ is_dynamic INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (config_name)
+);
+
+CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
+
+# Table: 'phpbb_confirm'
+CREATE TABLE phpbb_confirm (
+ confirm_id char(32) NOT NULL DEFAULT '',
+ session_id char(32) NOT NULL DEFAULT '',
+ confirm_type tinyint(3) NOT NULL DEFAULT '0',
+ code varchar(8) NOT NULL DEFAULT '',
+ seed INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ attempts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (session_id, confirm_id)
+);
+
+CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
+
+# Table: 'phpbb_disallow'
+CREATE TABLE phpbb_disallow (
+ disallow_id INTEGER PRIMARY KEY NOT NULL ,
+ disallow_username varchar(255) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_drafts'
+CREATE TABLE phpbb_drafts (
+ draft_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ save_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ draft_subject text(65535) NOT NULL DEFAULT '',
+ draft_message mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
+
+# Table: 'phpbb_ext'
+CREATE TABLE phpbb_ext (
+ ext_name varchar(255) NOT NULL DEFAULT '',
+ ext_active INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ ext_state text(65535) NOT NULL DEFAULT ''
+);
+
+CREATE UNIQUE INDEX phpbb_ext_ext_name ON phpbb_ext (ext_name);
+
+# Table: 'phpbb_extensions'
+CREATE TABLE phpbb_extensions (
+ extension_id INTEGER PRIMARY KEY NOT NULL ,
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ extension varchar(100) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_extension_groups'
+CREATE TABLE phpbb_extension_groups (
+ group_id INTEGER PRIMARY KEY NOT NULL ,
+ group_name varchar(255) NOT NULL DEFAULT '',
+ cat_id tinyint(2) NOT NULL DEFAULT '0',
+ allow_group INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ download_mode INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ upload_icon varchar(255) NOT NULL DEFAULT '',
+ max_filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ allowed_forums text(65535) NOT NULL DEFAULT '',
+ allow_in_pm INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_forums'
+CREATE TABLE phpbb_forums (
+ forum_id INTEGER PRIMARY KEY NOT NULL ,
+ parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_parents mediumtext(16777215) NOT NULL DEFAULT '',
+ forum_name text(65535) NOT NULL DEFAULT '',
+ forum_desc text(65535) NOT NULL DEFAULT '',
+ forum_desc_bitfield varchar(255) NOT NULL DEFAULT '',
+ forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
+ forum_desc_uid varchar(8) NOT NULL DEFAULT '',
+ forum_link varchar(255) NOT NULL DEFAULT '',
+ forum_password varchar(40) NOT NULL DEFAULT '',
+ forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_image varchar(255) NOT NULL DEFAULT '',
+ forum_rules text(65535) NOT NULL DEFAULT '',
+ forum_rules_link varchar(255) NOT NULL DEFAULT '',
+ forum_rules_bitfield varchar(255) NOT NULL DEFAULT '',
+ forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
+ forum_rules_uid varchar(8) NOT NULL DEFAULT '',
+ forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
+ forum_type tinyint(4) NOT NULL DEFAULT '0',
+ forum_status tinyint(4) NOT NULL DEFAULT '0',
+ forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_post_subject text(65535) NOT NULL DEFAULT '',
+ forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_last_poster_name varchar(255) NOT NULL DEFAULT '',
+ forum_last_poster_colour varchar(6) NOT NULL DEFAULT '',
+ forum_flags tinyint(4) NOT NULL DEFAULT '32',
+ forum_options INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ display_subforum_list INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_icons INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_prune INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_next INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_viewed INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
+CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
+
+# Table: 'phpbb_forums_access'
+CREATE TABLE phpbb_forums_access (
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_id char(32) NOT NULL DEFAULT '',
+ PRIMARY KEY (forum_id, user_id, session_id)
+);
+
+
+# Table: 'phpbb_forums_track'
+CREATE TABLE phpbb_forums_track (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, forum_id)
+);
+
+
+# Table: 'phpbb_forums_watch'
+CREATE TABLE phpbb_forums_watch (
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
+CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
+CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
+
+# Table: 'phpbb_groups'
+CREATE TABLE phpbb_groups (
+ group_id INTEGER PRIMARY KEY NOT NULL ,
+ group_type tinyint(4) NOT NULL DEFAULT '1',
+ group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_skip_auth INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_name varchar(255) NOT NULL DEFAULT '',
+ group_desc text(65535) NOT NULL DEFAULT '',
+ group_desc_bitfield varchar(255) NOT NULL DEFAULT '',
+ group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
+ group_desc_uid varchar(8) NOT NULL DEFAULT '',
+ group_display INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_avatar varchar(255) NOT NULL DEFAULT '',
+ group_avatar_type tinyint(2) NOT NULL DEFAULT '0',
+ group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_colour varchar(6) NOT NULL DEFAULT '',
+ group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_legend INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_teampage INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name);
+
+# Table: 'phpbb_icons'
+CREATE TABLE phpbb_icons (
+ icons_id INTEGER PRIMARY KEY NOT NULL ,
+ icons_url varchar(255) NOT NULL DEFAULT '',
+ icons_width tinyint(4) NOT NULL DEFAULT '0',
+ icons_height tinyint(4) NOT NULL DEFAULT '0',
+ icons_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
+
+# Table: 'phpbb_lang'
+CREATE TABLE phpbb_lang (
+ lang_id INTEGER PRIMARY KEY NOT NULL ,
+ lang_iso varchar(30) NOT NULL DEFAULT '',
+ lang_dir varchar(30) NOT NULL DEFAULT '',
+ lang_english_name varchar(100) NOT NULL DEFAULT '',
+ lang_local_name varchar(255) NOT NULL DEFAULT '',
+ lang_author varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
+
+# Table: 'phpbb_log'
+CREATE TABLE phpbb_log (
+ log_id INTEGER PRIMARY KEY NOT NULL ,
+ log_type tinyint(4) NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ reportee_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ log_ip varchar(40) NOT NULL DEFAULT '',
+ log_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ log_operation text(65535) NOT NULL DEFAULT '',
+ log_data mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
+CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
+CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
+CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
+CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
+CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
+
+# Table: 'phpbb_login_attempts'
+CREATE TABLE phpbb_login_attempts (
+ attempt_ip varchar(40) NOT NULL DEFAULT '',
+ attempt_browser varchar(150) NOT NULL DEFAULT '',
+ attempt_forwarded_for varchar(255) NOT NULL DEFAULT '',
+ attempt_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ username varchar(255) NOT NULL DEFAULT '0',
+ username_clean varchar(255) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_login_attempts_att_ip ON phpbb_login_attempts (attempt_ip, attempt_time);
+CREATE INDEX phpbb_login_attempts_att_for ON phpbb_login_attempts (attempt_forwarded_for, attempt_time);
+CREATE INDEX phpbb_login_attempts_att_time ON phpbb_login_attempts (attempt_time);
+CREATE INDEX phpbb_login_attempts_user_id ON phpbb_login_attempts (user_id);
+
+# Table: 'phpbb_moderator_cache'
+CREATE TABLE phpbb_moderator_cache (
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ username varchar(255) NOT NULL DEFAULT '',
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_name varchar(255) NOT NULL DEFAULT '',
+ display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
+CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
+
+# Table: 'phpbb_modules'
+CREATE TABLE phpbb_modules (
+ module_id INTEGER PRIMARY KEY NOT NULL ,
+ module_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ module_display INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ module_basename varchar(255) NOT NULL DEFAULT '',
+ module_class varchar(10) NOT NULL DEFAULT '',
+ parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ module_langname varchar(255) NOT NULL DEFAULT '',
+ module_mode varchar(255) NOT NULL DEFAULT '',
+ module_auth varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
+CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
+CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
+
+# Table: 'phpbb_poll_options'
+CREATE TABLE phpbb_poll_options (
+ poll_option_id tinyint(4) NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_option_text text(65535) NOT NULL DEFAULT '',
+ poll_option_total INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
+CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
+
+# Table: 'phpbb_poll_votes'
+CREATE TABLE phpbb_poll_votes (
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_option_id tinyint(4) NOT NULL DEFAULT '0',
+ vote_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ vote_user_ip varchar(40) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
+CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
+CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
+
+# Table: 'phpbb_posts'
+CREATE TABLE phpbb_posts (
+ post_id INTEGER PRIMARY KEY NOT NULL ,
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poster_ip varchar(40) NOT NULL DEFAULT '',
+ post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ post_username varchar(255) NOT NULL DEFAULT '',
+ post_subject text(65535) NOT NULL DEFAULT '',
+ post_text mediumtext(16777215) NOT NULL DEFAULT '',
+ post_checksum varchar(32) NOT NULL DEFAULT '',
+ post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
+ bbcode_uid varchar(8) NOT NULL DEFAULT '',
+ post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_edit_reason text(65535) NOT NULL DEFAULT '',
+ post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
+CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
+CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
+CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
+CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
+CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username);
+CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
+
+# Table: 'phpbb_privmsgs'
+CREATE TABLE phpbb_privmsgs (
+ msg_id INTEGER PRIMARY KEY NOT NULL ,
+ root_level INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ author_ip varchar(40) NOT NULL DEFAULT '',
+ message_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ message_subject text(65535) NOT NULL DEFAULT '',
+ message_text mediumtext(16777215) NOT NULL DEFAULT '',
+ message_edit_reason text(65535) NOT NULL DEFAULT '',
+ message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
+ bbcode_uid varchar(8) NOT NULL DEFAULT '',
+ message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ to_address text(65535) NOT NULL DEFAULT '',
+ bcc_address text(65535) NOT NULL DEFAULT '',
+ message_reported INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
+CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
+CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
+CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
+
+# Table: 'phpbb_privmsgs_folder'
+CREATE TABLE phpbb_privmsgs_folder (
+ folder_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ folder_name varchar(255) NOT NULL DEFAULT '',
+ pm_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
+
+# Table: 'phpbb_privmsgs_rules'
+CREATE TABLE phpbb_privmsgs_rules (
+ rule_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_check INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_connection INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_string varchar(255) NOT NULL DEFAULT '',
+ rule_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_action INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rule_folder_id int(11) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
+
+# Table: 'phpbb_privmsgs_to'
+CREATE TABLE phpbb_privmsgs_to (
+ msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_deleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ pm_unread INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ pm_replied INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_marked INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_forwarded INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ folder_id int(11) NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
+CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
+CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
+
+# Table: 'phpbb_profile_fields'
+CREATE TABLE phpbb_profile_fields (
+ field_id INTEGER PRIMARY KEY NOT NULL ,
+ field_name varchar(255) NOT NULL DEFAULT '',
+ field_type tinyint(4) NOT NULL DEFAULT '0',
+ field_ident varchar(20) NOT NULL DEFAULT '',
+ field_length varchar(20) NOT NULL DEFAULT '',
+ field_minlen varchar(255) NOT NULL DEFAULT '',
+ field_maxlen varchar(255) NOT NULL DEFAULT '',
+ field_novalue varchar(255) NOT NULL DEFAULT '',
+ field_default_value varchar(255) NOT NULL DEFAULT '',
+ field_validation varchar(20) NOT NULL DEFAULT '',
+ field_required INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_novalue INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_on_pm INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_active INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
+CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
+
+# Table: 'phpbb_profile_fields_data'
+CREATE TABLE phpbb_profile_fields_data (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id)
+);
+
+
+# Table: 'phpbb_profile_fields_lang'
+CREATE TABLE phpbb_profile_fields_lang (
+ field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ field_type tinyint(4) NOT NULL DEFAULT '0',
+ lang_value varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (field_id, lang_id, option_id)
+);
+
+
+# Table: 'phpbb_profile_lang'
+CREATE TABLE phpbb_profile_lang (
+ field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ lang_name varchar(255) NOT NULL DEFAULT '',
+ lang_explain text(65535) NOT NULL DEFAULT '',
+ lang_default_value varchar(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (field_id, lang_id)
+);
+
+
+# Table: 'phpbb_ranks'
+CREATE TABLE phpbb_ranks (
+ rank_id INTEGER PRIMARY KEY NOT NULL ,
+ rank_title varchar(255) NOT NULL DEFAULT '',
+ rank_min INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rank_special INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ rank_image varchar(255) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_reports'
+CREATE TABLE phpbb_reports (
+ report_id INTEGER PRIMARY KEY NOT NULL ,
+ reason_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ pm_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ report_text mediumtext(16777215) NOT NULL DEFAULT '',
+ reported_post_text mediumtext(16777215) NOT NULL DEFAULT ''
+);
+
+CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
+CREATE INDEX phpbb_reports_pm_id ON phpbb_reports (pm_id);
+
+# Table: 'phpbb_reports_reasons'
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INTEGER PRIMARY KEY NOT NULL ,
+ reason_title varchar(255) NOT NULL DEFAULT '',
+ reason_description mediumtext(16777215) NOT NULL DEFAULT '',
+ reason_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_search_results'
+CREATE TABLE phpbb_search_results (
+ search_key varchar(32) NOT NULL DEFAULT '',
+ search_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ search_keywords mediumtext(16777215) NOT NULL DEFAULT '',
+ search_authors mediumtext(16777215) NOT NULL DEFAULT '',
+ PRIMARY KEY (search_key)
+);
+
+
+# Table: 'phpbb_search_wordlist'
+CREATE TABLE phpbb_search_wordlist (
+ word_id INTEGER PRIMARY KEY NOT NULL ,
+ word_text varchar(255) NOT NULL DEFAULT '',
+ word_common INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ word_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
+CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
+
+# Table: 'phpbb_search_wordmatch'
+CREATE TABLE phpbb_search_wordmatch (
+ post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ word_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ title_match INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
+CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
+CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
+
+# Table: 'phpbb_sessions'
+CREATE TABLE phpbb_sessions (
+ session_id char(32) NOT NULL DEFAULT '',
+ session_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_last_visit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_ip varchar(40) NOT NULL DEFAULT '',
+ session_browser varchar(150) NOT NULL DEFAULT '',
+ session_forwarded_for varchar(255) NOT NULL DEFAULT '',
+ session_page varchar(255) NOT NULL DEFAULT '',
+ session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (session_id)
+);
+
+CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
+CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
+CREATE INDEX phpbb_sessions_session_fid ON phpbb_sessions (session_forum_id);
+
+# Table: 'phpbb_sessions_keys'
+CREATE TABLE phpbb_sessions_keys (
+ key_id char(32) NOT NULL DEFAULT '',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ last_ip varchar(40) NOT NULL DEFAULT '',
+ last_login INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (key_id, user_id)
+);
+
+CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
+
+# Table: 'phpbb_sitelist'
+CREATE TABLE phpbb_sitelist (
+ site_id INTEGER PRIMARY KEY NOT NULL ,
+ site_ip varchar(40) NOT NULL DEFAULT '',
+ site_hostname varchar(255) NOT NULL DEFAULT '',
+ ip_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_smilies'
+CREATE TABLE phpbb_smilies (
+ smiley_id INTEGER PRIMARY KEY NOT NULL ,
+ code varchar(50) NOT NULL DEFAULT '',
+ emotion varchar(50) NOT NULL DEFAULT '',
+ smiley_url varchar(50) NOT NULL DEFAULT '',
+ smiley_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ smiley_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ smiley_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
+
+# Table: 'phpbb_styles'
+CREATE TABLE phpbb_styles (
+ style_id INTEGER PRIMARY KEY NOT NULL ,
+ style_name varchar(255) NOT NULL DEFAULT '',
+ style_copyright varchar(255) NOT NULL DEFAULT '',
+ style_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ style_path varchar(100) NOT NULL DEFAULT '',
+ bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
+ style_parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ style_parent_tree text(65535) NOT NULL DEFAULT ''
+);
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
+
+# Table: 'phpbb_topics'
+CREATE TABLE phpbb_topics (
+ topic_id INTEGER PRIMARY KEY NOT NULL ,
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_title text(65535) NOT NULL DEFAULT '',
+ topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_status tinyint(3) NOT NULL DEFAULT '0',
+ topic_type tinyint(3) NOT NULL DEFAULT '0',
+ topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_first_poster_name varchar(255) NOT NULL DEFAULT '',
+ topic_first_poster_colour varchar(6) NOT NULL DEFAULT '',
+ topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_last_poster_name varchar(255) NOT NULL DEFAULT '',
+ topic_last_poster_colour varchar(6) NOT NULL DEFAULT '',
+ topic_last_post_subject text(65535) NOT NULL DEFAULT '',
+ topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_bumped INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_bumper INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_title text(65535) NOT NULL DEFAULT '',
+ poll_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_max_options tinyint(4) NOT NULL DEFAULT '1',
+ poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
+CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
+CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
+CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
+CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
+CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
+
+# Table: 'phpbb_topics_track'
+CREATE TABLE phpbb_topics_track (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, topic_id)
+);
+
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
+CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
+
+# Table: 'phpbb_topics_posted'
+CREATE TABLE phpbb_topics_posted (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_posted INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, topic_id)
+);
+
+
+# Table: 'phpbb_topics_watch'
+CREATE TABLE phpbb_topics_watch (
+ topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
+CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
+CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
+
+# Table: 'phpbb_user_group'
+CREATE TABLE phpbb_user_group (
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ group_leader INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_pending INTEGER UNSIGNED NOT NULL DEFAULT '1'
+);
+
+CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
+CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
+CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
+
+# Table: 'phpbb_users'
+CREATE TABLE phpbb_users (
+ user_id INTEGER PRIMARY KEY NOT NULL ,
+ user_type tinyint(2) NOT NULL DEFAULT '0',
+ group_id INTEGER UNSIGNED NOT NULL DEFAULT '3',
+ user_permissions mediumtext(16777215) NOT NULL DEFAULT '',
+ user_perm_from INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_ip varchar(40) NOT NULL DEFAULT '',
+ user_regdate INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ username varchar(255) NOT NULL DEFAULT '',
+ username_clean varchar(255) NOT NULL DEFAULT '',
+ user_password varchar(40) NOT NULL DEFAULT '',
+ user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_email varchar(100) NOT NULL DEFAULT '',
+ user_email_hash bigint(20) NOT NULL DEFAULT '0',
+ user_birthday varchar(10) NOT NULL DEFAULT '',
+ user_lastvisit INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lastmark INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lastpost_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lastpage varchar(200) NOT NULL DEFAULT '',
+ user_last_confirm_key varchar(10) NOT NULL DEFAULT '',
+ user_last_search INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_warnings tinyint(4) NOT NULL DEFAULT '0',
+ user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_login_attempts tinyint(4) NOT NULL DEFAULT '0',
+ user_inactive_reason tinyint(2) NOT NULL DEFAULT '0',
+ user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_lang varchar(30) NOT NULL DEFAULT '',
+ user_timezone varchar(100) NOT NULL DEFAULT 'UTC',
+ user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i',
+ user_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_colour varchar(6) NOT NULL DEFAULT '',
+ user_new_privmsg int(4) NOT NULL DEFAULT '0',
+ user_unread_privmsg int(4) NOT NULL DEFAULT '0',
+ user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_full_folder int(11) NOT NULL DEFAULT '-3',
+ user_emailtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_topic_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't',
+ user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd',
+ user_post_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_post_sortby_type varchar(1) NOT NULL DEFAULT 't',
+ user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a',
+ user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_notify_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_notify_type tinyint(4) NOT NULL DEFAULT '0',
+ user_allow_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_options INTEGER UNSIGNED NOT NULL DEFAULT '230271',
+ user_avatar varchar(255) NOT NULL DEFAULT '',
+ user_avatar_type tinyint(2) NOT NULL DEFAULT '0',
+ user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ user_sig mediumtext(16777215) NOT NULL DEFAULT '',
+ user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '',
+ user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
+ user_from varchar(100) NOT NULL DEFAULT '',
+ user_icq varchar(15) NOT NULL DEFAULT '',
+ user_aim varchar(255) NOT NULL DEFAULT '',
+ user_yim varchar(255) NOT NULL DEFAULT '',
+ user_msnm varchar(255) NOT NULL DEFAULT '',
+ user_jabber varchar(255) NOT NULL DEFAULT '',
+ user_website varchar(200) NOT NULL DEFAULT '',
+ user_occ text(65535) NOT NULL DEFAULT '',
+ user_interests text(65535) NOT NULL DEFAULT '',
+ user_actkey varchar(32) NOT NULL DEFAULT '',
+ user_newpasswd varchar(40) NOT NULL DEFAULT '',
+ user_form_salt varchar(32) NOT NULL DEFAULT '',
+ user_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
+ user_reminded tinyint(4) NOT NULL DEFAULT '0',
+ user_reminded_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
+CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
+CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
+CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
+
+# Table: 'phpbb_warnings'
+CREATE TABLE phpbb_warnings (
+ warning_id INTEGER PRIMARY KEY NOT NULL ,
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ log_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ warning_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
+);
+
+
+# Table: 'phpbb_words'
+CREATE TABLE phpbb_words (
+ word_id INTEGER PRIMARY KEY NOT NULL ,
+ word varchar(255) NOT NULL DEFAULT '',
+ replacement varchar(255) NOT NULL DEFAULT ''
+);
+
+
+# Table: 'phpbb_zebra'
+CREATE TABLE phpbb_zebra (
+ user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ zebra_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ friend INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ foe INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ PRIMARY KEY (user_id, zebra_id)
+);
|