diff options
-rw-r--r-- | phpBB/develop/create_schema_files.php | 4 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 261 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 306 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 206 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 202 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 304 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 218 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 198 |
8 files changed, 792 insertions, 907 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 890a113f3f..787e620a32 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -31,7 +31,7 @@ $finder = $finder $db_tools = new \phpbb\db\tools($db, true); $schema_generator = new \phpbb\db\migration\schema_generator($finder, $config, $db, $db_tools, $phpbb_root_path, $phpEx, $table_prefix); -$schema_data = $schema_generator->get_schema(); +$original_schema_data = $schema_generator->get_schema(); $dbms_type_map = phpbb\db\tools::get_dbms_type_map(); // A list of types being unsigned for better reference in some db's @@ -40,7 +40,7 @@ $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', ' foreach ($supported_dbms as $dbms) { - include(dirname(__FILE__) . '/../includes/db/schema_data.php'); + $schema_data = $original_schema_data; if ($dbms == 'mssql') { foreach ($schema_data as $table_name => $table_data) diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 3782fc66ff..cf60646586 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -4,44 +4,6 @@ # 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, @@ -128,6 +90,44 @@ 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_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_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER NOT NULL, @@ -300,27 +300,6 @@ CREATE TABLE phpbb_ext ( 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, @@ -348,6 +327,27 @@ BEGIN END;; +# 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_forums' CREATE TABLE phpbb_forums ( forum_id INTEGER NOT NULL, @@ -361,7 +361,7 @@ CREATE TABLE phpbb_forums ( 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(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + forum_password VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, 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, @@ -372,12 +372,6 @@ CREATE TABLE phpbb_forums ( 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_approved INTEGER DEFAULT 0 NOT NULL, - forum_posts_unapproved INTEGER DEFAULT 0 NOT NULL, - forum_posts_softdeleted INTEGER DEFAULT 0 NOT NULL, - forum_topics_approved INTEGER DEFAULT 0 NOT NULL, - forum_topics_unapproved INTEGER DEFAULT 0 NOT NULL, - forum_topics_softdeleted 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, @@ -385,8 +379,6 @@ CREATE TABLE phpbb_forums ( 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, @@ -394,7 +386,15 @@ CREATE TABLE phpbb_forums ( 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 + prune_freq INTEGER DEFAULT 0 NOT NULL, + display_subforum_list INTEGER DEFAULT 1 NOT NULL, + forum_options INTEGER DEFAULT 0 NOT NULL, + forum_posts_approved INTEGER DEFAULT 0 NOT NULL, + forum_posts_unapproved INTEGER DEFAULT 0 NOT NULL, + forum_posts_softdeleted INTEGER DEFAULT 0 NOT NULL, + forum_topics_approved INTEGER DEFAULT 0 NOT NULL, + forum_topics_unapproved INTEGER DEFAULT 0 NOT NULL, + forum_topics_softdeleted INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_forums ADD PRIMARY KEY (forum_id);; @@ -449,7 +449,6 @@ 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, @@ -465,8 +464,9 @@ CREATE TABLE phpbb_groups ( 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_legend INTEGER DEFAULT 0 NOT NULL, group_max_recipients INTEGER DEFAULT 0 NOT NULL, - group_legend INTEGER DEFAULT 0 NOT NULL + group_skip_auth INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_groups ADD PRIMARY KEY (group_id);; @@ -551,7 +551,6 @@ CREATE TABLE phpbb_log ( 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);; @@ -597,20 +596,6 @@ CREATE TABLE phpbb_moderator_cache ( 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_migrations' -CREATE TABLE phpbb_migrations ( - migration_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - migration_depends_on BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, - migration_schema_done INTEGER DEFAULT 0 NOT NULL, - migration_data_done INTEGER DEFAULT 0 NOT NULL, - migration_data_state BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, - migration_start_time INTEGER DEFAULT 0 NOT NULL, - migration_end_time INTEGER DEFAULT 0 NOT NULL -);; - -ALTER TABLE phpbb_migrations ADD PRIMARY KEY (migration_name);; - - # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id INTEGER NOT NULL, @@ -746,7 +731,6 @@ CREATE TABLE phpbb_posts ( 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_visibility INTEGER DEFAULT 0 NOT NULL, post_reported INTEGER DEFAULT 0 NOT NULL, enable_bbcode INTEGER DEFAULT 1 NOT NULL, enable_smilies INTEGER DEFAULT 1 NOT NULL, @@ -765,6 +749,7 @@ CREATE TABLE phpbb_posts ( post_edit_user INTEGER DEFAULT 0 NOT NULL, post_edit_count INTEGER DEFAULT 0 NOT NULL, post_edit_locked INTEGER DEFAULT 0 NOT NULL, + post_visibility INTEGER DEFAULT 0 NOT NULL, post_delete_time INTEGER DEFAULT 0 NOT NULL, post_delete_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, post_delete_user INTEGER DEFAULT 0 NOT NULL @@ -776,9 +761,9 @@ 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_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);; +CREATE INDEX phpbb_posts_post_username ON phpbb_posts(post_username:255);; +CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts(post_visibility);; CREATE GENERATOR phpbb_posts_gen;; SET GENERATOR phpbb_posts_gen TO 0;; @@ -917,16 +902,16 @@ CREATE TABLE phpbb_profile_fields ( 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_on_ml 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, + field_show_profile INTEGER DEFAULT 0 NOT NULL, + field_show_on_vt INTEGER DEFAULT 0 NOT NULL, + field_show_novalue INTEGER DEFAULT 0 NOT NULL, + field_show_on_pm INTEGER DEFAULT 0 NOT NULL, + field_show_on_ml INTEGER DEFAULT 0 NOT NULL, field_is_contact INTEGER DEFAULT 0 NOT NULL, field_contact_desc VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, field_contact_url VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL @@ -951,14 +936,14 @@ END;; # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id INTEGER DEFAULT 0 NOT NULL, - pf_phpbb_location VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, - pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, + pf_phpbb_interests BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_occupation BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL, pf_phpbb_icq VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - pf_phpbb_aol VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_location VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + pf_phpbb_website VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, pf_phpbb_wlm VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, pf_phpbb_yahoo VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - pf_phpbb_website VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL + pf_phpbb_aol VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields_data ADD PRIMARY KEY (user_id);; @@ -1016,18 +1001,18 @@ 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, + pm_id INTEGER DEFAULT 0 NOT NULL, + reported_post_enable_bbcode INTEGER DEFAULT 1 NOT NULL, + reported_post_enable_smilies INTEGER DEFAULT 1 NOT NULL, + reported_post_enable_magic_url INTEGER DEFAULT 1 NOT NULL, reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL, - reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - reported_post_enable_magic_url INTEGER DEFAULT 1 NOT NULL, - reported_post_enable_smilies INTEGER DEFAULT 1 NOT NULL, - reported_post_enable_bbcode INTEGER DEFAULT 1 NOT NULL + reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);; @@ -1118,7 +1103,6 @@ CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);; 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, @@ -1128,7 +1112,8 @@ CREATE TABLE phpbb_sessions ( 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 + session_admin INTEGER DEFAULT 0 NOT NULL, + session_forum_id INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_sessions ADD PRIMARY KEY (session_id);; @@ -1254,16 +1239,12 @@ CREATE TABLE phpbb_topics ( forum_id INTEGER DEFAULT 0 NOT NULL, icon_id INTEGER DEFAULT 0 NOT NULL, topic_attachment INTEGER DEFAULT 0 NOT NULL, - topic_visibility INTEGER DEFAULT 0 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_posts_approved INTEGER DEFAULT 0 NOT NULL, - topic_posts_unapproved INTEGER DEFAULT 0 NOT NULL, - topic_posts_softdeleted 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, @@ -1285,9 +1266,13 @@ CREATE TABLE phpbb_topics ( poll_max_options INTEGER DEFAULT 1 NOT NULL, poll_last_vote INTEGER DEFAULT 0 NOT NULL, poll_vote_change INTEGER DEFAULT 0 NOT NULL, + topic_visibility INTEGER DEFAULT 0 NOT NULL, topic_delete_time INTEGER DEFAULT 0 NOT NULL, topic_delete_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - topic_delete_user INTEGER DEFAULT 0 NOT NULL + topic_delete_user INTEGER DEFAULT 0 NOT NULL, + topic_posts_approved INTEGER DEFAULT 0 NOT NULL, + topic_posts_unapproved INTEGER DEFAULT 0 NOT NULL, + topic_posts_softdeleted INTEGER DEFAULT 0 NOT NULL );; ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);; @@ -1295,9 +1280,9 @@ 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_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);; +CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics(topic_visibility);; +CREATE INDEX phpbb_topics_forum_vis_last ON phpbb_topics(forum_id, topic_visibility, topic_last_post_id);; CREATE GENERATOR phpbb_topics_gen;; SET GENERATOR phpbb_topics_gen TO 0;; @@ -1310,28 +1295,28 @@ BEGIN END;; -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( +# Table: 'phpbb_topics_posted' +CREATE TABLE phpbb_topics_posted ( 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 + topic_posted INTEGER DEFAULT 0 NOT NULL );; -ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);; +ALTER TABLE phpbb_topics_posted 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 ( +# Table: 'phpbb_topics_track' +CREATE TABLE phpbb_topics_track ( user_id INTEGER DEFAULT 0 NOT NULL, topic_id INTEGER DEFAULT 0 NOT NULL, - topic_posted INTEGER DEFAULT 0 NOT NULL + forum_id INTEGER DEFAULT 0 NOT NULL, + mark_time INTEGER DEFAULT 0 NOT NULL );; -ALTER TABLE phpbb_topics_posted ADD PRIMARY KEY (user_id, topic_id);; +ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);; +CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);; +CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);; # Table: 'phpbb_topics_watch' CREATE TABLE phpbb_topics_watch ( @@ -1344,16 +1329,6 @@ 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_notifications' -CREATE TABLE phpbb_user_notifications ( - item_type VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - item_id INTEGER DEFAULT 0 NOT NULL, - user_id INTEGER DEFAULT 0 NOT NULL, - method VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - notify INTEGER DEFAULT 1 NOT NULL -);; - - # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id INTEGER DEFAULT 0 NOT NULL, @@ -1366,6 +1341,16 @@ 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_user_notifications' +CREATE TABLE phpbb_user_notifications ( + item_type VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + item_id INTEGER DEFAULT 0 NOT NULL, + user_id INTEGER DEFAULT 0 NOT NULL, + method VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + notify INTEGER DEFAULT 1 NOT NULL +);; + + # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id INTEGER NOT NULL, @@ -1377,11 +1362,9 @@ CREATE TABLE phpbb_users ( 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(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + user_password VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, user_passchg INTEGER DEFAULT 0 NOT NULL, user_pass_convert INTEGER DEFAULT 0 NOT NULL, - user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - user_newpasswd VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, 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, @@ -1398,7 +1381,7 @@ CREATE TABLE phpbb_users ( 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_timezone VARCHAR(100) CHARACTER SET NONE DEFAULT '' 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, @@ -1431,6 +1414,8 @@ CREATE TABLE phpbb_users ( 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_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, + user_newpasswd VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, 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, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index d8d414a4c2..b7bfe3ade6 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -7,50 +7,6 @@ */ /* - 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 -)GO - -ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED - ( - [attach_id] - ) -GO - -CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) -GO - -CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) -GO - -CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) -GO - -CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) -GO - -CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) -GO - - -/* Table: 'phpbb_acl_groups' */ CREATE TABLE [phpbb_acl_groups] ( @@ -177,6 +133,50 @@ GO /* + 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 +)GO + +ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_attachments] PRIMARY KEY CLUSTERED + ( + [attach_id] + ) +GO + +CREATE INDEX [filetime] ON [phpbb_attachments]([filetime]) +GO + +CREATE INDEX [post_msg_id] ON [phpbb_attachments]([post_msg_id]) +GO + +CREATE INDEX [topic_id] ON [phpbb_attachments]([topic_id]) +GO + +CREATE INDEX [poster_id] ON [phpbb_attachments]([poster_id]) +GO + +CREATE INDEX [is_orphan] ON [phpbb_attachments]([is_orphan]) +GO + + +/* Table: 'phpbb_banlist' */ CREATE TABLE [phpbb_banlist] ( @@ -400,23 +400,6 @@ 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 -)GO - -ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED - ( - [extension_id] - ) -GO - - -/* Table: 'phpbb_extension_groups' */ CREATE TABLE [phpbb_extension_groups] ( @@ -440,6 +423,23 @@ 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 +)GO + +ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED + ( + [extension_id] + ) +GO + + +/* Table: 'phpbb_forums' */ CREATE TABLE [phpbb_forums] ( @@ -465,12 +465,6 @@ CREATE TABLE [phpbb_forums] ( [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_approved] [int] DEFAULT (0) NOT NULL , - [forum_posts_unapproved] [int] DEFAULT (0) NOT NULL , - [forum_posts_softdeleted] [int] DEFAULT (0) NOT NULL , - [forum_topics_approved] [int] DEFAULT (0) NOT NULL , - [forum_topics_unapproved] [int] DEFAULT (0) NOT NULL , - [forum_topics_softdeleted] [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 , @@ -478,8 +472,6 @@ CREATE TABLE [phpbb_forums] ( [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 , @@ -487,7 +479,15 @@ CREATE TABLE [phpbb_forums] ( [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 + [prune_freq] [int] DEFAULT (0) NOT NULL , + [display_subforum_list] [int] DEFAULT (1) NOT NULL , + [forum_options] [int] DEFAULT (0) NOT NULL , + [forum_posts_approved] [int] DEFAULT (0) NOT NULL , + [forum_posts_unapproved] [int] DEFAULT (0) NOT NULL , + [forum_posts_softdeleted] [int] DEFAULT (0) NOT NULL , + [forum_topics_approved] [int] DEFAULT (0) NOT NULL , + [forum_topics_unapproved] [int] DEFAULT (0) NOT NULL , + [forum_topics_softdeleted] [int] DEFAULT (0) NOT NULL )GO ALTER TABLE [phpbb_forums] WITH NOCHECK ADD @@ -575,7 +575,6 @@ 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 , @@ -591,8 +590,9 @@ CREATE TABLE [phpbb_groups] ( [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_legend] [int] DEFAULT (0) NOT NULL , [group_max_recipients] [int] DEFAULT (0) NOT NULL , - [group_legend] [int] DEFAULT (0) NOT NULL + [group_skip_auth] [int] DEFAULT (0) NOT NULL )GO ALTER TABLE [phpbb_groups] WITH NOCHECK ADD @@ -678,9 +678,6 @@ GO CREATE INDEX [log_type] ON [phpbb_log]([log_type]) GO -CREATE INDEX [log_time] ON [phpbb_log]([log_time]) -GO - CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) GO @@ -756,27 +753,6 @@ GO /* - 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] [int] DEFAULT (0) NOT NULL , - [migration_data_done] [int] DEFAULT (0) NOT NULL , - [migration_data_state] [varchar] (8000) DEFAULT ('') NOT NULL , - [migration_start_time] [int] DEFAULT (0) NOT NULL , - [migration_end_time] [int] DEFAULT (0) NOT NULL -)GO - -ALTER TABLE [phpbb_migrations] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_migrations] PRIMARY KEY CLUSTERED - ( - [migration_name] - ) -GO - - -/* Table: 'phpbb_modules' */ CREATE TABLE [phpbb_modules] ( @@ -965,7 +941,6 @@ CREATE TABLE [phpbb_posts] ( [icon_id] [int] DEFAULT (0) NOT NULL , [poster_ip] [varchar] (40) DEFAULT ('') NOT NULL , [post_time] [int] DEFAULT (0) NOT NULL , - [post_visibility] [int] DEFAULT (0) NOT NULL , [post_reported] [int] DEFAULT (0) NOT NULL , [enable_bbcode] [int] DEFAULT (1) NOT NULL , [enable_smilies] [int] DEFAULT (1) NOT NULL , @@ -984,6 +959,7 @@ CREATE TABLE [phpbb_posts] ( [post_edit_user] [int] DEFAULT (0) NOT NULL , [post_edit_count] [int] DEFAULT (0) NOT NULL , [post_edit_locked] [int] DEFAULT (0) NOT NULL , + [post_visibility] [int] DEFAULT (0) NOT NULL , [post_delete_time] [int] DEFAULT (0) NOT NULL , [post_delete_reason] [varchar] (255) DEFAULT ('') NOT NULL , [post_delete_user] [int] DEFAULT (0) NOT NULL @@ -1008,13 +984,13 @@ GO CREATE INDEX [poster_id] ON [phpbb_posts]([poster_id]) GO -CREATE INDEX [post_visibility] ON [phpbb_posts]([post_visibility]) +CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) GO -CREATE INDEX [post_username] ON [phpbb_posts]([post_username]) +CREATE INDEX [post_username] ON [phpbb_posts]([post_username:255]) GO -CREATE INDEX [tid_post_time] ON [phpbb_posts]([topic_id], [post_time]) +CREATE INDEX [post_visibility] ON [phpbb_posts]([post_visibility]) GO @@ -1162,16 +1138,16 @@ CREATE TABLE [phpbb_profile_fields] ( [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_on_ml] [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 , + [field_show_profile] [int] DEFAULT (0) NOT NULL , + [field_show_on_vt] [int] DEFAULT (0) NOT NULL , + [field_show_novalue] [int] DEFAULT (0) NOT NULL , + [field_show_on_pm] [int] DEFAULT (0) NOT NULL , + [field_show_on_ml] [int] DEFAULT (0) NOT NULL , [field_is_contact] [int] DEFAULT (0) NOT NULL , [field_contact_desc] [varchar] (255) DEFAULT ('') NOT NULL , [field_contact_url] [varchar] (255) DEFAULT ('') NOT NULL @@ -1196,14 +1172,14 @@ GO */ CREATE TABLE [phpbb_profile_fields_data] ( [user_id] [int] DEFAULT (0) NOT NULL , - [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_interests] [text] DEFAULT ('') NOT NULL , + [pf_phpbb_occupation] [text] DEFAULT ('') NOT NULL , [pf_phpbb_icq] [varchar] (255) DEFAULT ('') NOT NULL , - [pf_phpbb_aol] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_location] [varchar] (255) DEFAULT ('') NOT NULL , + [pf_phpbb_website] [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 + [pf_phpbb_aol] [varchar] (255) DEFAULT ('') NOT NULL )GO ALTER TABLE [phpbb_profile_fields_data] WITH NOCHECK ADD @@ -1281,18 +1257,18 @@ 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 , + [pm_id] [int] DEFAULT (0) NOT NULL , + [reported_post_enable_bbcode] [int] DEFAULT (1) NOT NULL , + [reported_post_enable_smilies] [int] DEFAULT (1) NOT NULL , + [reported_post_enable_magic_url] [int] DEFAULT (1) 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] [int] DEFAULT (1) NOT NULL , - [reported_post_enable_smilies] [int] DEFAULT (1) NOT NULL , - [reported_post_enable_bbcode] [int] DEFAULT (1) NOT NULL + [reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL )GO ALTER TABLE [phpbb_reports] WITH NOCHECK ADD @@ -1402,7 +1378,6 @@ GO 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 , @@ -1412,7 +1387,8 @@ CREATE TABLE [phpbb_sessions] ( [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 + [session_admin] [int] DEFAULT (0) NOT NULL , + [session_forum_id] [int] DEFAULT (0) NOT NULL )GO ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD @@ -1549,16 +1525,12 @@ CREATE TABLE [phpbb_topics] ( [forum_id] [int] DEFAULT (0) NOT NULL , [icon_id] [int] DEFAULT (0) NOT NULL , [topic_attachment] [int] DEFAULT (0) NOT NULL , - [topic_visibility] [int] DEFAULT (0) 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_posts_approved] [int] DEFAULT (0) NOT NULL , - [topic_posts_unapproved] [int] DEFAULT (0) NOT NULL , - [topic_posts_softdeleted] [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 , @@ -1580,9 +1552,13 @@ CREATE TABLE [phpbb_topics] ( [poll_max_options] [int] DEFAULT (1) NOT NULL , [poll_last_vote] [int] DEFAULT (0) NOT NULL , [poll_vote_change] [int] DEFAULT (0) NOT NULL , + [topic_visibility] [int] DEFAULT (0) NOT NULL , [topic_delete_time] [int] DEFAULT (0) NOT NULL , [topic_delete_reason] [varchar] (255) DEFAULT ('') NOT NULL , - [topic_delete_user] [int] DEFAULT (0) NOT NULL + [topic_delete_user] [int] DEFAULT (0) NOT NULL , + [topic_posts_approved] [int] DEFAULT (0) NOT NULL , + [topic_posts_unapproved] [int] DEFAULT (0) NOT NULL , + [topic_posts_softdeleted] [int] DEFAULT (0) NOT NULL )GO ALTER TABLE [phpbb_topics] WITH NOCHECK ADD @@ -1601,58 +1577,58 @@ GO CREATE INDEX [last_post_time] ON [phpbb_topics]([topic_last_post_time]) GO -CREATE INDEX [topic_visibility] ON [phpbb_topics]([topic_visibility]) +CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) GO -CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_visibility], [topic_last_post_id]) +CREATE INDEX [topic_visibility] ON [phpbb_topics]([topic_visibility]) GO -CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) +CREATE INDEX [forum_vis_last] ON [phpbb_topics]([forum_id], [topic_visibility], [topic_last_post_id]) GO /* - Table: 'phpbb_topics_track' + Table: 'phpbb_topics_posted' */ -CREATE TABLE [phpbb_topics_track] ( +CREATE TABLE [phpbb_topics_posted] ( [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 + [topic_posted] [int] DEFAULT (0) NOT NULL )GO -ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED +ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED ( [user_id], [topic_id] ) GO -CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) -GO - -CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) -GO - /* - Table: 'phpbb_topics_posted' + Table: 'phpbb_topics_track' */ -CREATE TABLE [phpbb_topics_posted] ( +CREATE TABLE [phpbb_topics_track] ( [user_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , - [topic_posted] [int] DEFAULT (0) NOT NULL + [forum_id] [int] DEFAULT (0) NOT NULL , + [mark_time] [int] DEFAULT (0) NOT NULL )GO -ALTER TABLE [phpbb_topics_posted] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_topics_posted] PRIMARY KEY CLUSTERED +ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_topics_track] PRIMARY KEY CLUSTERED ( [user_id], [topic_id] ) GO +CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) +GO + +CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) +GO + /* Table: 'phpbb_topics_watch' @@ -1682,26 +1658,6 @@ GO /* - Table: 'phpbb_user_notifications' -*/ -CREATE TABLE [phpbb_user_notifications] ( - [item_type] [varchar] (255) DEFAULT ('') NOT NULL , - [item_id] [int] DEFAULT (0) NOT NULL , - [user_id] [int] DEFAULT (0) NOT NULL , - [method] [varchar] (255) DEFAULT ('') NOT NULL , - [notify] [int] DEFAULT (1) NOT NULL , - [mssqlindex] [int] IDENTITY (1, 1) NOT NULL -)GO - -ALTER TABLE [phpbb_user_notifications] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_user_notifications] PRIMARY KEY CLUSTERED - ( - [mssqlindex] - ) -GO - - -/* Table: 'phpbb_user_group' */ CREATE TABLE [phpbb_user_group] ( @@ -1730,6 +1686,26 @@ GO /* + Table: 'phpbb_user_notifications' +*/ +CREATE TABLE [phpbb_user_notifications] ( + [item_type] [varchar] (255) DEFAULT ('') NOT NULL , + [item_id] [int] DEFAULT (0) NOT NULL , + [user_id] [int] DEFAULT (0) NOT NULL , + [method] [varchar] (255) DEFAULT ('') NOT NULL , + [notify] [int] DEFAULT (1) NOT NULL , + [mssqlindex] [int] IDENTITY (1, 1) NOT NULL +)GO + +ALTER TABLE [phpbb_user_notifications] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_user_notifications] PRIMARY KEY CLUSTERED + ( + [mssqlindex] + ) +GO + + +/* Table: 'phpbb_users' */ CREATE TABLE [phpbb_users] ( @@ -1745,8 +1721,6 @@ CREATE TABLE [phpbb_users] ( [user_password] [varchar] (255) DEFAULT ('') NOT NULL , [user_passchg] [int] DEFAULT (0) NOT NULL , [user_pass_convert] [int] DEFAULT (0) NOT NULL , - [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , - [user_newpasswd] [varchar] (255) DEFAULT ('') NOT NULL , [user_email] [varchar] (100) DEFAULT ('') NOT NULL , [user_email_hash] [float] DEFAULT (0) NOT NULL , [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL , @@ -1763,7 +1737,7 @@ CREATE TABLE [phpbb_users] ( [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_timezone] [varchar] (100) DEFAULT ('') 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 , @@ -1796,6 +1770,8 @@ CREATE TABLE [phpbb_users] ( [user_sig_bbcode_uid] [varchar] (8) DEFAULT ('') NOT NULL , [user_sig_bbcode_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , + [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , + [user_newpasswd] [varchar] (255) 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 , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 66c08156d0..473a88a844 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -3,32 +3,6 @@ # 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, @@ -90,6 +64,32 @@ CREATE TABLE phpbb_acl_users ( ); +# 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_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -209,15 +209,6 @@ CREATE TABLE phpbb_ext ( ); -# 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, @@ -233,6 +224,15 @@ CREATE TABLE phpbb_extension_groups ( ); +# 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_forums' CREATE TABLE phpbb_forums ( forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -246,7 +246,7 @@ CREATE TABLE phpbb_forums ( 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 blob NOT NULL, + forum_password varbinary(255) DEFAULT '' NOT NULL, forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_image varbinary(255) DEFAULT '' NOT NULL, forum_rules blob NOT NULL, @@ -257,12 +257,6 @@ CREATE TABLE phpbb_forums ( 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_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_softdeleted 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, @@ -270,8 +264,6 @@ CREATE TABLE phpbb_forums ( 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, @@ -280,6 +272,14 @@ CREATE TABLE phpbb_forums ( 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, + display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL, + forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_softdeleted 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) @@ -320,7 +320,6 @@ 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, @@ -336,8 +335,9 @@ CREATE TABLE phpbb_groups ( 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_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id), KEY group_legend_name (group_legend, group_name(255)) ); @@ -383,7 +383,6 @@ CREATE TABLE phpbb_log ( 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), @@ -420,19 +419,6 @@ CREATE TABLE phpbb_moderator_cache ( ); -# Table: 'phpbb_migrations' -CREATE TABLE phpbb_migrations ( - migration_name varbinary(255) DEFAULT '' NOT NULL, - migration_depends_on blob NOT NULL, - migration_schema_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - migration_data_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - migration_data_state blob NOT NULL, - migration_start_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - migration_end_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (migration_name) -); - - # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -531,7 +517,6 @@ CREATE TABLE phpbb_posts ( 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_visibility tinyint(3) DEFAULT '0' 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, @@ -550,6 +535,7 @@ CREATE TABLE phpbb_posts ( 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, + post_visibility tinyint(3) DEFAULT '0' NOT NULL, post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_delete_reason blob NOT NULL, post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -558,9 +544,9 @@ CREATE TABLE phpbb_posts ( KEY topic_id (topic_id), KEY poster_ip (poster_ip), KEY poster_id (poster_id), - KEY post_visibility (post_visibility), - KEY post_username (post_username(255)), - KEY tid_post_time (topic_id, post_time) + KEY tid_post_time (topic_id, post_time), + KEY post_username (post_username:255), + KEY post_visibility (post_visibility) ); @@ -654,16 +640,16 @@ CREATE TABLE phpbb_profile_fields ( 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_on_ml 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, + field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_ml tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_is_contact tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_contact_desc varbinary(255) DEFAULT '' NOT NULL, field_contact_url varbinary(255) DEFAULT '' NOT NULL, @@ -676,14 +662,14 @@ CREATE TABLE phpbb_profile_fields ( # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - pf_phpbb_location varbinary(255) DEFAULT '' NOT NULL, - pf_phpbb_interests blob NOT NULL, - pf_phpbb_occupation blob NOT NULL, + pf_phpbb_interests mediumblob NOT NULL, + pf_phpbb_occupation mediumblob NOT NULL, pf_phpbb_icq varbinary(255) DEFAULT '' NOT NULL, - pf_phpbb_aol varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_location varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_website varbinary(255) DEFAULT '' NOT NULL, pf_phpbb_wlm varbinary(255) DEFAULT '' NOT NULL, pf_phpbb_yahoo varbinary(255) DEFAULT '' NOT NULL, - pf_phpbb_website varbinary(255) DEFAULT '' NOT NULL, + pf_phpbb_aol varbinary(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -726,18 +712,18 @@ 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, + pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, reported_post_text mediumblob NOT NULL, reported_post_uid varbinary(8) DEFAULT '' NOT NULL, reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL, - reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) @@ -791,7 +777,6 @@ CREATE TABLE phpbb_search_wordmatch ( 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, @@ -802,6 +787,7 @@ CREATE TABLE phpbb_sessions ( 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, + session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id), KEY session_time (session_time), KEY session_user_id (session_user_id), @@ -877,16 +863,12 @@ CREATE TABLE phpbb_topics ( 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_visibility tinyint(3) DEFAULT '0' 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_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_posts_softdeleted 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, @@ -908,37 +890,41 @@ CREATE TABLE phpbb_topics ( 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, + topic_visibility tinyint(3) DEFAULT '0' NOT NULL, topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_delete_reason blob NOT NULL, topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posts_softdeleted mediumint(8) 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 fid_time_moved (forum_id, topic_last_post_time, topic_moved_id), KEY topic_visibility (topic_visibility), - KEY forum_appr_last (forum_id, topic_visibility, topic_last_post_id), - KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) + KEY forum_vis_last (forum_id, topic_visibility, topic_last_post_id) ); -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( +# 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, - 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) + topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, topic_id) ); -# Table: 'phpbb_topics_posted' -CREATE TABLE phpbb_topics_posted ( +# 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, - topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, topic_id) + 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 forum_id (forum_id), + KEY topic_id (topic_id) ); @@ -953,16 +939,6 @@ CREATE TABLE phpbb_topics_watch ( ); -# Table: 'phpbb_user_notifications' -CREATE TABLE phpbb_user_notifications ( - item_type varbinary(255) DEFAULT '' NOT NULL, - item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - method varbinary(255) DEFAULT '' NOT NULL, - notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL -); - - # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -975,6 +951,16 @@ CREATE TABLE phpbb_user_group ( ); +# Table: 'phpbb_user_notifications' +CREATE TABLE phpbb_user_notifications ( + item_type varbinary(255) DEFAULT '' NOT NULL, + item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + method varbinary(255) DEFAULT '' NOT NULL, + notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL +); + + # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -986,11 +972,9 @@ CREATE TABLE phpbb_users ( user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, username blob NOT NULL, username_clean blob NOT NULL, - user_password blob NOT NULL, + user_password varbinary(255) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_actkey varbinary(32) DEFAULT '' NOT NULL, - user_newpasswd blob NOT NULL, user_email blob NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, user_birthday varbinary(10) DEFAULT '' NOT NULL, @@ -1007,7 +991,7 @@ CREATE TABLE phpbb_users ( 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_timezone varbinary(100) DEFAULT '' 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, @@ -1040,6 +1024,8 @@ CREATE TABLE phpbb_users ( user_sig_bbcode_uid varbinary(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, user_jabber blob NOT NULL, + user_actkey varbinary(32) DEFAULT '' NOT NULL, + user_newpasswd varbinary(255) 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, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 8119d4cd93..44b24a4b17 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -3,32 +3,6 @@ # 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, @@ -90,6 +64,32 @@ CREATE TABLE phpbb_acl_users ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# 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_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -209,15 +209,6 @@ CREATE TABLE phpbb_ext ( ) 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, @@ -233,6 +224,15 @@ CREATE TABLE phpbb_extension_groups ( ) 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_forums' CREATE TABLE phpbb_forums ( forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -257,12 +257,6 @@ CREATE TABLE phpbb_forums ( 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_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - forum_topics_softdeleted 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, @@ -270,8 +264,6 @@ CREATE TABLE phpbb_forums ( 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, @@ -280,6 +272,14 @@ CREATE TABLE phpbb_forums ( 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, + display_subforum_list tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + forum_options int(20) UNSIGNED DEFAULT '0' NOT NULL, + forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_softdeleted 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) @@ -320,7 +320,6 @@ 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, @@ -336,8 +335,9 @@ CREATE TABLE phpbb_groups ( 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_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (group_id), KEY group_legend_name (group_legend, group_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -383,7 +383,6 @@ CREATE TABLE phpbb_log ( 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), @@ -420,19 +419,6 @@ CREATE TABLE phpbb_moderator_cache ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_migrations' -CREATE TABLE phpbb_migrations ( - migration_name varchar(255) DEFAULT '' NOT NULL, - migration_depends_on text NOT NULL, - migration_schema_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - migration_data_done tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - migration_data_state text NOT NULL, - migration_start_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - migration_end_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (migration_name) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -531,7 +517,6 @@ CREATE TABLE phpbb_posts ( 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_visibility tinyint(3) DEFAULT '0' 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, @@ -550,6 +535,7 @@ CREATE TABLE phpbb_posts ( 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, + post_visibility tinyint(3) DEFAULT '0' NOT NULL, post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_delete_reason varchar(255) DEFAULT '' NOT NULL, post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -558,9 +544,9 @@ CREATE TABLE phpbb_posts ( KEY topic_id (topic_id), KEY poster_ip (poster_ip), KEY poster_id (poster_id), - KEY post_visibility (post_visibility), - KEY post_username (post_username), - KEY tid_post_time (topic_id, post_time) + KEY tid_post_time (topic_id, post_time), + KEY post_username (post_username:255), + KEY post_visibility (post_visibility) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -654,16 +640,16 @@ CREATE TABLE phpbb_profile_fields ( 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_on_ml 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, + field_show_profile tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_vt tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_novalue tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + field_show_on_ml tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_is_contact tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_contact_desc varchar(255) DEFAULT '' NOT NULL, field_contact_url varchar(255) DEFAULT '' NOT NULL, @@ -676,14 +662,14 @@ CREATE TABLE phpbb_profile_fields ( # Table: 'phpbb_profile_fields_data' CREATE TABLE phpbb_profile_fields_data ( user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, - pf_phpbb_interests text NOT NULL, - pf_phpbb_occupation text NOT NULL, + pf_phpbb_interests mediumtext NOT NULL, + pf_phpbb_occupation mediumtext NOT NULL, pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, - pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website 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, + pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -726,18 +712,18 @@ 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, + pm_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, reported_post_text mediumtext NOT NULL, reported_post_uid varchar(8) DEFAULT '' NOT NULL, reported_post_bitfield varchar(255) DEFAULT '' NOT NULL, - reported_post_enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - reported_post_enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - reported_post_enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) @@ -791,7 +777,6 @@ CREATE TABLE phpbb_search_wordmatch ( 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, @@ -802,6 +787,7 @@ CREATE TABLE phpbb_sessions ( 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, + session_forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (session_id), KEY session_time (session_time), KEY session_user_id (session_user_id), @@ -877,16 +863,12 @@ CREATE TABLE phpbb_topics ( 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_visibility tinyint(3) DEFAULT '0' 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_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - topic_posts_softdeleted 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, @@ -908,37 +890,41 @@ CREATE TABLE phpbb_topics ( 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, + topic_visibility tinyint(3) DEFAULT '0' NOT NULL, topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL, topic_delete_reason varchar(255) DEFAULT '' NOT NULL, topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_posts_softdeleted mediumint(8) 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 fid_time_moved (forum_id, topic_last_post_time, topic_moved_id), KEY topic_visibility (topic_visibility), - KEY forum_appr_last (forum_id, topic_visibility, topic_last_post_id), - KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) + KEY forum_vis_last (forum_id, topic_visibility, topic_last_post_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( +# 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, - 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) + topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, topic_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_topics_posted' -CREATE TABLE phpbb_topics_posted ( +# 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, - topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (user_id, topic_id) + 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 forum_id (forum_id), + KEY topic_id (topic_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -953,16 +939,6 @@ CREATE TABLE phpbb_topics_watch ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_user_notifications' -CREATE TABLE phpbb_user_notifications ( - item_type varchar(255) DEFAULT '' NOT NULL, - item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - method varchar(255) DEFAULT '' NOT NULL, - notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -975,6 +951,16 @@ CREATE TABLE phpbb_user_group ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_user_notifications' +CREATE TABLE phpbb_user_notifications ( + item_type varchar(255) DEFAULT '' NOT NULL, + item_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + method varchar(255) DEFAULT '' NOT NULL, + notify tinyint(1) UNSIGNED DEFAULT '1' NOT NULL +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -989,8 +975,6 @@ CREATE TABLE phpbb_users ( user_password varchar(255) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, - user_actkey varchar(32) DEFAULT '' NOT NULL, - user_newpasswd varchar(255) DEFAULT '' 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, @@ -1007,7 +991,7 @@ CREATE TABLE phpbb_users ( 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_timezone varchar(100) DEFAULT '' 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, @@ -1040,6 +1024,8 @@ CREATE TABLE phpbb_users ( user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, + user_actkey varchar(32) DEFAULT '' NOT NULL, + user_newpasswd varchar(255) 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, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index b1f39da7bc..d9ac554894 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -44,56 +44,6 @@ 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 ( @@ -211,6 +161,56 @@ CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) / /* + 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_banlist' */ CREATE TABLE phpbb_banlist ( @@ -433,34 +433,6 @@ CREATE TABLE phpbb_ext ( /* - 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 ( @@ -495,6 +467,34 @@ END; /* + 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_forums' */ CREATE TABLE phpbb_forums ( @@ -509,7 +509,7 @@ CREATE TABLE phpbb_forums ( forum_desc_options number(11) DEFAULT '7' NOT NULL, forum_desc_uid varchar2(8) DEFAULT '' , forum_link varchar2(765) DEFAULT '' , - forum_password varchar2(765) DEFAULT '' , + forum_password varchar2(255) DEFAULT '' , forum_style number(8) DEFAULT '0' NOT NULL, forum_image varchar2(255) DEFAULT '' , forum_rules clob DEFAULT '' , @@ -520,12 +520,6 @@ CREATE TABLE phpbb_forums ( 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_approved number(8) DEFAULT '0' NOT NULL, - forum_posts_unapproved number(8) DEFAULT '0' NOT NULL, - forum_posts_softdeleted number(8) DEFAULT '0' NOT NULL, - forum_topics_approved number(8) DEFAULT '0' NOT NULL, - forum_topics_unapproved number(8) DEFAULT '0' NOT NULL, - forum_topics_softdeleted 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 '' , @@ -533,8 +527,6 @@ CREATE TABLE phpbb_forums ( 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, @@ -543,6 +535,14 @@ CREATE TABLE phpbb_forums ( prune_days number(8) DEFAULT '0' NOT NULL, prune_viewed number(8) DEFAULT '0' NOT NULL, prune_freq number(8) DEFAULT '0' NOT NULL, + display_subforum_list number(1) DEFAULT '1' NOT NULL, + forum_options number(20) DEFAULT '0' NOT NULL, + forum_posts_approved number(8) DEFAULT '0' NOT NULL, + forum_posts_unapproved number(8) DEFAULT '0' NOT NULL, + forum_posts_softdeleted number(8) DEFAULT '0' NOT NULL, + forum_topics_approved number(8) DEFAULT '0' NOT NULL, + forum_topics_unapproved number(8) DEFAULT '0' NOT NULL, + forum_topics_softdeleted number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_forums PRIMARY KEY (forum_id) ) / @@ -616,7 +616,6 @@ 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 '' , @@ -632,8 +631,9 @@ CREATE TABLE phpbb_groups ( 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_max_recipients number(8) DEFAULT '0' NOT NULL, + group_skip_auth number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_groups PRIMARY KEY (group_id) ) / @@ -743,8 +743,6 @@ 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) @@ -812,22 +810,6 @@ CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id) / /* - Table: 'phpbb_migrations' -*/ -CREATE TABLE phpbb_migrations ( - migration_name varchar2(255) DEFAULT '' , - migration_depends_on clob DEFAULT '' , - migration_schema_done number(1) DEFAULT '0' NOT NULL, - migration_data_done number(1) DEFAULT '0' NOT NULL, - migration_data_state clob DEFAULT '' , - migration_start_time number(11) DEFAULT '0' NOT NULL, - migration_end_time number(11) DEFAULT '0' NOT NULL, - CONSTRAINT pk_phpbb_migrations PRIMARY KEY (migration_name) -) -/ - - -/* Table: 'phpbb_modules' */ CREATE TABLE phpbb_modules ( @@ -1008,7 +990,6 @@ CREATE TABLE phpbb_posts ( icon_id number(8) DEFAULT '0' NOT NULL, poster_ip varchar2(40) DEFAULT '' , post_time number(11) DEFAULT '0' NOT NULL, - post_visibility number(3) DEFAULT '0' 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, @@ -1027,6 +1008,7 @@ CREATE TABLE phpbb_posts ( 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, + post_visibility number(3) DEFAULT '0' NOT NULL, post_delete_time number(11) DEFAULT '0' NOT NULL, post_delete_reason varchar2(765) DEFAULT '' , post_delete_user number(8) DEFAULT '0' NOT NULL, @@ -1042,11 +1024,11 @@ 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_visibility ON phpbb_posts (post_visibility) +CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time) / -CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username) +CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username:255) / -CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time) +CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts (post_visibility) / CREATE SEQUENCE phpbb_posts_seq @@ -1226,16 +1208,16 @@ CREATE TABLE phpbb_profile_fields ( 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_on_ml 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, + field_show_profile number(1) DEFAULT '0' NOT NULL, + field_show_on_vt number(1) DEFAULT '0' NOT NULL, + field_show_novalue number(1) DEFAULT '0' NOT NULL, + field_show_on_pm number(1) DEFAULT '0' NOT NULL, + field_show_on_ml number(1) DEFAULT '0' NOT NULL, field_is_contact number(1) DEFAULT '0' NOT NULL, field_contact_desc varchar2(255) DEFAULT '' , field_contact_url varchar2(255) DEFAULT '' , @@ -1269,14 +1251,14 @@ END; */ CREATE TABLE phpbb_profile_fields_data ( user_id number(8) DEFAULT '0' NOT NULL, - pf_phpbb_location varchar2(255) DEFAULT '' , pf_phpbb_interests clob DEFAULT '' , pf_phpbb_occupation clob DEFAULT '' , pf_phpbb_icq varchar2(255) DEFAULT '' , - pf_phpbb_aol varchar2(255) DEFAULT '' , + pf_phpbb_location varchar2(255) DEFAULT '' , + pf_phpbb_website varchar2(255) DEFAULT '' , pf_phpbb_wlm varchar2(255) DEFAULT '' , pf_phpbb_yahoo varchar2(255) DEFAULT '' , - pf_phpbb_website varchar2(255) DEFAULT '' , + pf_phpbb_aol varchar2(255) DEFAULT '' , CONSTRAINT pk_phpbb_profile_fields_data PRIMARY KEY (user_id) ) / @@ -1347,18 +1329,18 @@ 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 '' , + pm_id number(8) DEFAULT '0' NOT NULL, + reported_post_enable_bbcode number(1) DEFAULT '1' NOT NULL, + reported_post_enable_smilies number(1) DEFAULT '1' NOT NULL, + reported_post_enable_magic_url number(1) DEFAULT '1' NOT NULL, reported_post_text clob DEFAULT '' , reported_post_uid varchar2(8) DEFAULT '' , reported_post_bitfield varchar2(255) DEFAULT '' , - reported_post_enable_magic_url number(1) DEFAULT '1' NOT NULL, - reported_post_enable_smilies number(1) DEFAULT '1' NOT NULL, - reported_post_enable_bbcode number(1) DEFAULT '1' NOT NULL, CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id) ) / @@ -1480,7 +1462,6 @@ CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id) 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, @@ -1491,6 +1472,7 @@ CREATE TABLE phpbb_sessions ( session_viewonline number(1) DEFAULT '1' NOT NULL, session_autologin number(1) DEFAULT '0' NOT NULL, session_admin number(1) DEFAULT '0' NOT NULL, + session_forum_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_sessions PRIMARY KEY (session_id) ) / @@ -1653,16 +1635,12 @@ CREATE TABLE phpbb_topics ( 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_visibility number(3) DEFAULT '0' 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_posts_approved number(8) DEFAULT '0' NOT NULL, - topic_posts_unapproved number(8) DEFAULT '0' NOT NULL, - topic_posts_softdeleted 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, @@ -1684,9 +1662,13 @@ CREATE TABLE phpbb_topics ( 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, + topic_visibility number(3) DEFAULT '0' NOT NULL, topic_delete_time number(11) DEFAULT '0' NOT NULL, topic_delete_reason varchar2(765) DEFAULT '' , topic_delete_user number(8) DEFAULT '0' NOT NULL, + topic_posts_approved number(8) DEFAULT '0' NOT NULL, + topic_posts_unapproved number(8) DEFAULT '0' NOT NULL, + topic_posts_softdeleted number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id) ) / @@ -1697,11 +1679,11 @@ 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_visibility ON phpbb_topics (topic_visibility) +CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) / -CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id) +CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics (topic_visibility) / -CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) +CREATE INDEX phpbb_topics_forum_vis_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id) / CREATE SEQUENCE phpbb_topics_seq @@ -1721,33 +1703,33 @@ END; /* - Table: 'phpbb_topics_track' + Table: 'phpbb_topics_posted' */ -CREATE TABLE phpbb_topics_track ( +CREATE TABLE phpbb_topics_posted ( 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) + topic_posted number(1) DEFAULT '0' NOT NULL, + CONSTRAINT pk_phpbb_topics_posted 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' + Table: 'phpbb_topics_track' */ -CREATE TABLE phpbb_topics_posted ( +CREATE TABLE phpbb_topics_track ( 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) + 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_forum_id ON phpbb_topics_track (forum_id) +/ +CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id) +/ /* Table: 'phpbb_topics_watch' @@ -1767,19 +1749,6 @@ CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status / /* - Table: 'phpbb_user_notifications' -*/ -CREATE TABLE phpbb_user_notifications ( - item_type varchar2(255) DEFAULT '' , - item_id number(8) DEFAULT '0' NOT NULL, - user_id number(8) DEFAULT '0' NOT NULL, - method varchar2(255) DEFAULT '' , - notify number(1) DEFAULT '1' NOT NULL -) -/ - - -/* Table: 'phpbb_user_group' */ CREATE TABLE phpbb_user_group ( @@ -1798,6 +1767,19 @@ CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader) / /* + Table: 'phpbb_user_notifications' +*/ +CREATE TABLE phpbb_user_notifications ( + item_type varchar2(255) DEFAULT '' , + item_id number(8) DEFAULT '0' NOT NULL, + user_id number(8) DEFAULT '0' NOT NULL, + method varchar2(255) DEFAULT '' , + notify number(1) DEFAULT '1' NOT NULL +) +/ + + +/* Table: 'phpbb_users' */ CREATE TABLE phpbb_users ( @@ -1810,11 +1792,9 @@ CREATE TABLE phpbb_users ( user_regdate number(11) DEFAULT '0' NOT NULL, username varchar2(255) DEFAULT '' , username_clean varchar2(255) DEFAULT '' , - user_password varchar2(765) DEFAULT '' , + user_password varchar2(255) DEFAULT '' , user_passchg number(11) DEFAULT '0' NOT NULL, user_pass_convert number(1) DEFAULT '0' NOT NULL, - user_actkey varchar2(32) DEFAULT '' , - user_newpasswd varchar2(765) DEFAULT '' , user_email varchar2(300) DEFAULT '' , user_email_hash number(20) DEFAULT '0' NOT NULL, user_birthday varchar2(10) DEFAULT '' , @@ -1831,7 +1811,7 @@ CREATE TABLE phpbb_users ( 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_timezone varchar2(100) DEFAULT '' , 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, @@ -1864,6 +1844,8 @@ CREATE TABLE phpbb_users ( user_sig_bbcode_uid varchar2(8) DEFAULT '' , user_sig_bbcode_bitfield varchar2(255) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' , + user_actkey varchar2(32) DEFAULT '' , + user_newpasswd varchar2(255) DEFAULT '' , user_form_salt varchar2(96) DEFAULT '' , user_new number(1) DEFAULT '1' NOT NULL, user_reminded number(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 36eaddbb78..1267e34953 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -84,36 +84,6 @@ CREATE OPERATOR =( 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 ( @@ -189,6 +159,36 @@ 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_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_banlist' */ CREATE SEQUENCE phpbb_banlist_seq; @@ -336,19 +336,6 @@ CREATE TABLE phpbb_ext ( 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; @@ -368,6 +355,19 @@ CREATE TABLE phpbb_extension_groups ( /* + 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_forums' */ CREATE SEQUENCE phpbb_forums_seq; @@ -395,12 +395,6 @@ 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_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, @@ -408,8 +402,6 @@ CREATE TABLE phpbb_forums ( 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), @@ -418,6 +410,14 @@ CREATE TABLE phpbb_forums ( 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), + display_subforum_list INT2 DEFAULT '1' NOT NULL CHECK (display_subforum_list >= 0), + forum_options INT4 DEFAULT '0' NOT NULL CHECK (forum_options >= 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), PRIMARY KEY (forum_id) ); @@ -468,7 +468,6 @@ 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, @@ -484,8 +483,9 @@ CREATE TABLE phpbb_groups ( 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_max_recipients INT4 DEFAULT '0' NOT NULL CHECK (group_max_recipients >= 0), + group_skip_auth INT2 DEFAULT '0' NOT NULL CHECK (group_skip_auth >= 0), PRIMARY KEY (group_id) ); @@ -545,7 +545,6 @@ 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); @@ -585,21 +584,6 @@ 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; @@ -721,7 +705,6 @@ 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_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), @@ -740,6 +723,7 @@ 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_visibility INT2 DEFAULT '0' NOT NULL, 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), @@ -750,9 +734,9 @@ 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_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); +CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username:255); +CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts (post_visibility); /* Table: 'phpbb_privmsgs' @@ -862,16 +846,16 @@ CREATE TABLE phpbb_profile_fields ( 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_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_show_profile INT2 DEFAULT '0' NOT NULL CHECK (field_show_profile >= 0), + field_show_on_vt INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_vt >= 0), + field_show_novalue INT2 DEFAULT '0' NOT NULL CHECK (field_show_novalue >= 0), + field_show_on_pm INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_pm >= 0), + field_show_on_ml INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_ml >= 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, @@ -886,14 +870,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_interests TEXT DEFAULT '' NOT NULL, + pf_phpbb_occupation TEXT DEFAULT '' NOT NULL, pf_phpbb_icq varchar(255) DEFAULT '' NOT NULL, - pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_location varchar(255) DEFAULT '' NOT NULL, + pf_phpbb_website 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, + pf_phpbb_aol varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (user_id) ); @@ -948,18 +932,18 @@ 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, + pm_id INT4 DEFAULT '0' NOT NULL CHECK (pm_id >= 0), + reported_post_enable_bbcode INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_bbcode >= 0), + reported_post_enable_smilies INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_smilies >= 0), + reported_post_enable_magic_url INT2 DEFAULT '1' NOT NULL CHECK (reported_post_enable_magic_url >= 0), 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) ); @@ -1027,7 +1011,6 @@ CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); 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), @@ -1038,6 +1021,7 @@ CREATE TABLE phpbb_sessions ( 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), + session_forum_id INT4 DEFAULT '0' NOT NULL CHECK (session_forum_id >= 0), PRIMARY KEY (session_id) ); @@ -1135,16 +1119,12 @@ 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_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_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), @@ -1166,43 +1146,47 @@ 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_visibility INT2 DEFAULT '0' NOT NULL, 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), + 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), 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_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); +CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics (topic_visibility); +CREATE INDEX phpbb_topics_forum_vis_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id); /* - Table: 'phpbb_topics_track' + Table: 'phpbb_topics_posted' */ -CREATE TABLE phpbb_topics_track ( +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), - forum_id INT4 DEFAULT '0' NOT NULL CHECK (forum_id >= 0), - mark_time INT4 DEFAULT '0' NOT NULL CHECK (mark_time >= 0), + topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 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' + Table: 'phpbb_topics_track' */ -CREATE TABLE phpbb_topics_posted ( +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), - topic_posted INT2 DEFAULT '0' NOT NULL CHECK (topic_posted >= 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_forum_id ON phpbb_topics_track (forum_id); +CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id); /* Table: 'phpbb_topics_watch' @@ -1218,18 +1202,6 @@ 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 ( @@ -1244,6 +1216,18 @@ 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_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_users' */ CREATE SEQUENCE phpbb_users_seq; @@ -1261,8 +1245,6 @@ CREATE TABLE phpbb_users ( 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, @@ -1279,7 +1261,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 varchar(100) DEFAULT 'UTC' NOT NULL, + user_timezone varchar(100) DEFAULT '' 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), @@ -1312,6 +1294,8 @@ CREATE TABLE phpbb_users ( user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, + user_actkey varchar(32) DEFAULT '' NOT NULL, + user_newpasswd varchar(255) 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, diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 5d8ae220f4..f321632391 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -5,31 +5,6 @@ # 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', @@ -89,6 +64,31 @@ 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_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_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER PRIMARY KEY NOT NULL , @@ -204,14 +204,6 @@ CREATE TABLE phpbb_ext ( 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 , @@ -226,6 +218,14 @@ CREATE TABLE phpbb_extension_groups ( ); +# 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_forums' CREATE TABLE phpbb_forums ( forum_id INTEGER PRIMARY KEY NOT NULL , @@ -250,12 +250,6 @@ CREATE TABLE phpbb_forums ( 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_approved INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_posts_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_topics_approved INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_topics_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0', - forum_topics_softdeleted 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 '', @@ -263,8 +257,6 @@ CREATE TABLE phpbb_forums ( 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', @@ -272,7 +264,15 @@ CREATE TABLE phpbb_forums ( 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' + prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0', + display_subforum_list INTEGER UNSIGNED NOT NULL DEFAULT '1', + forum_options INTEGER UNSIGNED NOT NULL DEFAULT '0', + forum_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0', + forum_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0', + forum_posts_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0', + forum_topics_approved INTEGER UNSIGNED NOT NULL DEFAULT '0', + forum_topics_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0', + forum_topics_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id); @@ -312,7 +312,6 @@ 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 '', @@ -328,8 +327,9 @@ CREATE TABLE phpbb_groups ( 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_legend INTEGER UNSIGNED NOT NULL DEFAULT '0', group_max_recipients INTEGER UNSIGNED NOT NULL DEFAULT '0', - group_legend INTEGER UNSIGNED NOT NULL DEFAULT '0' + group_skip_auth INTEGER UNSIGNED NOT NULL DEFAULT '0' ); CREATE INDEX phpbb_groups_group_legend_name ON phpbb_groups (group_legend, group_name); @@ -373,7 +373,6 @@ 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); @@ -408,19 +407,6 @@ CREATE TABLE phpbb_moderator_cache ( 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_migrations' -CREATE TABLE phpbb_migrations ( - migration_name varchar(255) NOT NULL DEFAULT '', - migration_depends_on text(65535) NOT NULL DEFAULT '', - migration_schema_done INTEGER UNSIGNED NOT NULL DEFAULT '0', - migration_data_done INTEGER UNSIGNED NOT NULL DEFAULT '0', - migration_data_state text(65535) NOT NULL DEFAULT '', - migration_start_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - migration_end_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (migration_name) -); - - # Table: 'phpbb_modules' CREATE TABLE phpbb_modules ( module_id INTEGER PRIMARY KEY NOT NULL , @@ -516,7 +502,6 @@ CREATE TABLE phpbb_posts ( icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0', poster_ip varchar(40) NOT NULL DEFAULT '', post_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - post_visibility tinyint(3) NOT NULL DEFAULT '0', post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0', enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1', enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', @@ -535,6 +520,7 @@ CREATE TABLE phpbb_posts ( 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', + post_visibility tinyint(3) NOT NULL DEFAULT '0', post_delete_time INTEGER UNSIGNED NOT NULL DEFAULT '0', post_delete_reason text(65535) NOT NULL DEFAULT '', post_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0' @@ -544,9 +530,9 @@ 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_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); +CREATE INDEX phpbb_posts_post_username ON phpbb_posts (post_username:255); +CREATE INDEX phpbb_posts_post_visibility ON phpbb_posts (post_visibility); # Table: 'phpbb_privmsgs' CREATE TABLE phpbb_privmsgs ( @@ -635,16 +621,16 @@ CREATE TABLE phpbb_profile_fields ( 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_on_ml 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', + field_show_profile INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_show_on_vt INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_show_novalue INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_show_on_pm INTEGER UNSIGNED NOT NULL DEFAULT '0', + field_show_on_ml INTEGER UNSIGNED NOT NULL DEFAULT '0', field_is_contact INTEGER UNSIGNED NOT NULL DEFAULT '0', field_contact_desc varchar(255) NOT NULL DEFAULT '', field_contact_url varchar(255) NOT NULL DEFAULT '' @@ -656,14 +642,14 @@ 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', - pf_phpbb_location varchar(255) NOT NULL DEFAULT '', - pf_phpbb_interests text(65535) NOT NULL DEFAULT '', - pf_phpbb_occupation text(65535) NOT NULL DEFAULT '', + pf_phpbb_interests mediumtext(16777215) NOT NULL DEFAULT '', + pf_phpbb_occupation mediumtext(16777215) NOT NULL DEFAULT '', pf_phpbb_icq varchar(255) NOT NULL DEFAULT '', - pf_phpbb_aol varchar(255) NOT NULL DEFAULT '', + pf_phpbb_location varchar(255) NOT NULL DEFAULT '', + pf_phpbb_website varchar(255) NOT NULL DEFAULT '', pf_phpbb_wlm varchar(255) NOT NULL DEFAULT '', pf_phpbb_yahoo varchar(255) NOT NULL DEFAULT '', - pf_phpbb_website varchar(255) NOT NULL DEFAULT '', + pf_phpbb_aol varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (user_id) ); @@ -705,18 +691,18 @@ 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 '', + pm_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + reported_post_enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1', + reported_post_enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', + reported_post_enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1', reported_post_text mediumtext(16777215) NOT NULL DEFAULT '', reported_post_uid varchar(8) NOT NULL DEFAULT '', - reported_post_bitfield varchar(255) NOT NULL DEFAULT '', - reported_post_enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1', - reported_post_enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1', - reported_post_enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1' + reported_post_bitfield varchar(255) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); @@ -767,7 +753,6 @@ CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id); 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', @@ -778,6 +763,7 @@ CREATE TABLE phpbb_sessions ( session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1', session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0', session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0', + session_forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (session_id) ); @@ -849,16 +835,12 @@ CREATE TABLE phpbb_topics ( 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_visibility tinyint(3) NOT NULL DEFAULT '0', 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_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0', - topic_posts_softdeleted 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', @@ -880,38 +862,42 @@ CREATE TABLE phpbb_topics ( 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', + topic_visibility tinyint(3) NOT NULL DEFAULT '0', topic_delete_time INTEGER UNSIGNED NOT NULL DEFAULT '0', topic_delete_reason text(65535) NOT NULL DEFAULT '', - topic_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0' + topic_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0', + topic_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0', + topic_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0', + topic_posts_softdeleted 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_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); +CREATE INDEX phpbb_topics_topic_visibility ON phpbb_topics (topic_visibility); +CREATE INDEX phpbb_topics_forum_vis_last ON phpbb_topics (forum_id, topic_visibility, topic_last_post_id); -# Table: 'phpbb_topics_track' -CREATE TABLE phpbb_topics_track ( +# 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', - forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0', + topic_posted 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 ( +# 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', - topic_posted 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_forum_id ON phpbb_topics_track (forum_id); +CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id); # Table: 'phpbb_topics_watch' CREATE TABLE phpbb_topics_watch ( @@ -924,16 +910,6 @@ 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_notifications' -CREATE TABLE phpbb_user_notifications ( - item_type varchar(255) NOT NULL DEFAULT '', - item_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - method varchar(255) NOT NULL DEFAULT '', - notify INTEGER UNSIGNED NOT NULL DEFAULT '1' -); - - # Table: 'phpbb_user_group' CREATE TABLE phpbb_user_group ( group_id INTEGER UNSIGNED NOT NULL DEFAULT '0', @@ -946,6 +922,16 @@ 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_user_notifications' +CREATE TABLE phpbb_user_notifications ( + item_type varchar(255) NOT NULL DEFAULT '', + item_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + method varchar(255) NOT NULL DEFAULT '', + notify INTEGER UNSIGNED NOT NULL DEFAULT '1' +); + + # Table: 'phpbb_users' CREATE TABLE phpbb_users ( user_id INTEGER PRIMARY KEY NOT NULL , @@ -960,8 +946,6 @@ CREATE TABLE phpbb_users ( user_password varchar(255) NOT NULL DEFAULT '', user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0', user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0', - user_actkey varchar(32) NOT NULL DEFAULT '', - user_newpasswd varchar(255) NOT NULL DEFAULT '', user_email varchar(100) NOT NULL DEFAULT '', user_email_hash bigint(20) NOT NULL DEFAULT '0', user_birthday varchar(10) NOT NULL DEFAULT '', @@ -978,7 +962,7 @@ CREATE TABLE phpbb_users ( 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_timezone varchar(100) NOT NULL DEFAULT '', 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', @@ -1011,6 +995,8 @@ CREATE TABLE phpbb_users ( user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '', user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '', + user_actkey varchar(32) NOT NULL DEFAULT '', + user_newpasswd varchar(255) 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', |