From 5cbe85bce3a4c54fdb81574be5c2a56aca4952fe Mon Sep 17 00:00:00 2001 From: acydburn Date: Wed, 5 Dec 2007 15:18:21 +0000 Subject: [PATCH] fix unread/new pm columns git-svn-id: http://code.phpbb.com/svn/phpbb/trunk@8267 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/develop/create_schema_files.php | 4 ++-- phpBB/develop/mysql_upgrader.php | 4 ++-- phpBB/install/database_update.php | 12 +++++++++++- phpBB/install/schemas/mysql_40_schema.sql | 4 ++-- phpBB/install/schemas/mysql_41_schema.sql | 4 ++-- phpBB/install/schemas/postgres_schema.sql | 4 ++-- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/install/schemas/sqlite_schema.sql | 4 ++-- 8 files changed, 24 insertions(+), 14 deletions(-) diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index abfe9b33c..9ee9a8129 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -1804,8 +1804,8 @@ function get_schema_struct() 'user_style' => array('USINT', 0), 'user_rank' => array('UINT', 0), 'user_colour' => array('VCHAR:6', ''), - 'user_new_privmsg' => array('TINT:4', 0), - 'user_unread_privmsg' => array('TINT:4', 0), + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), 'user_last_privmsg' => array('TIMESTAMP', 0), 'user_message_rules' => array('BOOL', 0), 'user_full_folder' => array('INT:11', -3), diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 5ad23b0f5..ea64a1a94 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -1276,8 +1276,8 @@ function get_schema_struct() 'user_style' => array('USINT', 0), 'user_rank' => array('UINT', 0), 'user_colour' => array('VCHAR:6', ''), - 'user_new_privmsg' => array('TINT:4', 0), - 'user_unread_privmsg' => array('TINT:4', 0), + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), 'user_last_privmsg' => array('TIMESTAMP', 0), 'user_message_rules' => array('BOOL', 0), 'user_full_folder' => array('INT:11', -3), diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index b3be23858..3b506a55b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.RC8'; +$updates_to_version = '3.0.RC9-dev'; // Return if we "just include it" to find out for which version the database update is responsuble for if (defined('IN_PHPBB') && defined('IN_INSTALL')) @@ -463,6 +463,16 @@ $database_update_info = array( ), ), ), + // Changes from 3.0.RC8 to the next version + '3.0.RC8' => array( + // Change the following columns + 'change_columns' => array( + USERS_TABLE => array( + 'user_new_privmsg' => array('INT:4', 0), + 'user_unread_privmsg' => array('INT:4', 0), + ), + ), + ), ); // Determine mapping database type diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a4f617209..0f20b1030 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -917,8 +917,8 @@ CREATE TABLE phpbb_users ( user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varbinary(6) DEFAULT '' NOT NULL, - user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, - user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 618b98b28..2d91b0259 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -917,8 +917,8 @@ CREATE TABLE phpbb_users ( user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, - user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, - user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, + user_new_privmsg int(4) DEFAULT '0' NOT NULL, + user_unread_privmsg int(4) DEFAULT '0' NOT NULL, user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, user_full_folder int(11) DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 34ebe2274..1f20c1758 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1180,8 +1180,8 @@ CREATE TABLE phpbb_users ( user_style INT2 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 INT2 DEFAULT '0' NOT NULL, - user_unread_privmsg INT2 DEFAULT '0' NOT NULL, + user_new_privmsg INT4 DEFAULT '0' NOT NULL, + user_unread_privmsg INT4 DEFAULT '0' NOT NULL, user_last_privmsg INT4 DEFAULT '0' NOT NULL CHECK (user_last_privmsg >= 0), user_message_rules INT2 DEFAULT '0' NOT NULL CHECK (user_message_rules >= 0), user_full_folder INT4 DEFAULT '-3' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 51e87629f..272b9f13e 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -213,7 +213,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.RC8'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC9-dev'); 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 5e2d28b5b..fa5884cc5 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -887,8 +887,8 @@ CREATE TABLE phpbb_users ( user_style INTEGER UNSIGNED NOT NULL DEFAULT '0', user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0', user_colour varchar(6) NOT NULL DEFAULT '', - user_new_privmsg tinyint(4) NOT NULL DEFAULT '0', - user_unread_privmsg tinyint(4) NOT NULL DEFAULT '0', + user_new_privmsg int(4) NOT NULL DEFAULT '0', + user_unread_privmsg int(4) NOT NULL DEFAULT '0', user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0', user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0', user_full_folder int(11) NOT NULL DEFAULT '-3', -- 2.11.4.GIT