diff options
Diffstat (limited to 'phpBB/develop/mysql_upgrader.php')
-rw-r--r-- | phpBB/develop/mysql_upgrader.php | 118 |
1 files changed, 21 insertions, 97 deletions
diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 05d279a099..597dd5e932 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -175,7 +175,7 @@ foreach ($schema_data as $table_name => $table_data) $column_type = $dbms_type_map['mysql_41'][$column_data[0]]; } - // Adjust default value if db-dependant specified + // Adjust default value if db-dependent specified if (is_array($column_data[1])) { $column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default']; @@ -552,9 +552,12 @@ function get_schema_struct() 'forum_topics_per_page' => array('TINT:4', 0), 'forum_type' => array('TINT:4', 0), 'forum_status' => array('TINT:4', 0), - 'forum_posts' => array('UINT', 0), - 'forum_topics' => array('UINT', 0), - 'forum_topics_real' => array('UINT', 0), + 'forum_posts_approved' => array('UINT', 0), + 'forum_posts_unapproved' => array('UINT', 0), + 'forum_posts_softdeleted' => array('UINT', 0), + 'forum_topics_approved' => array('UINT', 0), + 'forum_topics_unapproved' => array('UINT', 0), + 'forum_topics_softdeleted' => array('UINT', 0), 'forum_last_post_id' => array('UINT', 0), 'forum_last_poster_id' => array('UINT', 0), 'forum_last_post_subject' => array('STEXT_UNI', ''), @@ -687,6 +690,7 @@ function get_schema_struct() 'PRIMARY_KEY' => 'log_id', 'KEYS' => array( 'log_type' => array('INDEX', 'log_type'), + 'log_time' => array('INDEX', 'log_time'), 'forum_id' => array('INDEX', 'forum_id'), 'topic_id' => array('INDEX', 'topic_id'), 'reportee_id' => array('INDEX', 'reportee_id'), @@ -767,7 +771,7 @@ function get_schema_struct() 'icon_id' => array('UINT', 0), 'poster_ip' => array('VCHAR:40', ''), 'post_time' => array('TIMESTAMP', 0), - 'post_approved' => array('BOOL', 1), + 'post_visibility' => array('TINT:3', 0), 'post_reported' => array('BOOL', 0), 'enable_bbcode' => array('BOOL', 1), 'enable_smilies' => array('BOOL', 1), @@ -793,7 +797,7 @@ function get_schema_struct() 'topic_id' => array('INDEX', 'topic_id'), 'poster_ip' => array('INDEX', 'poster_ip'), 'poster_id' => array('INDEX', 'poster_id'), - 'post_approved' => array('INDEX', 'post_approved'), + 'post_visibility' => array('INDEX', 'post_visibility'), 'post_username' => array('INDEX', 'post_username'), 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')), ), @@ -1089,92 +1093,14 @@ function get_schema_struct() 'style_name' => array('VCHAR_UNI:255', ''), 'style_copyright' => array('VCHAR_UNI', ''), 'style_active' => array('BOOL', 1), - 'template_id' => array('UINT', 0), - 'theme_id' => array('UINT', 0), - 'imageset_id' => array('UINT', 0), + 'style_path' => array('VCHAR:100', ''), + 'bbcode_bitfield' => array('VCHAR:255', 'kNg='), + 'style_parent_id' => array('UINT:4', 0), + 'style_parent_tree' => array('TEXT', ''), ), 'PRIMARY_KEY' => 'style_id', 'KEYS' => array( 'style_name' => array('UNIQUE', 'style_name'), - 'template_id' => array('INDEX', 'template_id'), - 'theme_id' => array('INDEX', 'theme_id'), - 'imageset_id' => array('INDEX', 'imageset_id'), - ), - ); - - $schema_data['phpbb_styles_template'] = array( - 'COLUMNS' => array( - 'template_id' => array('UINT', NULL, 'auto_increment'), - 'template_name' => array('VCHAR_UNI:255', ''), - 'template_copyright' => array('VCHAR_UNI', ''), - 'template_path' => array('VCHAR:100', ''), - 'bbcode_bitfield' => array('VCHAR:255', 'kNg='), - 'template_storedb' => array('BOOL', 0), - 'template_inherits_id' => array('UINT:4', 0), - 'template_inherit_path' => array('VCHAR', ''), - ), - 'PRIMARY_KEY' => 'template_id', - 'KEYS' => array( - 'tmplte_nm' => array('UNIQUE', 'template_name'), - ), - ); - - $schema_data['phpbb_styles_template_data'] = array( - 'COLUMNS' => array( - 'template_id' => array('UINT', 0), - 'template_filename' => array('VCHAR:100', ''), - 'template_included' => array('TEXT', ''), - 'template_mtime' => array('TIMESTAMP', 0), - 'template_data' => array('MTEXT_UNI', ''), - ), - 'KEYS' => array( - 'tid' => array('INDEX', 'template_id'), - 'tfn' => array('INDEX', 'template_filename'), - ), - ); - - $schema_data['phpbb_styles_theme'] = array( - 'COLUMNS' => array( - 'theme_id' => array('UINT', NULL, 'auto_increment'), - 'theme_name' => array('VCHAR_UNI:255', ''), - 'theme_copyright' => array('VCHAR_UNI', ''), - 'theme_path' => array('VCHAR:100', ''), - 'theme_storedb' => array('BOOL', 0), - 'theme_mtime' => array('TIMESTAMP', 0), - 'theme_data' => array('MTEXT_UNI', ''), - ), - 'PRIMARY_KEY' => 'theme_id', - 'KEYS' => array( - 'theme_name' => array('UNIQUE', 'theme_name'), - ), - ); - - $schema_data['phpbb_styles_imageset'] = array( - 'COLUMNS' => array( - 'imageset_id' => array('UINT', NULL, 'auto_increment'), - 'imageset_name' => array('VCHAR_UNI:255', ''), - 'imageset_copyright' => array('VCHAR_UNI', ''), - 'imageset_path' => array('VCHAR:100', ''), - ), - 'PRIMARY_KEY' => 'imageset_id', - 'KEYS' => array( - 'imgset_nm' => array('UNIQUE', 'imageset_name'), - ), - ); - - $schema_data['phpbb_styles_imageset_data'] = array( - 'COLUMNS' => array( - 'image_id' => array('UINT', NULL, 'auto_increment'), - 'image_name' => array('VCHAR:200', ''), - 'image_filename' => array('VCHAR:200', ''), - 'image_lang' => array('VCHAR:30', ''), - 'image_height' => array('USINT', 0), - 'image_width' => array('USINT', 0), - 'imageset_id' => array('UINT', 0), - ), - 'PRIMARY_KEY' => 'image_id', - 'KEYS' => array( - 'i_d' => array('INDEX', 'imageset_id'), ), ); @@ -1184,15 +1110,16 @@ function get_schema_struct() 'forum_id' => array('UINT', 0), 'icon_id' => array('UINT', 0), 'topic_attachment' => array('BOOL', 0), - 'topic_approved' => array('BOOL', 1), + 'topic_visibility' => array('TINT:3', 0), 'topic_reported' => array('BOOL', 0), 'topic_title' => array('STEXT_UNI', '', 'true_sort'), 'topic_poster' => array('UINT', 0), 'topic_time' => array('TIMESTAMP', 0), 'topic_time_limit' => array('TIMESTAMP', 0), 'topic_views' => array('UINT', 0), - 'topic_replies' => array('UINT', 0), - 'topic_replies_real' => array('UINT', 0), + 'topic_posts_approved' => array('UINT', 0), + 'topic_posts_unapproved' => array('UINT', 0), + 'topic_posts_softdeleted' => array('UINT', 0), 'topic_status' => array('TINT:3', 0), 'topic_type' => array('TINT:3', 0), 'topic_first_post_id' => array('UINT', 0), @@ -1220,8 +1147,8 @@ function get_schema_struct() 'forum_id' => array('INDEX', 'forum_id'), 'forum_id_type' => array('INDEX', array('forum_id', 'topic_type')), 'last_post_time' => array('INDEX', 'topic_last_post_time'), - 'topic_approved' => array('INDEX', 'topic_approved'), - 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_approved', 'topic_last_post_id')), + 'topic_visibility' => array('INDEX', 'topic_visibility'), + 'forum_appr_last' => array('INDEX', array('forum_id', 'topic_visibility', 'topic_last_post_id')), 'fid_time_moved' => array('INDEX', array('forum_id', 'topic_last_post_time', 'topic_moved_id')), ), ); @@ -1306,8 +1233,7 @@ function get_schema_struct() 'user_inactive_time' => array('TIMESTAMP', 0), 'user_posts' => array('UINT', 0), 'user_lang' => array('VCHAR:30', ''), - 'user_timezone' => array('DECIMAL', 0), - 'user_dst' => array('BOOL', 0), + 'user_timezone' => array('VCHAR:100', 'UTC'), 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'), 'user_style' => array('UINT', 0), 'user_rank' => array('UINT', 0), @@ -1396,5 +1322,3 @@ function get_schema_struct() return $schema_data; } - -?>
\ No newline at end of file |