diff options
Diffstat (limited to 'phpBB/install/schemas/postgres_schema.sql')
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 282 |
1 files changed, 169 insertions, 113 deletions
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 0a05a7cd75..36eaddbb78 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -270,6 +270,16 @@ CREATE TABLE phpbb_config ( CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic); /* + Table: 'phpbb_config_text' +*/ +CREATE TABLE phpbb_config_text ( + config_name varchar(255) DEFAULT '' NOT NULL, + config_value TEXT DEFAULT '' NOT NULL, + PRIMARY KEY (config_name) +); + + +/* Table: 'phpbb_confirm' */ CREATE TABLE phpbb_confirm ( @@ -315,6 +325,17 @@ CREATE TABLE phpbb_drafts ( 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; @@ -363,7 +384,7 @@ CREATE TABLE phpbb_forums ( 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_password varchar(255) 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, @@ -374,9 +395,12 @@ CREATE TABLE phpbb_forums ( 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_posts_approved INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_approved >= 0), + forum_posts_unapproved INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_unapproved >= 0), + forum_posts_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_softdeleted >= 0), + forum_topics_approved INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_approved >= 0), + forum_topics_unapproved INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_unapproved >= 0), + forum_topics_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_softdeleted >= 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, @@ -452,7 +476,7 @@ CREATE TABLE phpbb_groups ( 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_type varchar(255) DEFAULT '' 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), @@ -461,7 +485,7 @@ CREATE TABLE phpbb_groups ( 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 INT2 DEFAULT '1' NOT NULL CHECK (group_legend >= 0), + group_legend INT4 DEFAULT '0' NOT NULL CHECK (group_legend >= 0), PRIMARY KEY (group_id) ); @@ -521,6 +545,7 @@ CREATE TABLE phpbb_log ( ); 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); @@ -560,6 +585,21 @@ CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id); /* + Table: 'phpbb_migrations' +*/ +CREATE TABLE phpbb_migrations ( + migration_name varchar(255) DEFAULT '' NOT NULL, + migration_depends_on varchar(8000) DEFAULT '' NOT NULL, + migration_schema_done INT2 DEFAULT '0' NOT NULL CHECK (migration_schema_done >= 0), + migration_data_done INT2 DEFAULT '0' NOT NULL CHECK (migration_data_done >= 0), + migration_data_state varchar(8000) DEFAULT '' NOT NULL, + migration_start_time INT4 DEFAULT '0' NOT NULL CHECK (migration_start_time >= 0), + migration_end_time INT4 DEFAULT '0' NOT NULL CHECK (migration_end_time >= 0), + PRIMARY KEY (migration_name) +); + + +/* Table: 'phpbb_modules' */ CREATE SEQUENCE phpbb_modules_seq; @@ -584,6 +624,64 @@ 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_notification_types' +*/ +CREATE SEQUENCE phpbb_notification_types_seq; + +CREATE TABLE phpbb_notification_types ( + notification_type_id INT2 DEFAULT nextval('phpbb_notification_types_seq'), + notification_type_name varchar(255) DEFAULT '' NOT NULL, + notification_type_enabled INT2 DEFAULT '1' NOT NULL CHECK (notification_type_enabled >= 0), + PRIMARY KEY (notification_type_id) +); + +CREATE UNIQUE INDEX phpbb_notification_types_type ON phpbb_notification_types (notification_type_name); + +/* + Table: 'phpbb_notifications' +*/ +CREATE SEQUENCE phpbb_notifications_seq; + +CREATE TABLE phpbb_notifications ( + notification_id INT4 DEFAULT nextval('phpbb_notifications_seq'), + notification_type_id INT2 DEFAULT '0' NOT NULL CHECK (notification_type_id >= 0), + item_id INT4 DEFAULT '0' NOT NULL CHECK (item_id >= 0), + item_parent_id INT4 DEFAULT '0' NOT NULL CHECK (item_parent_id >= 0), + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + notification_read INT2 DEFAULT '0' NOT NULL CHECK (notification_read >= 0), + notification_time INT4 DEFAULT '1' NOT NULL CHECK (notification_time >= 0), + notification_data varchar(4000) DEFAULT '' NOT NULL, + PRIMARY KEY (notification_id) +); + +CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id); +CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read); + +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE phpbb_oauth_accounts ( + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + provider varchar(255) DEFAULT '' NOT NULL, + oauth_provider_id varchar(4000) DEFAULT '' NOT NULL, + PRIMARY KEY (user_id, provider) +); + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE phpbb_oauth_tokens ( + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + session_id char(32) DEFAULT '' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_token TEXT DEFAULT '' NOT NULL +); + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); + +/* Table: 'phpbb_poll_options' */ CREATE TABLE phpbb_poll_options ( @@ -623,7 +721,7 @@ CREATE TABLE phpbb_posts ( 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_visibility INT2 DEFAULT '0' NOT NULL, 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), @@ -642,6 +740,9 @@ CREATE TABLE phpbb_posts ( 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), + post_delete_time INT4 DEFAULT '0' NOT NULL CHECK (post_delete_time >= 0), + post_delete_reason varchar(255) DEFAULT '' NOT NULL, + post_delete_user INT4 DEFAULT '0' NOT NULL CHECK (post_delete_user >= 0), PRIMARY KEY (post_id) ); @@ -649,7 +750,7 @@ 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_visibility ON phpbb_posts (post_visibility); 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); @@ -752,7 +853,7 @@ 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_type varchar(100) DEFAULT '' NOT NULL, field_ident varchar(20) DEFAULT '' NOT NULL, field_length varchar(20) DEFAULT '' NOT NULL, field_minlen varchar(255) DEFAULT '' NOT NULL, @@ -763,12 +864,17 @@ CREATE TABLE phpbb_profile_fields ( 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_on_ml INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_ml >= 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), + field_is_contact INT2 DEFAULT '0' NOT NULL CHECK (field_is_contact >= 0), + field_contact_desc varchar(255) DEFAULT '' NOT NULL, + field_contact_url varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id) ); @@ -780,6 +886,14 @@ CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order) */ CREATE TABLE phpbb_profile_fields_data ( user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_interests varchar(4000) DEFAULT '' NOT NULL, + pf_phpbb_occupation varchar(4000) DEFAULT '' NOT NULL, + pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_wlm varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_yahoo varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -791,7 +905,7 @@ 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, + field_type varchar(100) DEFAULT '' NOT NULL, lang_value varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (field_id, lang_id, option_id) ); @@ -840,6 +954,12 @@ CREATE TABLE phpbb_reports ( 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, + reported_post_uid varchar(8) DEFAULT '' NOT NULL, + reported_post_bitfield varchar(255) DEFAULT '' NOT NULL, + reported_post_enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_magic_url >= 0), + reported_post_enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_smilies >= 0), + reported_post_enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_bbcode >= 0), PRIMARY KEY (report_id) ); @@ -981,100 +1101,29 @@ CREATE TABLE phpbb_styles ( 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), - template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), - theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0), - imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 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); -CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id); -CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id); -CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id); - -/* - Table: 'phpbb_styles_template' -*/ -CREATE SEQUENCE phpbb_styles_template_seq; - -CREATE TABLE phpbb_styles_template ( - template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'), - template_name varchar(255) DEFAULT '' NOT NULL, - template_copyright varchar(255) DEFAULT '' NOT NULL, - template_path varchar(100) DEFAULT '' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, - template_storedb INT2 DEFAULT '0' NOT NULL CHECK (template_storedb >= 0), - template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0), - template_inherit_path varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (template_id) -); - -CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); - -/* - Table: 'phpbb_styles_template_data' -*/ -CREATE TABLE phpbb_styles_template_data ( - template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), - template_filename varchar(100) DEFAULT '' NOT NULL, - template_included varchar(8000) DEFAULT '' NOT NULL, - template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0), - template_data TEXT DEFAULT '' NOT NULL -); - -CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id); -CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename); - -/* - Table: 'phpbb_styles_theme' -*/ -CREATE SEQUENCE phpbb_styles_theme_seq; - -CREATE TABLE phpbb_styles_theme ( - theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'), - theme_name varchar(255) DEFAULT '' NOT NULL, - theme_copyright varchar(255) DEFAULT '' NOT NULL, - theme_path varchar(100) DEFAULT '' NOT NULL, - theme_storedb INT2 DEFAULT '0' NOT NULL CHECK (theme_storedb >= 0), - theme_mtime INT4 DEFAULT '0' NOT NULL CHECK (theme_mtime >= 0), - theme_data TEXT DEFAULT '' NOT NULL, - PRIMARY KEY (theme_id) -); - -CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name); - -/* - Table: 'phpbb_styles_imageset' -*/ -CREATE SEQUENCE phpbb_styles_imageset_seq; - -CREATE TABLE phpbb_styles_imageset ( - imageset_id INT4 DEFAULT nextval('phpbb_styles_imageset_seq'), - imageset_name varchar(255) DEFAULT '' NOT NULL, - imageset_copyright varchar(255) DEFAULT '' NOT NULL, - imageset_path varchar(100) DEFAULT '' NOT NULL, - PRIMARY KEY (imageset_id) -); - -CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name); /* - Table: 'phpbb_styles_imageset_data' + Table: 'phpbb_teampage' */ -CREATE SEQUENCE phpbb_styles_imageset_data_seq; +CREATE SEQUENCE phpbb_teampage_seq; -CREATE TABLE phpbb_styles_imageset_data ( - image_id INT4 DEFAULT nextval('phpbb_styles_imageset_data_seq'), - image_name varchar(200) DEFAULT '' NOT NULL, - image_filename varchar(200) DEFAULT '' NOT NULL, - image_lang varchar(30) DEFAULT '' NOT NULL, - image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0), - image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0), - imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), - PRIMARY KEY (image_id) +CREATE TABLE phpbb_teampage ( + teampage_id INT4 DEFAULT nextval('phpbb_teampage_seq'), + group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0), + teampage_name varchar(255) DEFAULT '' NOT NULL, + teampage_position INT4 DEFAULT '0' NOT NULL CHECK (teampage_position >= 0), + teampage_parent INT4 DEFAULT '0' NOT NULL CHECK (teampage_parent >= 0), + PRIMARY KEY (teampage_id) ); -CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id); /* Table: 'phpbb_topics' @@ -1086,15 +1135,16 @@ CREATE TABLE phpbb_topics ( 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_visibility INT2 DEFAULT '0' NOT NULL, 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_posts_approved INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_approved >= 0), + topic_posts_unapproved INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_unapproved >= 0), + topic_posts_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_softdeleted >= 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), @@ -1116,14 +1166,17 @@ CREATE TABLE phpbb_topics ( 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), + topic_delete_time INT4 DEFAULT '0' NOT NULL CHECK (topic_delete_time >= 0), + topic_delete_reason varchar(255) DEFAULT '' NOT NULL, + topic_delete_user INT4 DEFAULT '0' NOT NULL CHECK (topic_delete_user >= 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_topic_visibility ON phpbb_topics (topic_visibility); +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); /* @@ -1165,6 +1218,18 @@ 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_notifications' +*/ +CREATE TABLE phpbb_user_notifications ( + item_type varchar(255) DEFAULT '' NOT NULL, + item_id INT4 DEFAULT '0' NOT NULL CHECK (item_id >= 0), + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + method varchar(255) DEFAULT '' NOT NULL, + notify INT2 DEFAULT '1' NOT NULL CHECK (notify >= 0) +); + + +/* Table: 'phpbb_user_group' */ CREATE TABLE phpbb_user_group ( @@ -1193,9 +1258,11 @@ CREATE TABLE phpbb_users ( 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_password varchar(255) 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_actkey varchar(32) DEFAULT '' NOT NULL, + user_newpasswd varchar(255) DEFAULT '' NOT NULL, user_email varchar(100) DEFAULT '' NOT NULL, user_email_hash INT8 DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, @@ -1212,8 +1279,7 @@ CREATE TABLE phpbb_users ( 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 decimal(5,2) DEFAULT '0' NOT NULL, - user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0), + 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), @@ -1239,23 +1305,13 @@ CREATE TABLE phpbb_users ( 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_type varchar(255) DEFAULT '' 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, |