diff options
Diffstat (limited to 'phpBB/install')
| -rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 16 | ||||
| -rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 53 | ||||
| -rw-r--r-- | phpBB/install/database_update.php | 84 | ||||
| -rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 1 | ||||
| -rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 1 | ||||
| -rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 25 | ||||
| -rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 25 | ||||
| -rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 25 | ||||
| -rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 25 | ||||
| -rw-r--r-- | phpBB/install/schemas/schema_data.sql | 2 | ||||
| -rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 1 |
11 files changed, 168 insertions, 90 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index f413e2555a..98bb2ecebe 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -32,7 +32,7 @@ unset($dbpasswd); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.2', - 'phpbb_version' => '3.0.3', + 'phpbb_version' => '3.0.4', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, @@ -229,6 +229,9 @@ if (!$get_info) @define('DEFAULT_AVATAR_X_CUSTOM', get_config_value('avatar_max_width')); @define('DEFAULT_AVATAR_Y_CUSTOM', get_config_value('avatar_max_height')); + // additional table used only during conversion + @define('USERCONV_TABLE', $table_prefix . 'userconv'); + /** * Description on how to use the convertor framework. * @@ -316,7 +319,7 @@ if (!$get_info) // username_clean in phpBB3 which is not possible, so we'll give the admin a list // of user ids and usernames and let him deicde what he wants to do with them 'execute_first' => ' - phpbb_check_username_collisions(); + phpbb_create_userconv_table(); import_avatar_gallery(); if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config(); phpbb_insert_forums(); @@ -339,6 +342,14 @@ if (!$get_info) '), 'schema' => array( + array( + 'target' => USERCONV_TABLE, + 'query_first' => array('target', $convert->truncate_statement . USERCONV_TABLE), + + + array('user_id', 'users.user_id', ''), + array('username_clean', 'users.username', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_clean_string')), + ), array( 'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '', @@ -419,6 +430,7 @@ if (!$get_info) array( 'target' => BANLIST_TABLE, + 'execute_first' => 'phpbb_check_username_collisions();', 'query_first' => array('target', $convert->truncate_statement . BANLIST_TABLE), array('ban_ip', 'banlist.ban_ip', 'decode_ban_ip'), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 0acf666312..6452296782 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1698,7 +1698,7 @@ function phpbb_disallowed_username($username) * Checks whether there are any usernames on the old board that would map to the same * username_clean on phpBB3. Prints out a list if any exist and exits. */ -function phpbb_check_username_collisions() +function phpbb_create_userconv_table() { global $db, $src_db, $convert, $table_prefix, $user, $lang; @@ -1735,53 +1735,53 @@ function phpbb_check_username_collisions() } // create a temporary table in which we store the clean usernames - $drop_sql = 'DROP TABLE ' . $table_prefix . 'userconv'; + $drop_sql = 'DROP TABLE ' . USERCONV_TABLE; switch ($map_dbms) { case 'firebird': - $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id INTEGER NOT NULL, username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT \'\' NOT NULL COLLATE UNICODE )'; break; case 'mssql': - $create_sql = 'CREATE TABLE [' . $table_prefix . 'userconv] ( + $create_sql = 'CREATE TABLE [' . USERCONV_TABLE . '] ( [user_id] [int] NOT NULL , [username_clean] [varchar] (255) DEFAULT (\'\') NOT NULL )'; break; case 'mysql_40': - $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id mediumint(8) NOT NULL, username_clean blob NOT NULL )'; break; case 'mysql_41': - $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id mediumint(8) NOT NULL, username_clean varchar(255) DEFAULT \'\' NOT NULL ) CHARACTER SET `utf8` COLLATE `utf8_bin`'; break; case 'oracle': - $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id number(8) NOT NULL, username_clean varchar2(255) DEFAULT \'\' )'; break; case 'postgres': - $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id INT4 DEFAULT \'0\', username_clean varchar_ci DEFAULT \'\' NOT NULL )'; break; case 'sqlite': - $create_sql = 'CREATE TABLE ' . $table_prefix . 'userconv ( + $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( user_id INTEGER NOT NULL DEFAULT \'0\', username_clean varchar(255) NOT NULL DEFAULT \'\' )'; @@ -1792,37 +1792,15 @@ function phpbb_check_username_collisions() $db->sql_query($drop_sql); $db->sql_return_on_error(false); $db->sql_query($create_sql); +} - // now select all user_ids and usernames and then convert the username (this can take quite a while!) - $sql = 'SELECT user_id, username - FROM ' . $convert->src_table_prefix . 'users'; - $result = $src_db->sql_query($sql); - - $insert_ary = array(); - $i = 0; - while ($row = $src_db->sql_fetchrow($result)) - { - $clean_name = utf8_clean_string(phpbb_set_default_encoding($row['username'])); - $insert_ary[] = array('user_id' => (int) $row['user_id'], 'username_clean' => (string) $clean_name); - - if ($i % 1000 == 999) - { - $db->sql_multi_insert($table_prefix . 'userconv', $insert_ary); - $insert_ary = array(); - } - $i++; - } - $src_db->sql_freeresult($result); - - if (sizeof($insert_ary)) - { - $db->sql_multi_insert($table_prefix . 'userconv', $insert_ary); - } - unset($insert_ary); +function phpbb_check_username_collisions() +{ + global $db, $src_db, $convert, $table_prefix, $user, $lang; // now find the clean version of the usernames that collide $sql = 'SELECT username_clean - FROM ' . $table_prefix . 'userconv + FROM ' . USERCONV_TABLE .' GROUP BY username_clean HAVING COUNT(user_id) > 1'; $result = $db->sql_query($sql); @@ -1838,7 +1816,7 @@ function phpbb_check_username_collisions() if (sizeof($colliding_names)) { $sql = 'SELECT user_id, username_clean - FROM ' . $table_prefix . 'userconv + FROM ' . USERCONV_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $colliding_names); $result = $db->sql_query($sql); unset($colliding_names); @@ -1881,6 +1859,7 @@ function phpbb_check_username_collisions() $convert->p_master->error('<span style="color:red">' . $user->lang['COLLIDING_USERNAMES_FOUND'] . '</span></b><br /><br />' . $list . '<b>', __LINE__, __FILE__); } + $drop_sql = 'DROP TABLE ' . USERCONV_TABLE; $db->sql_query($drop_sql); } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 48fd4e3ad2..a0627a917f 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.3'; +$updates_to_version = '3.0.4-RC1'; // Return if we "just include it" to find out for which version the database update is responsible for if (defined('IN_PHPBB') && defined('IN_INSTALL')) @@ -548,6 +548,45 @@ $database_update_info = array( // No changes from 3.0.3-RC1 to 3.0.3 '3.0.3-RC1' => array(), + + // Changes from 3.0.3 to 3.0.4-RC1 + '3.0.3' => array( + 'add_columns' => array( + PROFILE_FIELDS_TABLE => array( + 'field_show_profile' => array('BOOL', 0), + ), + ), + 'change_columns' => array( + STYLES_TABLE => array( + 'style_id' => array('UINT', NULL, 'auto_increment'), + 'template_id' => array('UINT', 0), + 'theme_id' => array('UINT', 0), + 'imageset_id' => array('UINT', 0), + ), + STYLES_IMAGESET_TABLE => array( + 'imageset_id' => array('UINT', NULL, 'auto_increment'), + ), + STYLES_IMAGESET_DATA_TABLE => array( + 'image_id' => array('UINT', NULL, 'auto_increment'), + 'imageset_id' => array('UINT', 0), + ), + STYLES_THEME_TABLE => array( + 'theme_id' => array('UINT', NULL, 'auto_increment'), + ), + STYLES_TEMPLATE_TABLE => array( + 'template_id' => array('UINT', NULL, 'auto_increment'), + ), + STYLES_TEMPLATE_DATA_TABLE => array( + 'template_id' => array('UINT', 0), + ), + FORUMS_TABLE => array( + 'forum_style' => array('USINT', 0), + ), + USERS_TABLE => array( + 'user_style' => array('UINT', 0), + ), + ), + ), ); // Determine mapping database type @@ -1948,6 +1987,47 @@ function change_database_data(&$no_updates, $version) $no_updates = false; break; + + // Changes from 3.0.3 to 3.0.4-RC1 + case '3.0.3': + // Update the Custom Profile Fields based on previous settings to the new format + $sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide + FROM ' . PROFILE_FIELDS_TABLE; + $result = _sql($sql, $errored, $error_ary); + + while ($row = $db->sql_fetchrow($result)) + { + $sql_ary = array( + 'field_required' => 0, + 'field_show_on_reg' => 0, + 'field_hide' => 0, + 'field_show_profile'=> 0, + ); + + if ($row['field_required']) + { + $sql_ary['field_required'] = $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1; + } + else if ($row['field_show_on_reg']) + { + $sql_ary['field_show_on_reg'] = $sql_ary['field_show_profile'] = 1; + } + else if ($row['field_hide']) + { + // Only administrators and moderators can see this CPF, if the view is enabled, they can see it, otherwise just admins in the acp_users module + $sql_ary['field_hide'] = 1; + } + else + { + // equivelant to "none", which is the "Display in user control panel" option + $sql_ary['field_show_profile'] = 1; + } + + _sql('UPDATE ' . PROFILE_FIELDS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE field_id = ' . $row['field_id'], $errored, $error_ary); + } + + $no_updates = false; + break; } } @@ -3082,4 +3162,4 @@ function utf8_new_clean_string($text) return trim($text); } -?>
\ No newline at end of file +?> diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index e3e2e43723..8ac371b9ed 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -786,6 +786,7 @@ CREATE TABLE phpbb_profile_fields ( field_validation VARCHAR(20) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, field_required INTEGER DEFAULT 0 NOT NULL, field_show_on_reg 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, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 3a3d3fcbd4..445a0eda08 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -942,6 +942,7 @@ CREATE TABLE [phpbb_profile_fields] ( [field_validation] [varchar] (20) DEFAULT ('') NOT NULL , [field_required] [int] DEFAULT (0) NOT NULL , [field_show_on_reg] [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 , diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 01d8efa921..a18b99eecd 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -228,7 +228,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varbinary(8) DEFAULT '' NOT NULL, forum_link blob NOT NULL, forum_password varbinary(120) DEFAULT '' NOT NULL, - forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_image varbinary(255) DEFAULT '' NOT NULL, forum_rules blob NOT NULL, forum_rules_link blob NOT NULL, @@ -550,6 +550,7 @@ CREATE TABLE phpbb_profile_fields ( field_validation varbinary(60) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg 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, @@ -717,13 +718,13 @@ CREATE TABLE phpbb_smilies ( # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( - style_id smallint(4) UNSIGNED NOT NULL auto_increment, + style_id mediumint(8) UNSIGNED NOT NULL auto_increment, style_name blob NOT NULL, style_copyright blob NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (style_id), UNIQUE style_name (style_name(255)), KEY template_id (template_id), @@ -734,7 +735,7 @@ CREATE TABLE phpbb_styles ( # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( - template_id smallint(4) UNSIGNED NOT NULL auto_increment, + template_id mediumint(8) UNSIGNED NOT NULL auto_increment, template_name blob NOT NULL, template_copyright blob NOT NULL, template_path varbinary(100) DEFAULT '' NOT NULL, @@ -749,7 +750,7 @@ CREATE TABLE phpbb_styles_template ( # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( - template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, template_filename varbinary(100) DEFAULT '' NOT NULL, template_included blob NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -761,7 +762,7 @@ CREATE TABLE phpbb_styles_template_data ( # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( - theme_id smallint(4) UNSIGNED NOT NULL auto_increment, + theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, theme_name blob NOT NULL, theme_copyright blob NOT NULL, theme_path varbinary(100) DEFAULT '' NOT NULL, @@ -775,7 +776,7 @@ CREATE TABLE phpbb_styles_theme ( # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( - imageset_id smallint(4) UNSIGNED NOT NULL auto_increment, + imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment, imageset_name blob NOT NULL, imageset_copyright blob NOT NULL, imageset_path varbinary(100) DEFAULT '' NOT NULL, @@ -786,13 +787,13 @@ CREATE TABLE phpbb_styles_imageset ( # Table: 'phpbb_styles_imageset_data' CREATE TABLE phpbb_styles_imageset_data ( - image_id smallint(4) UNSIGNED NOT NULL auto_increment, + image_id mediumint(8) UNSIGNED NOT NULL auto_increment, image_name varbinary(200) DEFAULT '' NOT NULL, image_filename varbinary(200) DEFAULT '' NOT NULL, image_lang varbinary(30) DEFAULT '' NOT NULL, image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (image_id), KEY i_d (imageset_id) ); @@ -920,7 +921,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_dateformat varbinary(90) DEFAULT 'd M Y H:i' NOT NULL, - user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varbinary(6) DEFAULT '' NOT NULL, user_new_privmsg int(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 0119e4ce9d..8b001f4d1b 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -228,7 +228,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varchar(8) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, forum_password varchar(40) DEFAULT '' NOT NULL, - forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + forum_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules text NOT NULL, forum_rules_link varchar(255) DEFAULT '' NOT NULL, @@ -550,6 +550,7 @@ CREATE TABLE phpbb_profile_fields ( field_validation varchar(20) DEFAULT '' NOT NULL, field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, field_show_on_reg 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, @@ -717,13 +718,13 @@ CREATE TABLE phpbb_smilies ( # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( - style_id smallint(4) UNSIGNED NOT NULL auto_increment, + style_id mediumint(8) UNSIGNED NOT NULL auto_increment, style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (style_id), UNIQUE style_name (style_name), KEY template_id (template_id), @@ -734,7 +735,7 @@ CREATE TABLE phpbb_styles ( # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( - template_id smallint(4) UNSIGNED NOT NULL auto_increment, + template_id mediumint(8) UNSIGNED NOT NULL auto_increment, template_name varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL, @@ -749,7 +750,7 @@ CREATE TABLE phpbb_styles_template ( # Table: 'phpbb_styles_template_data' CREATE TABLE phpbb_styles_template_data ( - template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, template_filename varchar(100) DEFAULT '' NOT NULL, template_included text NOT NULL, template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -761,7 +762,7 @@ CREATE TABLE phpbb_styles_template_data ( # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( - theme_id smallint(4) UNSIGNED NOT NULL auto_increment, + theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, theme_name varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL, @@ -775,7 +776,7 @@ CREATE TABLE phpbb_styles_theme ( # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( - imageset_id smallint(4) UNSIGNED NOT NULL auto_increment, + imageset_id mediumint(8) UNSIGNED NOT NULL auto_increment, imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, @@ -786,13 +787,13 @@ CREATE TABLE phpbb_styles_imageset ( # Table: 'phpbb_styles_imageset_data' CREATE TABLE phpbb_styles_imageset_data ( - image_id smallint(4) UNSIGNED NOT NULL auto_increment, + image_id mediumint(8) UNSIGNED NOT NULL auto_increment, image_name varchar(200) DEFAULT '' NOT NULL, image_filename varchar(200) DEFAULT '' NOT NULL, image_lang varchar(30) DEFAULT '' NOT NULL, image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, - imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + imageset_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (image_id), KEY i_d (imageset_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; @@ -920,7 +921,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, - user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_style mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, user_new_privmsg int(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index c9b138b8d8..401106ac83 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -485,7 +485,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varchar2(8) DEFAULT '' , forum_link varchar2(765) DEFAULT '' , forum_password varchar2(120) DEFAULT '' , - forum_style number(4) DEFAULT '0' NOT NULL, + forum_style number(8) DEFAULT '0' NOT NULL, forum_image varchar2(255) DEFAULT '' , forum_rules clob DEFAULT '' , forum_rules_link varchar2(765) DEFAULT '' , @@ -1056,6 +1056,7 @@ CREATE TABLE phpbb_profile_fields ( field_validation varchar2(60) DEFAULT '' , field_required number(1) DEFAULT '0' NOT NULL, field_show_on_reg 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, @@ -1387,13 +1388,13 @@ END; Table: 'phpbb_styles' */ CREATE TABLE phpbb_styles ( - style_id number(4) NOT NULL, + style_id number(8) NOT NULL, style_name varchar2(765) DEFAULT '' , style_copyright varchar2(765) DEFAULT '' , style_active number(1) DEFAULT '1' NOT NULL, - template_id number(4) DEFAULT '0' NOT NULL, - theme_id number(4) DEFAULT '0' NOT NULL, - imageset_id number(4) DEFAULT '0' NOT NULL, + template_id number(8) DEFAULT '0' NOT NULL, + theme_id number(8) DEFAULT '0' NOT NULL, + imageset_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id), CONSTRAINT u_phpbb_style_name UNIQUE (style_name) ) @@ -1426,7 +1427,7 @@ END; Table: 'phpbb_styles_template' */ CREATE TABLE phpbb_styles_template ( - template_id number(4) NOT NULL, + template_id number(8) NOT NULL, template_name varchar2(765) DEFAULT '' , template_copyright varchar2(765) DEFAULT '' , template_path varchar2(100) DEFAULT '' , @@ -1460,7 +1461,7 @@ END; Table: 'phpbb_styles_template_data' */ CREATE TABLE phpbb_styles_template_data ( - template_id number(4) DEFAULT '0' NOT NULL, + template_id number(8) DEFAULT '0' NOT NULL, template_filename varchar2(100) DEFAULT '' , template_included clob DEFAULT '' , template_mtime number(11) DEFAULT '0' NOT NULL, @@ -1477,7 +1478,7 @@ CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (templ Table: 'phpbb_styles_theme' */ CREATE TABLE phpbb_styles_theme ( - theme_id number(4) NOT NULL, + theme_id number(8) NOT NULL, theme_name varchar2(765) DEFAULT '' , theme_copyright varchar2(765) DEFAULT '' , theme_path varchar2(100) DEFAULT '' , @@ -1510,7 +1511,7 @@ END; Table: 'phpbb_styles_imageset' */ CREATE TABLE phpbb_styles_imageset ( - imageset_id number(4) NOT NULL, + imageset_id number(8) NOT NULL, imageset_name varchar2(765) DEFAULT '' , imageset_copyright varchar2(765) DEFAULT '' , imageset_path varchar2(100) DEFAULT '' , @@ -1540,13 +1541,13 @@ END; Table: 'phpbb_styles_imageset_data' */ CREATE TABLE phpbb_styles_imageset_data ( - image_id number(4) NOT NULL, + image_id number(8) NOT NULL, image_name varchar2(200) DEFAULT '' , image_filename varchar2(200) DEFAULT '' , image_lang varchar2(30) DEFAULT '' , image_height number(4) DEFAULT '0' NOT NULL, image_width number(4) DEFAULT '0' NOT NULL, - imageset_id number(4) DEFAULT '0' NOT NULL, + imageset_id number(8) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_styles_imageset_data PRIMARY KEY (image_id) ) / @@ -1738,7 +1739,7 @@ CREATE TABLE phpbb_users ( user_timezone number(5, 2) DEFAULT '0' NOT NULL, user_dst number(1) DEFAULT '0' NOT NULL, user_dateformat varchar2(90) DEFAULT 'd M Y H:i' NOT NULL, - user_style number(4) DEFAULT '0' NOT NULL, + user_style number(8) DEFAULT '0' NOT NULL, user_rank number(8) DEFAULT '0' NOT NULL, user_colour varchar2(6) DEFAULT '' , user_new_privmsg number(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 32f3f0cd4a..077078c40f 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -361,7 +361,7 @@ CREATE TABLE phpbb_forums ( forum_desc_uid varchar(8) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, forum_password varchar(40) DEFAULT '' NOT NULL, - forum_style INT2 DEFAULT '0' NOT NULL CHECK (forum_style >= 0), + forum_style INT4 DEFAULT '0' NOT NULL CHECK (forum_style >= 0), forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules varchar(4000) DEFAULT '' NOT NULL, forum_rules_link varchar(255) DEFAULT '' NOT NULL, @@ -737,6 +737,7 @@ CREATE TABLE phpbb_profile_fields ( field_validation varchar(20) DEFAULT '' NOT NULL, field_required INT2 DEFAULT '0' NOT NULL CHECK (field_required >= 0), field_show_on_reg INT2 DEFAULT '0' NOT NULL CHECK (field_show_on_reg >= 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), @@ -946,13 +947,13 @@ CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting) CREATE SEQUENCE phpbb_styles_seq; CREATE TABLE phpbb_styles ( - style_id INT2 DEFAULT nextval('phpbb_styles_seq'), + style_id INT4 DEFAULT nextval('phpbb_styles_seq'), style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0), - template_id INT2 DEFAULT '0' NOT NULL CHECK (template_id >= 0), - theme_id INT2 DEFAULT '0' NOT NULL CHECK (theme_id >= 0), - imageset_id INT2 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), + template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), + theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0), + imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), PRIMARY KEY (style_id) ); @@ -967,7 +968,7 @@ CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id); CREATE SEQUENCE phpbb_styles_template_seq; CREATE TABLE phpbb_styles_template ( - template_id INT2 DEFAULT nextval('phpbb_styles_template_seq'), + template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'), template_name varchar(255) DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL, @@ -984,7 +985,7 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (te Table: 'phpbb_styles_template_data' */ CREATE TABLE phpbb_styles_template_data ( - template_id INT2 DEFAULT '0' NOT NULL CHECK (template_id >= 0), + template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), template_filename varchar(100) DEFAULT '' NOT NULL, template_included varchar(8000) DEFAULT '' NOT NULL, template_mtime INT4 DEFAULT '0' NOT NULL CHECK (template_mtime >= 0), @@ -1000,7 +1001,7 @@ CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (templ CREATE SEQUENCE phpbb_styles_theme_seq; CREATE TABLE phpbb_styles_theme ( - theme_id INT2 DEFAULT nextval('phpbb_styles_theme_seq'), + theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'), theme_name varchar(255) DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL, @@ -1018,7 +1019,7 @@ CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_n CREATE SEQUENCE phpbb_styles_imageset_seq; CREATE TABLE phpbb_styles_imageset ( - imageset_id INT2 DEFAULT nextval('phpbb_styles_imageset_seq'), + imageset_id INT4 DEFAULT nextval('phpbb_styles_imageset_seq'), imageset_name varchar(255) DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, @@ -1033,13 +1034,13 @@ CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (im CREATE SEQUENCE phpbb_styles_imageset_data_seq; CREATE TABLE phpbb_styles_imageset_data ( - image_id INT2 DEFAULT nextval('phpbb_styles_imageset_data_seq'), + image_id INT4 DEFAULT nextval('phpbb_styles_imageset_data_seq'), image_name varchar(200) DEFAULT '' NOT NULL, image_filename varchar(200) DEFAULT '' NOT NULL, image_lang varchar(30) DEFAULT '' NOT NULL, image_height INT2 DEFAULT '0' NOT NULL CHECK (image_height >= 0), image_width INT2 DEFAULT '0' NOT NULL CHECK (image_width >= 0), - imageset_id INT2 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), + imageset_id INT4 DEFAULT '0' NOT NULL CHECK (imageset_id >= 0), PRIMARY KEY (image_id) ); @@ -1183,7 +1184,7 @@ CREATE TABLE phpbb_users ( user_timezone decimal(5,2) DEFAULT '0' NOT NULL, user_dst INT2 DEFAULT '0' NOT NULL CHECK (user_dst >= 0), user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, - user_style INT2 DEFAULT '0' NOT NULL CHECK (user_style >= 0), + user_style INT4 DEFAULT '0' NOT NULL CHECK (user_style >= 0), user_rank INT4 DEFAULT '0' NOT NULL CHECK (user_rank >= 0), user_colour varchar(6) DEFAULT '' NOT NULL, user_new_privmsg INT4 DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 1fd0f96332..f469436e00 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -218,7 +218,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.3'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.4-RC1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 8033b2d583..e60a194839 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -533,6 +533,7 @@ CREATE TABLE phpbb_profile_fields ( field_validation varchar(20) NOT NULL DEFAULT '', field_required INTEGER UNSIGNED NOT NULL DEFAULT '0', field_show_on_reg 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', |
