diff --git a/phpBB/adm/style/acp_captcha.html b/phpBB/adm/style/acp_captcha.html index 2fc22d6371..b5524f26e1 100644 --- a/phpBB/adm/style/acp_captcha.html +++ b/phpBB/adm/style/acp_captcha.html @@ -30,7 +30,7 @@
- +
@@ -48,7 +48,7 @@
- +
@@ -67,7 +67,7 @@
- +
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index e7c7b7756f..2e40616b17 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -25,7 +25,7 @@ if (!is_writeable($schema_path)) $schema_data = get_schema_struct(); $dbms_type_map = array( - 'mysql' => array( + 'mysql_41' => array( 'INT:' => 'int(%d)', 'BINT' => 'bigint(20)', 'UINT' => 'mediumint(8) UNSIGNED', @@ -37,12 +37,44 @@ $dbms_type_map = array( 'VCHAR:' => 'varchar(%d)', 'CHAR:' => 'char(%d)', 'XSTEXT' => 'text', + 'XSTEXT_UNI'=> 'text', 'STEXT' => 'text', + 'STEXT_UNI' => 'text', 'TEXT' => 'text', + 'TEXT_UNI' => 'text', 'MTEXT' => 'mediumtext', + 'MTEXT_UNI' => 'mediumtext', 'TIMESTAMP' => 'int(11) UNSIGNED', 'DECIMAL' => 'decimal(5,2)', - 'VCHAR_BIN' => 'varchar(252) /*!40101 CHARACTER SET utf8 */ BINARY', + 'VCHAR_UNI' => 'varchar(255)', + 'VCHAR_UNI:'=> 'varchar(%d)', + 'VCHAR_CI' => 'varchar(252)', + 'VARBINARY' => 'varbinary(255)', + ), + + 'mysql_40' => array( + 'INT:' => 'int(%d)', + 'BINT' => 'bigint(20)', + 'UINT' => 'mediumint(8) UNSIGNED', + 'UINT:' => 'int(%d) UNSIGNED', + 'TINT:' => 'tinyint(%d)', + 'USINT' => 'smallint(4) UNSIGNED', + 'BOOL' => 'tinyint(1) UNSIGNED', + 'VCHAR' => 'varchar(255)', + 'VCHAR:' => 'varchar(%d)', + 'CHAR:' => 'char(%d)', + 'XSTEXT' => 'text', + 'XSTEXT_UNI'=> 'text', + 'STEXT' => 'text', + 'STEXT_UNI' => 'text', + 'TEXT' => 'text', + 'TEXT_UNI' => 'text', + 'MTEXT' => 'mediumtext', + 'MTEXT_UNI' => 'mediumtext', + 'TIMESTAMP' => 'int(11) UNSIGNED', + 'DECIMAL' => 'decimal(5,2)', + 'VCHAR_UNI' => 'varchar(255)', + 'VCHAR_UNI:'=> array('varchar(%d)', 'limit' => array('mult', 3, 255, 'text')), 'VCHAR_CI' => 'varchar(252)', 'VARBINARY' => 'varbinary(255)', ), @@ -62,10 +94,15 @@ $dbms_type_map = array( 'STEXT' => 'BLOB SUB_TYPE TEXT', 'TEXT' => 'BLOB SUB_TYPE TEXT', 'MTEXT' => 'BLOB SUB_TYPE TEXT', + 'XSTEXT_UNI'=> 'BLOB SUB_TYPE TEXT', + 'STEXT_UNI' => 'BLOB SUB_TYPE TEXT', + 'TEXT_UNI' => 'BLOB SUB_TYPE TEXT', + 'MTEXT_UNI' => 'BLOB SUB_TYPE TEXT', 'TIMESTAMP' => 'INTEGER', 'DECIMAL' => 'DOUBLE PRECISION', - 'VCHAR_BIN' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS', - 'VCHAR_CI' => 'VARCHAR(252)', + 'VCHAR_UNI' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS', + 'VCHAR_UNI:'=> array('VARCHAR(%d) CHARACTER SET UNICODE_FSS', 'rule' => array('div', 3)), + 'VCHAR_CI' => 'VARCHAR(84) CHARACTER SET UNICODE_FSS', 'VARBINARY' => 'CHAR(255)', ), @@ -84,10 +121,15 @@ $dbms_type_map = array( 'STEXT' => '[varchar] (3000)', 'TEXT' => '[varchar] (8000)', 'MTEXT' => '[text]', + 'XSTEXT_UNI'=> '[nvarchar] (1000)', + 'STEXT_UNI' => '[nvarchar] (3000)', + 'TEXT_UNI' => '[nvarchar] (8000)', + 'MTEXT_UNI' => '[ntext]', 'TIMESTAMP' => '[int]', 'DECIMAL' => '[float]', - 'VCHAR_BIN' => '[nvarchar] (252)', - 'VCHAR_CI' => '[varchar] (252)', + 'VCHAR_UNI' => '[nvarchar] (255)', + 'VCHAR_UNI:'=> '[nvarchar] (%d)', + 'VCHAR_CI' => '[nvarchar] (252)', 'VARBINARY' => '[varbinary] (255)', ), @@ -106,9 +148,14 @@ $dbms_type_map = array( 'STEXT' => 'varchar2(3000)', 'TEXT' => 'clob', 'MTEXT' => 'clob', + 'XSTEXT_UNI'=> 'varchar2(1000)', + 'STEXT_UNI' => 'varchar2(3000)', + 'TEXT_UNI' => 'clob', + 'MTEXT_UNI' => 'clob', 'TIMESTAMP' => 'number(11)', 'DECIMAL' => 'number(5, 2)', - 'VCHAR_BIN' => 'nvarchar2(252)', + 'VCHAR_UNI' => 'varchar2(255)', + 'VCHAR_UNI:'=> 'varchar2(%d)', 'VCHAR_CI' => 'varchar2(252)', 'VARBINARY' => 'raw(255)', ), @@ -128,9 +175,14 @@ $dbms_type_map = array( 'STEXT' => 'text(65535)', 'TEXT' => 'text(65535)', 'MTEXT' => 'mediumtext(16777215)', + 'XSTEXT_UNI'=> 'text(65535)', + 'STEXT_UNI' => 'text(65535)', + 'TEXT_UNI' => 'text(65535)', + 'MTEXT_UNI' => 'mediumtext(16777215)', 'TIMESTAMP' => 'INTEGER UNSIGNED', //'int(11) UNSIGNED', 'DECIMAL' => 'decimal(5,2)', - 'VCHAR_BIN' => 'nvarchar(252)', + 'VCHAR_UNI' => 'varchar(255)', + 'VCHAR_UNI:'=> 'varchar(%d)', 'VCHAR_CI' => 'varchar(252)', 'VARBINARY' => 'blob', ), @@ -150,9 +202,14 @@ $dbms_type_map = array( 'STEXT' => 'varchar(3000)', 'TEXT' => 'varchar(8000)', 'MTEXT' => 'TEXT', + 'XSTEXT_UNI'=> 'varchar(1000)', + 'STEXT_UNI' => 'varchar(3000)', + 'TEXT_UNI' => 'varchar(8000)', + 'MTEXT_UNI' => 'TEXT', 'TIMESTAMP' => 'INT4', // unsigned 'DECIMAL' => 'decimal(5,2)', - 'VCHAR_BIN' => 'varchar(252)', + 'VCHAR_UNI' => 'varchar(255)', + 'VCHAR_UNI:'=> 'varchar(%d)', 'VCHAR_CI' => 'varchar_ci', 'VARBINARY' => 'bytea', ), @@ -160,7 +217,7 @@ $dbms_type_map = array( // A list of types being unsigned for better reference in some db's $unsigned_types = array('UINT', 'UINT:', 'USINT', 'BOOL', 'TIMESTAMP'); -$supported_dbms = array('firebird', 'mssql', 'mysql', 'oracle', 'postgres', 'sqlite'); +$supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite'); foreach ($supported_dbms as $dbms) { @@ -171,7 +228,8 @@ foreach ($supported_dbms as $dbms) // Write Header switch ($dbms) { - case 'mysql': + case 'mysql_40': + case 'mysql_41': $line = "#\n# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005\n#\n# \$I" . "d: $\n#\n\n"; break; @@ -209,7 +267,8 @@ foreach ($supported_dbms as $dbms) // Write comment about table switch ($dbms) { - case 'mysql': + case 'mysql_40': + case 'mysql_41': case 'firebird': case 'sqlite': fwrite($fp, "# Table: '{$table_name}'\n"); @@ -228,7 +287,8 @@ foreach ($supported_dbms as $dbms) switch ($dbms) { - case 'mysql': + case 'mysql_40': + case 'mysql_41': case 'firebird': case 'oracle': case 'sqlite': @@ -248,8 +308,42 @@ foreach ($supported_dbms as $dbms) if (strpos($column_data[0], ':') !== false) { list($orig_column_type, $column_length) = explode(':', $column_data[0]); + if (!is_array($dbms_type_map[$dbms][$orig_column_type . ':'])) + { + $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length); + } + else + { + if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['rule'])) + { + switch ($dbms_type_map[$dbms][$orig_column_type . ':']['rule'][0]) + { + case 'div': + $column_length /= $dbms_type_map[$dbms][$orig_column_type . ':']['rule'][1]; + $column_length = ceil($column_length); + $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length); + break; + } + } - $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'], $column_length); + if (isset($dbms_type_map[$dbms][$orig_column_type . ':']['limit'])) + { + switch ($dbms_type_map[$dbms][$orig_column_type . ':']['limit'][0]) + { + case 'mult': + $column_length *= $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][1]; + if ($column_length > $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][2]) + { + $column_type = $dbms_type_map[$dbms][$orig_column_type . ':']['limit'][3]; + } + else + { + $column_type = sprintf($dbms_type_map[$dbms][$orig_column_type . ':'][0], $column_length); + } + break; + } + } + } $orig_column_type .= ':'; } else @@ -266,7 +360,8 @@ foreach ($supported_dbms as $dbms) switch ($dbms) { - case 'mysql': + case 'mysql_40': + case 'mysql_41': $line .= "\t{$column_name} {$column_type} "; // For hexadecimal values do not use single quotes @@ -412,7 +507,8 @@ foreach ($supported_dbms as $dbms) switch ($dbms) { - case 'mysql': + case 'mysql_40': + case 'mysql_41': case 'postgres': $line .= "\tPRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . "),\n"; break; @@ -493,7 +589,8 @@ foreach ($supported_dbms as $dbms) switch ($dbms) { - case 'mysql': + case 'mysql_40': + case 'mysql_41': $line .= ($key_data[0] == 'INDEX') ? "\tKEY" : ''; $line .= ($key_data[0] == 'UNIQUE') ? "\tUNIQUE" : ''; $line .= ' ' . $key_name . ' (' . implode(', ', $key_data[1]) . "),\n"; @@ -544,12 +641,18 @@ foreach ($supported_dbms as $dbms) switch ($dbms) { - case 'mysql': + case 'mysql_40': // Remove last line delimiter... $line = substr($line, 0, -2); $line .= "\n);\n\n"; break; + case 'mysql_41': + // Remove last line delimiter... + $line = substr($line, 0, -2); + $line .= "\n) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;\n\n"; + break; + // Create Generator case 'firebird': if ($generator !== false) @@ -632,7 +735,7 @@ foreach ($supported_dbms as $dbms) * VCHAR:x => varchar(x) * TIMESTAMP => int(11) UNSIGNED * DECIMAL => decimal number (5,2) -* VCHAR_BIN => varchar(252) BINARY +* VCHAR_UNI => varchar(252) BINARY * VCHAR_CI => varchar_ci for postgresql, others VCHAR */ function get_schema_struct() @@ -650,7 +753,7 @@ function get_schema_struct() 'physical_filename' => array('VCHAR', ''), 'real_filename' => array('VCHAR', ''), 'download_count' => array('UINT', 0), - 'attach_comment' => array('TEXT', ''), + 'attach_comment' => array('TEXT_UNI', ''), 'extension' => array('VCHAR:100', ''), 'mimetype' => array('VCHAR:100', ''), 'filesize' => array('UINT:20', 0), @@ -698,8 +801,8 @@ function get_schema_struct() $schema_data['phpbb_acl_roles'] = array( 'COLUMNS' => array( 'role_id' => array('UINT', NULL, 'auto_increment'), - 'role_name' => array('VCHAR', ''), - 'role_description' => array('TEXT', ''), + 'role_name' => array('VCHAR_UNI', ''), + 'role_description' => array('TEXT_UNI', ''), 'role_type' => array('VCHAR:10', ''), 'role_order' => array('USINT', 0), ), @@ -738,7 +841,7 @@ function get_schema_struct() 'ban_id' => array('UINT', NULL, 'auto_increment'), 'ban_userid' => array('UINT', 0), 'ban_ip' => array('VCHAR:40', ''), - 'ban_email' => array('VCHAR:100', ''), + 'ban_email' => array('VCHAR_UNI:100', ''), 'ban_start' => array('TIMESTAMP', 0), 'ban_end' => array('TIMESTAMP', 0), 'ban_exclude' => array('BOOL', 0), @@ -789,7 +892,7 @@ function get_schema_struct() 'COLUMNS' => array( 'bot_id' => array('UINT', NULL, 'auto_increment'), 'bot_active' => array('BOOL', 1), - 'bot_name' => array('STEXT', ''), + 'bot_name' => array('STEXT_UNI', ''), 'user_id' => array('UINT', 0), 'bot_agent' => array('VCHAR', ''), 'bot_ip' => array('VCHAR', ''), @@ -828,7 +931,7 @@ function get_schema_struct() $schema_data['phpbb_disallow'] = array( 'COLUMNS' => array( 'disallow_id' => array('UINT', NULL, 'auto_increment'), - 'disallow_username' => array('VCHAR:252', ''), + 'disallow_username' => array('VCHAR_UNI:252', ''), ), 'PRIMARY_KEY' => 'disallow_id', ); @@ -840,8 +943,8 @@ function get_schema_struct() 'topic_id' => array('UINT', 0), 'forum_id' => array('UINT', 0), 'save_time' => array('TIMESTAMP', 0), - 'draft_subject' => array('XSTEXT', ''), - 'draft_message' => array('MTEXT', ''), + 'draft_subject' => array('XSTEXT_UNI', ''), + 'draft_message' => array('MTEXT_UNI', ''), ), 'PRIMARY_KEY' => 'draft_id', 'KEYS' => array( @@ -861,7 +964,7 @@ function get_schema_struct() $schema_data['phpbb_extension_groups'] = array( 'COLUMNS' => array( 'group_id' => array('UINT', NULL, 'auto_increment'), - 'group_name' => array('VCHAR', ''), + 'group_name' => array('VCHAR_UNI', ''), 'cat_id' => array('TINT:2', 0), 'allow_group' => array('BOOL', 0), 'download_mode' => array('BOOL', 1), @@ -880,17 +983,17 @@ function get_schema_struct() 'left_id' => array('UINT', 0), 'right_id' => array('UINT', 0), 'forum_parents' => array('MTEXT', ''), - 'forum_name' => array('STEXT', ''), - 'forum_desc' => array('TEXT', ''), + 'forum_name' => array('STEXT_UNI', ''), + 'forum_desc' => array('TEXT_UNI', ''), 'forum_desc_bitfield' => array('VCHAR:252', ''), 'forum_desc_options' => array('UINT:11', 0), 'forum_desc_uid' => array('VCHAR:5', ''), - 'forum_link' => array('VCHAR', ''), - 'forum_password' => array('VCHAR:40', ''), + 'forum_link' => array('VCHAR_UNI', ''), + 'forum_password' => array('VCHAR_UNI:40', ''), 'forum_style' => array('TINT:4', 0), 'forum_image' => array('VCHAR', ''), - 'forum_rules' => array('TEXT', ''), - 'forum_rules_link' => array('VCHAR', ''), + 'forum_rules' => array('TEXT_UNI', ''), + 'forum_rules_link' => array('VCHAR_UNI', ''), 'forum_rules_bitfield' => array('VCHAR:252', ''), 'forum_rules_options' => array('UINT:11', 0), 'forum_rules_uid' => array('VCHAR:5', ''), @@ -902,9 +1005,9 @@ function get_schema_struct() 'forum_topics_real' => array('UINT', 0), 'forum_last_post_id' => array('UINT', 0), 'forum_last_poster_id' => array('UINT', 0), - 'forum_last_post_subject' => array('XSTEXT', ''), + 'forum_last_post_subject' => array('XSTEXT_UNI', ''), 'forum_last_post_time' => array('TIMESTAMP', 0), - 'forum_last_poster_name'=> array('VCHAR', ''), + 'forum_last_poster_name'=> array('VCHAR_UNI', ''), 'forum_last_poster_colour'=> array('VCHAR:6', ''), 'forum_flags' => array('TINT:4', 32), 'display_on_index' => array('BOOL', 1), @@ -959,7 +1062,7 @@ function get_schema_struct() 'group_id' => array('UINT', NULL, 'auto_increment'), 'group_type' => array('TINT:4', 1), 'group_name' => array('VCHAR_CI', ''), - 'group_desc' => array('TEXT', ''), + 'group_desc' => array('TEXT_UNI', ''), 'group_desc_bitfield' => array('VCHAR:252', ''), 'group_desc_options' => array('UINT:11', 0), 'group_desc_uid' => array('VCHAR:5', ''), @@ -1001,9 +1104,9 @@ function get_schema_struct() 'lang_id' => array('TINT:4', NULL, 'auto_increment'), 'lang_iso' => array('VCHAR:30', ''), 'lang_dir' => array('VCHAR:30', ''), - 'lang_english_name' => array('VCHAR:100', ''), - 'lang_local_name' => array('VCHAR:255', ''), - 'lang_author' => array('VCHAR:255', ''), + 'lang_english_name' => array('VCHAR_UNI:100', ''), + 'lang_local_name' => array('VCHAR_UNI:255', ''), + 'lang_author' => array('VCHAR_UNI:255', ''), ), 'PRIMARY_KEY' => 'lang_id', 'KEYS' => array( @@ -1021,8 +1124,8 @@ function get_schema_struct() 'reportee_id' => array('UINT', 0), 'log_ip' => array('VCHAR:40', ''), 'log_time' => array('TIMESTAMP', 0), - 'log_operation' => array('TEXT', ''), - 'log_data' => array('MTEXT', ''), + 'log_operation' => array('TEXT_UNI', ''), + 'log_data' => array('MTEXT_UNI', ''), ), 'PRIMARY_KEY' => 'log_id', 'KEYS' => array( @@ -1038,9 +1141,9 @@ function get_schema_struct() 'COLUMNS' => array( 'forum_id' => array('UINT', 0), 'user_id' => array('UINT', 0), - 'username' => array('VCHAR:252', ''), + 'username' => array('VCHAR_UNI:252', ''), 'group_id' => array('UINT', 0), - 'group_name' => array('VCHAR', ''), + 'group_name' => array('VCHAR_UNI', ''), 'display_on_index' => array('BOOL', 1), ), 'KEYS' => array( @@ -1075,7 +1178,7 @@ function get_schema_struct() 'COLUMNS' => array( 'poll_option_id' => array('TINT:4', 0), 'topic_id' => array('UINT', 0), - 'poll_option_text' => array('TEXT', ''), + 'poll_option_text' => array('TEXT_UNI', ''), 'poll_option_total' => array('UINT', 0), ), 'KEYS' => array( @@ -1113,9 +1216,9 @@ function get_schema_struct() 'enable_smilies' => array('BOOL', 1), 'enable_magic_url' => array('BOOL', 1), 'enable_sig' => array('BOOL', 1), - 'post_username' => array('VCHAR:252', ''), - 'post_subject' => array('XSTEXT', ''), - 'post_text' => array('MTEXT', ''), + 'post_username' => array('VCHAR_UNI:252', ''), + 'post_subject' => array('XSTEXT_UNI', ''), + 'post_text' => array('MTEXT_UNI', ''), 'post_checksum' => array('VCHAR:32', ''), 'post_encoding' => array('VCHAR:20', 'iso-8859-1'), 'post_attachment' => array('BOOL', 0), @@ -1123,7 +1226,7 @@ function get_schema_struct() 'bbcode_uid' => array('VCHAR:5', ''), 'post_postcount' => array('BOOL', 1), 'post_edit_time' => array('TIMESTAMP', 0), - 'post_edit_reason' => array('STEXT', ''), + 'post_edit_reason' => array('STEXT_UNI', ''), 'post_edit_user' => array('UINT', 0), 'post_edit_count' => array('USINT', 0), 'post_edit_locked' => array('BOOL', 0), @@ -1152,9 +1255,9 @@ function get_schema_struct() 'enable_smilies' => array('BOOL', 1), 'enable_magic_url' => array('BOOL', 1), 'enable_sig' => array('BOOL', 1), - 'message_subject' => array('XSTEXT', ''), - 'message_text' => array('MTEXT', ''), - 'message_edit_reason' => array('STEXT', ''), + 'message_subject' => array('XSTEXT_UNI', ''), + 'message_text' => array('MTEXT_UNI', ''), + 'message_edit_reason' => array('STEXT_UNI', ''), 'message_edit_user' => array('UINT', 0), 'message_encoding' => array('VCHAR:20', 'iso-8859-1'), 'message_attachment' => array('BOOL', 0), @@ -1162,8 +1265,8 @@ function get_schema_struct() 'bbcode_uid' => array('VCHAR:5', ''), 'message_edit_time' => array('TIMESTAMP', 0), 'message_edit_count' => array('USINT', 0), - 'to_address' => array('TEXT', ''), - 'bcc_address' => array('TEXT', ''), + 'to_address' => array('TEXT_UNI', ''), + 'bcc_address' => array('TEXT_UNI', ''), ), 'PRIMARY_KEY' => 'msg_id', 'KEYS' => array( @@ -1178,7 +1281,7 @@ function get_schema_struct() 'COLUMNS' => array( 'folder_id' => array('UINT', NULL, 'auto_increment'), 'user_id' => array('UINT', 0), - 'folder_name' => array('VCHAR', ''), + 'folder_name' => array('VCHAR_UNI', ''), 'pm_count' => array('UINT', 0), ), 'PRIMARY_KEY' => 'folder_id', @@ -1193,7 +1296,7 @@ function get_schema_struct() 'user_id' => array('UINT', 0), 'rule_check' => array('UINT', 0), 'rule_connection' => array('UINT', 0), - 'rule_string' => array('VCHAR', ''), + 'rule_string' => array('VCHAR_UNI', ''), 'rule_user_id' => array('UINT', 0), 'rule_group_id' => array('UINT', 0), 'rule_action' => array('UINT', 0), @@ -1228,15 +1331,15 @@ function get_schema_struct() $schema_data['phpbb_profile_fields'] = array( 'COLUMNS' => array( 'field_id' => array('UINT', NULL, 'auto_increment'), - 'field_name' => array('VCHAR', ''), + 'field_name' => array('VCHAR_UNI', ''), 'field_type' => array('TINT:4', 0), 'field_ident' => array('VCHAR:20', ''), 'field_length' => array('VCHAR:20', ''), 'field_minlen' => array('VCHAR', ''), 'field_maxlen' => array('VCHAR', ''), - 'field_novalue' => array('VCHAR', ''), - 'field_default_value' => array('VCHAR', ''), - 'field_validation' => array('VCHAR:20', ''), + 'field_novalue' => array('VCHAR_UNI', ''), + 'field_default_value' => array('VCHAR_UNI', ''), + 'field_validation' => array('VCHAR_UNI:20', ''), 'field_required' => array('BOOL', 0), 'field_show_on_reg' => array('BOOL', 0), 'field_hide' => array('BOOL', 0), @@ -1264,7 +1367,7 @@ function get_schema_struct() 'lang_id' => array('UINT', 0), 'option_id' => array('UINT', 0), 'field_type' => array('TINT:4', 0), - 'lang_value' => array('VCHAR', ''), + 'lang_value' => array('VCHAR_UNI', ''), ), 'PRIMARY_KEY' => array('field_id', 'lang_id', 'option_id'), ); @@ -1273,9 +1376,9 @@ function get_schema_struct() 'COLUMNS' => array( 'field_id' => array('UINT', 0), 'lang_id' => array('UINT', 0), - 'lang_name' => array('VCHAR', ''), - 'lang_explain' => array('TEXT', ''), - 'lang_default_value' => array('VCHAR', ''), + 'lang_name' => array('VCHAR_UNI', ''), + 'lang_explain' => array('TEXT_UNI', ''), + 'lang_default_value' => array('VCHAR_UNI', ''), ), 'PRIMARY_KEY' => array('field_id', 'lang_id'), ); @@ -1283,7 +1386,7 @@ function get_schema_struct() $schema_data['phpbb_ranks'] = array( 'COLUMNS' => array( 'rank_id' => array('UINT', NULL, 'auto_increment'), - 'rank_title' => array('VCHAR', ''), + 'rank_title' => array('VCHAR_UNI', ''), 'rank_min' => array('UINT', 0), 'rank_special' => array('BOOL', 0), 'rank_image' => array('VCHAR', ''), @@ -1300,7 +1403,7 @@ function get_schema_struct() 'user_notify' => array('BOOL', 0), 'report_closed' => array('BOOL', 0), 'report_time' => array('TIMESTAMP', 0), - 'report_text' => array('MTEXT', ''), + 'report_text' => array('MTEXT_UNI', ''), ), 'PRIMARY_KEY' => 'report_id', ); @@ -1308,8 +1411,8 @@ function get_schema_struct() $schema_data['phpbb_reports_reasons'] = array( 'COLUMNS' => array( 'reason_id' => array('USINT', NULL, 'auto_increment'), - 'reason_title' => array('VCHAR', ''), - 'reason_description' => array('MTEXT', ''), + 'reason_title' => array('VCHAR_UNI', ''), + 'reason_description' => array('MTEXT_UNI', ''), 'reason_order' => array('USINT', 0), ), 'PRIMARY_KEY' => 'reason_id', @@ -1319,7 +1422,7 @@ function get_schema_struct() 'COLUMNS' => array( 'search_key' => array('VCHAR:32', ''), 'search_time' => array('TIMESTAMP', 0), - 'search_keywords' => array('MTEXT', ''), + 'search_keywords' => array('MTEXT_UNI', ''), 'search_authors' => array('MTEXT', ''), ), 'PRIMARY_KEY' => 'search_key', @@ -1328,7 +1431,7 @@ function get_schema_struct() $schema_data['phpbb_search_wordlist'] = array( 'COLUMNS' => array( 'word_id' => array('UINT', NULL, 'auto_increment'), - 'word_text' => array('VCHAR_BIN', ''), + 'word_text' => array('VCHAR_UNI', ''), 'word_common' => array('BOOL', 0), ), 'PRIMARY_KEY' => 'word_id', @@ -1358,7 +1461,7 @@ function get_schema_struct() 'session_time' => array('TIMESTAMP', 0), 'session_ip' => array('VCHAR:40', ''), 'session_browser' => array('VCHAR:150', ''), - 'session_page' => array('VCHAR', ''), + 'session_page' => array('VCHAR_UNI', ''), 'session_viewonline' => array('BOOL', 1), 'session_autologin' => array('BOOL', 0), 'session_admin' => array('BOOL', 0), @@ -1396,8 +1499,8 @@ function get_schema_struct() $schema_data['phpbb_smilies'] = array( 'COLUMNS' => array( 'smiley_id' => array('UINT', NULL, 'auto_increment'), - 'code' => array('VCHAR:50', ''), - 'emotion' => array('VCHAR:50', ''), + 'code' => array('VCHAR_UNI:50', ''), + 'emotion' => array('VCHAR_UNI:50', ''), 'smiley_url' => array('VCHAR:50', ''), 'smiley_width' => array('USINT', 0), 'smiley_height' => array('USINT', 0), @@ -1413,8 +1516,8 @@ function get_schema_struct() $schema_data['phpbb_styles'] = array( 'COLUMNS' => array( 'style_id' => array('TINT:4', NULL, 'auto_increment'), - 'style_name' => array('VCHAR:252', ''), - 'style_copyright' => array('VCHAR', ''), + 'style_name' => array('VCHAR_UNI:252', ''), + 'style_copyright' => array('VCHAR_UNI', ''), 'style_active' => array('BOOL', 1), 'template_id' => array('TINT:4', 0), 'theme_id' => array('TINT:4', 0), @@ -1432,8 +1535,8 @@ function get_schema_struct() $schema_data['phpbb_styles_template'] = array( 'COLUMNS' => array( 'template_id' => array('TINT:4', NULL, 'auto_increment'), - 'template_name' => array('VCHAR:252', ''), - 'template_copyright' => array('VCHAR', ''), + 'template_name' => array('VCHAR_UNI:252', ''), + 'template_copyright' => array('VCHAR_UNI', ''), 'template_path' => array('VCHAR:100', ''), 'bbcode_bitfield' => array('VCHAR:252', 'kNg='), 'template_storedb' => array('BOOL', 0), @@ -1450,7 +1553,7 @@ function get_schema_struct() 'template_filename' => array('VCHAR:100', ''), 'template_included' => array('TEXT', ''), 'template_mtime' => array('TIMESTAMP', 0), - 'template_data' => array('MTEXT', ''), + 'template_data' => array('MTEXT_UNI', ''), ), 'KEYS' => array( 'tid' => array('INDEX', 'template_id'), @@ -1461,12 +1564,12 @@ function get_schema_struct() $schema_data['phpbb_styles_theme'] = array( 'COLUMNS' => array( 'theme_id' => array('TINT:4', NULL, 'auto_increment'), - 'theme_name' => array('VCHAR:252', ''), - 'theme_copyright' => array('VCHAR', ''), + 'theme_name' => array('VCHAR_UNI:252', ''), + 'theme_copyright' => array('VCHAR_UNI', ''), 'theme_path' => array('VCHAR:100', ''), 'theme_storedb' => array('BOOL', 0), 'theme_mtime' => array('TIMESTAMP', 0), - 'theme_data' => array('MTEXT', ''), + 'theme_data' => array('MTEXT_UNI', ''), ), 'PRIMARY_KEY' => 'theme_id', 'KEYS' => array( @@ -1477,8 +1580,8 @@ function get_schema_struct() $schema_data['phpbb_styles_imageset'] = array( 'COLUMNS' => array( 'imageset_id' => array('TINT:4', NULL, 'auto_increment'), - 'imageset_name' => array('VCHAR:252', ''), - 'imageset_copyright' => array('VCHAR', ''), + 'imageset_name' => array('VCHAR_UNI:252', ''), + 'imageset_copyright' => array('VCHAR_UNI', ''), 'imageset_path' => array('VCHAR:100', ''), 'site_logo' => array('VCHAR:200', ''), @@ -1604,7 +1707,7 @@ function get_schema_struct() 'topic_attachment' => array('BOOL', 0), 'topic_approved' => array('BOOL', 1), 'topic_reported' => array('BOOL', 0), - 'topic_title' => array('XSTEXT', ''), + 'topic_title' => array('XSTEXT_UNI', ''), 'topic_poster' => array('UINT', 0), 'topic_time' => array('TIMESTAMP', 0), 'topic_time_limit' => array('TIMESTAMP', 0), @@ -1614,19 +1717,19 @@ function get_schema_struct() 'topic_status' => array('TINT:3', 0), 'topic_type' => array('TINT:3', 0), 'topic_first_post_id' => array('UINT', 0), - 'topic_first_poster_name' => array('VCHAR', ''), + 'topic_first_poster_name' => array('VCHAR_UNI', ''), 'topic_first_poster_colour' => array('VCHAR:6', ''), 'topic_last_post_id' => array('UINT', 0), 'topic_last_poster_id' => array('UINT', 0), - 'topic_last_poster_name' => array('VCHAR', ''), + 'topic_last_poster_name' => array('VCHAR_UNI', ''), 'topic_last_poster_colour' => array('VCHAR:6', ''), - 'topic_last_post_subject' => array('XSTEXT', ''), + 'topic_last_post_subject' => array('XSTEXT_UNI', ''), 'topic_last_post_time' => array('TIMESTAMP', 0), 'topic_last_view_time' => array('TIMESTAMP', 0), 'topic_moved_id' => array('UINT', 0), 'topic_bumped' => array('BOOL', 0), 'topic_bumper' => array('UINT', 0), - 'poll_title' => array('XSTEXT', ''), + 'poll_title' => array('XSTEXT_UNI', ''), 'poll_start' => array('TIMESTAMP', 0), 'poll_length' => array('TIMESTAMP', 0), 'poll_max_options' => array('TINT:4', 1), @@ -1701,15 +1804,15 @@ function get_schema_struct() 'user_ip' => array('VCHAR:40', ''), 'user_regdate' => array('TIMESTAMP', 0), 'username' => array('VCHAR_CI', ''), - 'user_password' => array('VCHAR:40', ''), + 'user_password' => array('VCHAR_UNI:40', ''), 'user_passchg' => array('TIMESTAMP', 0), - 'user_email' => array('VCHAR:100', ''), + 'user_email' => array('VCHAR_UNI:100', ''), 'user_email_hash' => array('BINT', 0), 'user_birthday' => array('VCHAR:10', ''), 'user_lastvisit' => array('TIMESTAMP', 0), 'user_lastmark' => array('TIMESTAMP', 0), 'user_lastpost_time' => array('TIMESTAMP', 0), - 'user_lastpage' => array('VCHAR:200', ''), + 'user_lastpage' => array('VCHAR_UNI:200', ''), 'user_last_confirm_key' => array('VCHAR:10', ''), 'user_last_search' => array('TIMESTAMP', 0), 'user_warnings' => array('TINT:4', 0), @@ -1719,7 +1822,7 @@ function get_schema_struct() 'user_lang' => array('VCHAR:30', ''), 'user_timezone' => array('DECIMAL', 0), 'user_dst' => array('BOOL', 0), - 'user_dateformat' => array('VCHAR:30', 'd M Y H:i'), + 'user_dateformat' => array('VCHAR_UNI:30', 'd M Y H:i'), 'user_style' => array('TINT:4', 0), 'user_rank' => array('UINT', 0), 'user_colour' => array('VCHAR:6', ''), @@ -1748,20 +1851,20 @@ function get_schema_struct() 'user_avatar_type' => array('TINT:2', 0), 'user_avatar_width' => array('USINT', 0), 'user_avatar_height' => array('USINT', 0), - 'user_sig' => array('MTEXT', ''), + 'user_sig' => array('MTEXT_UNI', ''), 'user_sig_bbcode_uid' => array('VCHAR:5', ''), 'user_sig_bbcode_bitfield' => array('VCHAR:252', ''), - 'user_from' => array('VCHAR:100', ''), + 'user_from' => array('VCHAR_UNI:100', ''), 'user_icq' => array('VCHAR:15', ''), - 'user_aim' => array('VCHAR', ''), - 'user_yim' => array('VCHAR', ''), - 'user_msnm' => array('VCHAR', ''), - 'user_jabber' => array('VCHAR', ''), - 'user_website' => array('VCHAR:200', ''), - 'user_occ' => array('VCHAR', ''), - 'user_interests' => array('TEXT', ''), + 'user_aim' => array('VCHAR_UNI', ''), + 'user_yim' => array('VCHAR_UNI', ''), + 'user_msnm' => array('VCHAR_UNI', ''), + 'user_jabber' => array('VCHAR_UNI', ''), + 'user_website' => array('VCHAR_UNI:200', ''), + 'user_occ' => array('VCHAR_UNI', ''), + 'user_interests' => array('TEXT_UNI', ''), 'user_actkey' => array('VCHAR:32', ''), - 'user_newpasswd' => array('VCHAR:32', ''), + 'user_newpasswd' => array('VCHAR_UNI:32', ''), ), 'PRIMARY_KEY' => 'user_id', 'KEYS' => array( @@ -1786,8 +1889,8 @@ function get_schema_struct() $schema_data['phpbb_words'] = array( 'COLUMNS' => array( 'word_id' => array('UINT', NULL, 'auto_increment'), - 'word' => array('VCHAR', ''), - 'replacement' => array('VCHAR', ''), + 'word' => array('VCHAR_UNI', ''), + 'replacement' => array('VCHAR_UNI', ''), ), 'PRIMARY_KEY' => 'word_id', ); diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php index dd89de5e5c..3740d22669 100644 --- a/phpBB/includes/db/mysql4.php +++ b/phpBB/includes/db/mysql4.php @@ -27,7 +27,6 @@ if (!defined('SQL_LAYER')) /** * MySQL4 Database Abstraction Layer * Compatible with: -* MySQL 4.0+ * MySQL 4.1+ * MySQL 5.0+ * @package dbal diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index e87b7aa1f9..b988bc6a3c 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -42,7 +42,7 @@ class dbal_oracle extends dbal $this->server = $sqlserver . (($port) ? ':' . $port : ''); $this->dbname = $database; - $this->db_connect_id = ($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->server) : @ocinlogon($this->user, $sqlpassword, $this->server); + $this->db_connect_id = ($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->server, 'UTF8') : @ocinlogon($this->user, $sqlpassword, $this->server, 'UTF8'); return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); } diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index a91a8e81bb..ff58269f51 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -268,13 +268,6 @@ class dbal_postgres extends dbal } $row = @pg_fetch_assoc($query_id, null); - if ($row) - { - foreach ($row as $key => $value) - { - $row[$key] = (strpos($key, 'bitfield') === false) ? $value : pg_unescape_bytea($value); - } - } return ($query_id) ? $row : false; } diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 09ad1f4e8f..cbada8a76d 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -322,8 +322,7 @@ class compress_zip extends compress { $name = str_replace('\\', '/', $name); - $dtime = dechex($this->unix_to_dos_time($stat[9])); - $hexdtime = pack('H8', $dtime[6] . $dtime[7] . $dtime[4] . $dtime[5] . $dtime[2] . $dtime[3] . $dtime[0] . $dtime[1]); + $hexdtime = pack('V', $this->unix_to_dos_time($stat[9])); if ($is_dir) { diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 70d6e13f4d..f6b3302dc1 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -505,7 +505,8 @@ class bbcode_firstpass extends bbcode do { $pos = strlen($in); - for ($i = 0; $i < strlen($tok); ++$i) + $tok_len = strlen($tok); + for ($i = 0; $i < $tok_len; ++$i) { $tmp_pos = strpos($in, $tok{$i}); @@ -523,7 +524,7 @@ class bbcode_firstpass extends bbcode if ($tok == ']') { // if $tok is ']' the buffer holds a tag - if ($buffer == '/list' && sizeof($list_end_tags)) + if (strtolower($buffer) == '/list' && sizeof($list_end_tags)) { $out .= array_pop($list_end_tags) . ']'; $tok = '['; @@ -539,6 +540,12 @@ class bbcode_firstpass extends bbcode { array_push($list_end_tags, '/list:o:' . $this->bbcode_uid); } + + if (strtolower(substr($buffer, 0, 4)) == 'list') + { + $buffer = 'list' . substr($buffer, 4, $pos); + } + $out .= $buffer . ':' . $this->bbcode_uid . ']'; $tok = '['; } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 066e7852a1..bdf3be7697 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -991,25 +991,6 @@ class install_install extends module $sql_query = @file_get_contents($dbms_schema); - switch ($dbms) - { - case 'mysql': - case 'mysql4': - // We don't want MySQL mixing up collations - if (version_compare(mysql_get_server_info(), '4.1.2', '>=')) - { - $sql_query = preg_replace('/^\);$/m', ') DEFAULT CHARACTER SET latin1;', $sql_query); - } - - break; - - case 'mysqli': - // mysqli only works with MySQL > 4.1.3 so we'll just do a straight replace if using this DBMS - $sql_query = preg_replace('/^\);$/m', ') DEFAULT CHARACTER SET latin1;', $sql_query); - - break; - } - $sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query); $remove_remarks($sql_query); @@ -1768,7 +1749,7 @@ class install_install extends module switch ($dbms) { case 'mysql4': - if (version_compare(mysql_get_server_info($db->db_connect_id), '4.0.0', '<')) + if (version_compare(mysql_get_server_info($db->db_connect_id), '4.1.3', '<')) { $error[] = $lang['INST_ERR_DB_NO_MYSQL4']; } @@ -1781,6 +1762,58 @@ class install_install extends module $error[] = $lang['INST_ERR_DB_NO_MYSQLI']; } + case 'oracle': + $sql = "SELECT * + FROM NLS_DATABASE_PARAMETERS + WHERE PARAMETER = 'NLS_RDBMS_VERSION' + OR PARAMETER = 'NLS_CHARACTERSET';"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $stats[$row['parameter']] = $row['value']; + } + + $db->sql_freeresult($result); + + if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8') + { + $error[] = $lang['INST_ERR_DB_NO_ORACLE']; + } + break; + + case 'oracle': + $sql = "SELECT * + FROM NLS_DATABASE_PARAMETERS + WHERE PARAMETER = 'NLS_RDBMS_VERSION' + OR PARAMETER = 'NLS_CHARACTERSET';"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $stats[$row['parameter']] = $row['value']; + } + + $db->sql_freeresult($result); + + if (version_compare($stats['NLS_RDBMS_VERSION'], '9.2', '<') && $stats['NLS_CHARACTERSET'] !== 'UTF8') + { + $error[] = $lang['INST_ERR_DB_NO_ORACLE']; + } + break; + + case 'postgres': + $sql = "SHOW server_encoding;"; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + + $db->sql_freeresult($result); + + if ($row['server_encoding'] !== 'UNICODE' && $row['server_encoding'] !== 'UTF8') + { + $error[] = $lang['INST_ERR_DB_NO_POSTGRES']; + } break; } @@ -1890,21 +1923,21 @@ class install_install extends module ), 'mysqli' => array( 'LABEL' => 'MySQL 4.1.x/5.x (MySQLi)', - 'SCHEMA' => 'mysql', + 'SCHEMA' => 'mysql_41', 'MODULE' => 'mysqli', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks' ), 'mysql4' => array( - 'LABEL' => 'MySQL 4.x/5.x', - 'SCHEMA' => 'mysql', + 'LABEL' => 'MySQL 4.1.x/5.x', + 'SCHEMA' => 'mysql_41', 'MODULE' => 'mysql', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks' ), 'mysql' => array( 'LABEL' => 'MySQL', - 'SCHEMA' => 'mysql', + 'SCHEMA' => 'mysql_40', 'MODULE' => 'mysql', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks' diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index c63790ad29..10fb3ea574 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -97,7 +97,7 @@ END;; # Table: 'phpbb_acl_roles' CREATE TABLE phpbb_acl_roles ( role_id INTEGER NOT NULL, - role_name VARCHAR(255) DEFAULT '' NOT NULL, + role_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, role_description BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, role_type VARCHAR(10) DEFAULT '' NOT NULL, role_order INTEGER DEFAULT 0 NOT NULL @@ -146,7 +146,7 @@ CREATE TABLE phpbb_banlist ( ban_id INTEGER NOT NULL, ban_userid INTEGER DEFAULT 0 NOT NULL, ban_ip VARCHAR(40) DEFAULT '' NOT NULL, - ban_email VARCHAR(100) DEFAULT '' NOT NULL, + ban_email VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, ban_start INTEGER DEFAULT 0 NOT NULL, ban_end INTEGER DEFAULT 0 NOT NULL, ban_exclude INTEGER DEFAULT 0 NOT NULL, @@ -251,7 +251,7 @@ CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm(confirm_type);; # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id INTEGER NOT NULL, - disallow_username VARCHAR(252) DEFAULT '' NOT NULL + disallow_username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL );; ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);; @@ -318,7 +318,7 @@ END;; # Table: 'phpbb_extension_groups' CREATE TABLE phpbb_extension_groups ( group_id INTEGER NOT NULL, - group_name VARCHAR(255) DEFAULT '' NOT NULL, + group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, cat_id INTEGER DEFAULT 0 NOT NULL, allow_group INTEGER DEFAULT 0 NOT NULL, download_mode INTEGER DEFAULT 1 NOT NULL, @@ -354,12 +354,12 @@ CREATE TABLE phpbb_forums ( forum_desc_bitfield VARCHAR(252) DEFAULT '' NOT NULL, forum_desc_options INTEGER DEFAULT 0 NOT NULL, forum_desc_uid VARCHAR(5) DEFAULT '' NOT NULL, - forum_link VARCHAR(255) DEFAULT '' NOT NULL, - forum_password VARCHAR(40) DEFAULT '' NOT NULL, + forum_link VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + forum_password VARCHAR(14) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, forum_style INTEGER DEFAULT 0 NOT NULL, forum_image VARCHAR(255) DEFAULT '' NOT NULL, forum_rules BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, - forum_rules_link VARCHAR(255) DEFAULT '' NOT NULL, + forum_rules_link VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, forum_rules_bitfield VARCHAR(252) DEFAULT '' NOT NULL, forum_rules_options INTEGER DEFAULT 0 NOT NULL, forum_rules_uid VARCHAR(5) DEFAULT '' NOT NULL, @@ -373,7 +373,7 @@ CREATE TABLE phpbb_forums ( forum_last_poster_id INTEGER DEFAULT 0 NOT NULL, forum_last_post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, forum_last_post_time INTEGER DEFAULT 0 NOT NULL, - forum_last_poster_name VARCHAR(255) DEFAULT '' NOT NULL, + forum_last_poster_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, forum_last_poster_colour VARCHAR(6) DEFAULT '' NOT NULL, forum_flags INTEGER DEFAULT 32 NOT NULL, display_on_index INTEGER DEFAULT 1 NOT NULL, @@ -437,7 +437,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status) CREATE TABLE phpbb_groups ( group_id INTEGER NOT NULL, group_type INTEGER DEFAULT 1 NOT NULL, - group_name VARCHAR(252) DEFAULT '' NOT NULL, + group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, group_desc BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, group_desc_bitfield VARCHAR(252) DEFAULT '' NOT NULL, group_desc_options INTEGER DEFAULT 0 NOT NULL, @@ -500,9 +500,9 @@ CREATE TABLE phpbb_lang ( lang_id INTEGER NOT NULL, lang_iso VARCHAR(30) DEFAULT '' NOT NULL, lang_dir VARCHAR(30) DEFAULT '' NOT NULL, - lang_english_name VARCHAR(100) DEFAULT '' NOT NULL, - lang_local_name VARCHAR(255) DEFAULT '' NOT NULL, - lang_author VARCHAR(255) DEFAULT '' NOT NULL + lang_english_name VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + lang_local_name VARCHAR(85) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + lang_author VARCHAR(85) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL );; ALTER TABLE phpbb_lang ADD PRIMARY KEY (lang_id);; @@ -557,9 +557,9 @@ END;; CREATE TABLE phpbb_moderator_cache ( forum_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, - username VARCHAR(252) DEFAULT '' NOT NULL, + username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, group_id INTEGER DEFAULT 0 NOT NULL, - group_name VARCHAR(255) DEFAULT '' NOT NULL, + group_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, display_on_index INTEGER DEFAULT 1 NOT NULL );; @@ -636,7 +636,7 @@ CREATE TABLE phpbb_posts ( enable_smilies INTEGER DEFAULT 1 NOT NULL, enable_magic_url INTEGER DEFAULT 1 NOT NULL, enable_sig INTEGER DEFAULT 1 NOT NULL, - post_username VARCHAR(252) DEFAULT '' NOT NULL, + post_username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, post_text BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, post_checksum VARCHAR(32) DEFAULT '' NOT NULL, @@ -721,7 +721,7 @@ END;; CREATE TABLE phpbb_privmsgs_folder ( folder_id INTEGER NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, - folder_name VARCHAR(255) DEFAULT '' NOT NULL, + folder_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, pm_count INTEGER DEFAULT 0 NOT NULL );; @@ -746,7 +746,7 @@ CREATE TABLE phpbb_privmsgs_rules ( user_id INTEGER DEFAULT 0 NOT NULL, rule_check INTEGER DEFAULT 0 NOT NULL, rule_connection INTEGER DEFAULT 0 NOT NULL, - rule_string VARCHAR(255) DEFAULT '' NOT NULL, + rule_string VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, rule_user_id INTEGER DEFAULT 0 NOT NULL, rule_group_id INTEGER DEFAULT 0 NOT NULL, rule_action INTEGER DEFAULT 0 NOT NULL, @@ -789,15 +789,15 @@ CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to(user_id, folder # Table: 'phpbb_profile_fields' CREATE TABLE phpbb_profile_fields ( field_id INTEGER NOT NULL, - field_name VARCHAR(255) DEFAULT '' NOT NULL, + field_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, field_type INTEGER DEFAULT 0 NOT NULL, field_ident VARCHAR(20) DEFAULT '' NOT NULL, field_length VARCHAR(20) DEFAULT '' NOT NULL, field_minlen VARCHAR(255) DEFAULT '' NOT NULL, field_maxlen VARCHAR(255) DEFAULT '' NOT NULL, - field_novalue VARCHAR(255) DEFAULT '' NOT NULL, - field_default_value VARCHAR(255) DEFAULT '' NOT NULL, - field_validation VARCHAR(20) DEFAULT '' NOT NULL, + field_novalue VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + field_default_value VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + field_validation VARCHAR(7) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, field_required INTEGER DEFAULT 0 NOT NULL, field_show_on_reg INTEGER DEFAULT 0 NOT NULL, field_hide INTEGER DEFAULT 0 NOT NULL, @@ -836,7 +836,7 @@ CREATE TABLE phpbb_profile_fields_lang ( lang_id INTEGER DEFAULT 0 NOT NULL, option_id INTEGER DEFAULT 0 NOT NULL, field_type INTEGER DEFAULT 0 NOT NULL, - lang_value VARCHAR(255) DEFAULT '' NOT NULL + lang_value VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);; @@ -846,9 +846,9 @@ ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option CREATE TABLE phpbb_profile_lang ( field_id INTEGER DEFAULT 0 NOT NULL, lang_id INTEGER DEFAULT 0 NOT NULL, - lang_name VARCHAR(255) DEFAULT '' NOT NULL, + lang_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, lang_explain BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, - lang_default_value VARCHAR(255) DEFAULT '' NOT NULL + lang_default_value VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL );; ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);; @@ -857,7 +857,7 @@ ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);; # Table: 'phpbb_ranks' CREATE TABLE phpbb_ranks ( rank_id INTEGER NOT NULL, - rank_title VARCHAR(255) DEFAULT '' NOT NULL, + rank_title VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, rank_min INTEGER DEFAULT 0 NOT NULL, rank_special INTEGER DEFAULT 0 NOT NULL, rank_image VARCHAR(255) DEFAULT '' NOT NULL @@ -906,7 +906,7 @@ END;; # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id INTEGER NOT NULL, - reason_title VARCHAR(255) DEFAULT '' NOT NULL, + reason_title VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, reason_description BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, reason_order INTEGER DEFAULT 0 NOT NULL );; @@ -977,7 +977,7 @@ CREATE TABLE phpbb_sessions ( session_time INTEGER DEFAULT 0 NOT NULL, session_ip VARCHAR(40) DEFAULT '' NOT NULL, session_browser VARCHAR(150) DEFAULT '' NOT NULL, - session_page VARCHAR(255) DEFAULT '' NOT NULL, + session_page VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, session_viewonline INTEGER DEFAULT 1 NOT NULL, session_autologin INTEGER DEFAULT 0 NOT NULL, session_admin INTEGER DEFAULT 0 NOT NULL @@ -1025,8 +1025,8 @@ END;; # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id INTEGER NOT NULL, - code VARCHAR(50) DEFAULT '' NOT NULL, - emotion VARCHAR(50) DEFAULT '' NOT NULL, + code VARCHAR(17) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + emotion VARCHAR(17) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, smiley_url VARCHAR(50) DEFAULT '' NOT NULL, smiley_width INTEGER DEFAULT 0 NOT NULL, smiley_height INTEGER DEFAULT 0 NOT NULL, @@ -1052,8 +1052,8 @@ END;; # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id INTEGER NOT NULL, - style_name VARCHAR(252) DEFAULT '' NOT NULL, - style_copyright VARCHAR(255) DEFAULT '' NOT NULL, + style_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + style_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, style_active INTEGER DEFAULT 1 NOT NULL, template_id INTEGER DEFAULT 0 NOT NULL, theme_id INTEGER DEFAULT 0 NOT NULL, @@ -1081,8 +1081,8 @@ END;; # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id INTEGER NOT NULL, - template_name VARCHAR(252) DEFAULT '' NOT NULL, - template_copyright VARCHAR(255) DEFAULT '' NOT NULL, + template_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + template_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, template_path VARCHAR(100) DEFAULT '' NOT NULL, bbcode_bitfield VARCHAR(252) DEFAULT 'kNg=' NOT NULL, template_storedb INTEGER DEFAULT 0 NOT NULL @@ -1129,8 +1129,8 @@ END;; # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id INTEGER NOT NULL, - theme_name VARCHAR(252) DEFAULT '' NOT NULL, - theme_copyright VARCHAR(255) DEFAULT '' NOT NULL, + theme_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + theme_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, theme_path VARCHAR(100) DEFAULT '' NOT NULL, theme_storedb INTEGER DEFAULT 0 NOT NULL, theme_mtime INTEGER DEFAULT 0 NOT NULL, @@ -1155,8 +1155,8 @@ END;; # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id INTEGER NOT NULL, - imageset_name VARCHAR(252) DEFAULT '' NOT NULL, - imageset_copyright VARCHAR(255) DEFAULT '' NOT NULL, + imageset_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + imageset_copyright VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, imageset_path VARCHAR(100) DEFAULT '' NOT NULL, site_logo VARCHAR(200) DEFAULT '' NOT NULL, upload_bar VARCHAR(200) DEFAULT '' NOT NULL, @@ -1287,11 +1287,11 @@ CREATE TABLE phpbb_topics ( topic_status INTEGER DEFAULT 0 NOT NULL, topic_type INTEGER DEFAULT 0 NOT NULL, topic_first_post_id INTEGER DEFAULT 0 NOT NULL, - topic_first_poster_name VARCHAR(255) DEFAULT '' NOT NULL, + topic_first_poster_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, topic_first_poster_colour VARCHAR(6) DEFAULT '' NOT NULL, topic_last_post_id INTEGER DEFAULT 0 NOT NULL, topic_last_poster_id INTEGER DEFAULT 0 NOT NULL, - topic_last_poster_name VARCHAR(255) DEFAULT '' NOT NULL, + topic_last_poster_name VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, topic_last_poster_colour VARCHAR(6) DEFAULT '' NOT NULL, topic_last_post_subject BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, topic_last_post_time INTEGER DEFAULT 0 NOT NULL, @@ -1379,16 +1379,16 @@ CREATE TABLE phpbb_users ( user_perm_from INTEGER DEFAULT 0 NOT NULL, user_ip VARCHAR(40) DEFAULT '' NOT NULL, user_regdate INTEGER DEFAULT 0 NOT NULL, - username VARCHAR(252) DEFAULT '' NOT NULL, - user_password VARCHAR(40) DEFAULT '' NOT NULL, + username VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + user_password VARCHAR(14) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, user_passchg INTEGER DEFAULT 0 NOT NULL, - user_email VARCHAR(100) DEFAULT '' NOT NULL, + user_email VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL, user_birthday VARCHAR(10) DEFAULT '' NOT NULL, user_lastvisit INTEGER DEFAULT 0 NOT NULL, user_lastmark INTEGER DEFAULT 0 NOT NULL, user_lastpost_time INTEGER DEFAULT 0 NOT NULL, - user_lastpage VARCHAR(200) DEFAULT '' NOT NULL, + user_lastpage VARCHAR(67) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, user_last_confirm_key VARCHAR(10) DEFAULT '' NOT NULL, user_last_search INTEGER DEFAULT 0 NOT NULL, user_warnings INTEGER DEFAULT 0 NOT NULL, @@ -1398,7 +1398,7 @@ CREATE TABLE phpbb_users ( user_lang VARCHAR(30) DEFAULT '' NOT NULL, user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL, user_dst INTEGER DEFAULT 0 NOT NULL, - user_dateformat VARCHAR(30) DEFAULT 'd M Y H:i' NOT NULL, + user_dateformat VARCHAR(10) CHARACTER SET UNICODE_FSS DEFAULT 'd M Y H:i' NOT NULL, user_style INTEGER DEFAULT 0 NOT NULL, user_rank INTEGER DEFAULT 0 NOT NULL, user_colour VARCHAR(6) DEFAULT '' NOT NULL, @@ -1430,17 +1430,17 @@ CREATE TABLE phpbb_users ( user_sig BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, user_sig_bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield VARCHAR(252) DEFAULT '' NOT NULL, - user_from VARCHAR(100) DEFAULT '' NOT NULL, + user_from VARCHAR(34) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, user_icq VARCHAR(15) DEFAULT '' NOT NULL, - user_aim VARCHAR(255) DEFAULT '' NOT NULL, - user_yim VARCHAR(255) DEFAULT '' NOT NULL, - user_msnm VARCHAR(255) DEFAULT '' NOT NULL, - user_jabber VARCHAR(255) DEFAULT '' NOT NULL, - user_website VARCHAR(200) DEFAULT '' NOT NULL, - user_occ VARCHAR(255) DEFAULT '' NOT NULL, + user_aim VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + user_yim VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + user_msnm VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + user_jabber VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + user_website VARCHAR(67) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + user_occ VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, user_interests BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, user_actkey VARCHAR(32) DEFAULT '' NOT NULL, - user_newpasswd VARCHAR(32) DEFAULT '' NOT NULL + user_newpasswd VARCHAR(11) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL );; ALTER TABLE phpbb_users ADD PRIMARY KEY (user_id);; @@ -1487,8 +1487,8 @@ END;; # Table: 'phpbb_words' CREATE TABLE phpbb_words ( word_id INTEGER NOT NULL, - word VARCHAR(255) DEFAULT '' NOT NULL, - replacement VARCHAR(255) DEFAULT '' NOT NULL + word VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL, + replacement VARCHAR(84) CHARACTER SET UNICODE_FSS DEFAULT '' NOT NULL );; ALTER TABLE phpbb_words ADD PRIMARY KEY (word_id);; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 7a2a8bf26b..64652762d5 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -21,7 +21,7 @@ CREATE TABLE [phpbb_attachments] ( [physical_filename] [varchar] (255) DEFAULT ('') NOT NULL , [real_filename] [varchar] (255) DEFAULT ('') NOT NULL , [download_count] [int] DEFAULT (0) NOT NULL , - [attach_comment] [varchar] (8000) DEFAULT ('') NOT NULL , + [attach_comment] [nvarchar] (8000) DEFAULT ('') NOT NULL , [extension] [varchar] (100) DEFAULT ('') NOT NULL , [mimetype] [varchar] (100) DEFAULT ('') NOT NULL , [filesize] [int] DEFAULT (0) NOT NULL , @@ -100,8 +100,8 @@ GO */ CREATE TABLE [phpbb_acl_roles] ( [role_id] [int] IDENTITY (1, 1) NOT NULL , - [role_name] [varchar] (255) DEFAULT ('') NOT NULL , - [role_description] [varchar] (8000) DEFAULT ('') NOT NULL , + [role_name] [nvarchar] (255) DEFAULT ('') NOT NULL , + [role_description] [nvarchar] (8000) DEFAULT ('') NOT NULL , [role_type] [varchar] (10) DEFAULT ('') NOT NULL , [role_order] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] @@ -166,7 +166,7 @@ CREATE TABLE [phpbb_banlist] ( [ban_id] [int] IDENTITY (1, 1) NOT NULL , [ban_userid] [int] DEFAULT (0) NOT NULL , [ban_ip] [varchar] (40) DEFAULT ('') NOT NULL , - [ban_email] [varchar] (100) DEFAULT ('') NOT NULL , + [ban_email] [nvarchar] (100) DEFAULT ('') NOT NULL , [ban_start] [int] DEFAULT (0) NOT NULL , [ban_end] [int] DEFAULT (0) NOT NULL , [ban_exclude] [int] DEFAULT (0) NOT NULL , @@ -246,7 +246,7 @@ GO CREATE TABLE [phpbb_bots] ( [bot_id] [int] IDENTITY (1, 1) NOT NULL , [bot_active] [int] DEFAULT (1) NOT NULL , - [bot_name] [varchar] (3000) DEFAULT ('') NOT NULL , + [bot_name] [nvarchar] (3000) DEFAULT ('') NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , [bot_agent] [varchar] (255) DEFAULT ('') NOT NULL , [bot_ip] [varchar] (255) DEFAULT ('') NOT NULL @@ -313,7 +313,7 @@ GO */ CREATE TABLE [phpbb_disallow] ( [disallow_id] [int] IDENTITY (1, 1) NOT NULL , - [disallow_username] [varchar] (252) DEFAULT ('') NOT NULL + [disallow_username] [nvarchar] (252) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -334,9 +334,9 @@ CREATE TABLE [phpbb_drafts] ( [topic_id] [int] DEFAULT (0) NOT NULL , [forum_id] [int] DEFAULT (0) NOT NULL , [save_time] [int] DEFAULT (0) NOT NULL , - [draft_subject] [varchar] (1000) DEFAULT ('') NOT NULL , - [draft_message] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + [draft_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL , + [draft_message] [ntext] DEFAULT ('') NOT NULL +) ON [PRIMARY] GO ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD @@ -373,7 +373,7 @@ GO */ CREATE TABLE [phpbb_extension_groups] ( [group_id] [int] IDENTITY (1, 1) NOT NULL , - [group_name] [varchar] (255) DEFAULT ('') NOT NULL , + [group_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [cat_id] [int] DEFAULT (0) NOT NULL , [allow_group] [int] DEFAULT (0) NOT NULL , [download_mode] [int] DEFAULT (1) NOT NULL , @@ -401,17 +401,17 @@ CREATE TABLE [phpbb_forums] ( [left_id] [int] DEFAULT (0) NOT NULL , [right_id] [int] DEFAULT (0) NOT NULL , [forum_parents] [text] DEFAULT ('') NOT NULL , - [forum_name] [varchar] (3000) DEFAULT ('') NOT NULL , - [forum_desc] [varchar] (8000) DEFAULT ('') NOT NULL , + [forum_name] [nvarchar] (3000) DEFAULT ('') NOT NULL , + [forum_desc] [nvarchar] (8000) DEFAULT ('') NOT NULL , [forum_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL , [forum_desc_options] [int] DEFAULT (0) NOT NULL , [forum_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL , - [forum_link] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_password] [varchar] (40) DEFAULT ('') NOT NULL , + [forum_link] [nvarchar] (255) DEFAULT ('') NOT NULL , + [forum_password] [nvarchar] (40) DEFAULT ('') NOT NULL , [forum_style] [int] DEFAULT (0) NOT NULL , [forum_image] [varchar] (255) DEFAULT ('') NOT NULL , - [forum_rules] [varchar] (8000) DEFAULT ('') NOT NULL , - [forum_rules_link] [varchar] (255) DEFAULT ('') NOT NULL , + [forum_rules] [nvarchar] (8000) DEFAULT ('') NOT NULL , + [forum_rules_link] [nvarchar] (255) DEFAULT ('') NOT NULL , [forum_rules_bitfield] [varchar] (252) DEFAULT ('') NOT NULL , [forum_rules_options] [int] DEFAULT (0) NOT NULL , [forum_rules_uid] [varchar] (5) DEFAULT ('') NOT NULL , @@ -423,9 +423,9 @@ CREATE TABLE [phpbb_forums] ( [forum_topics_real] [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] (1000) DEFAULT ('') NOT NULL , + [forum_last_post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL , [forum_last_post_time] [int] DEFAULT (0) NOT NULL , - [forum_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , + [forum_last_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [forum_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , [forum_flags] [int] DEFAULT (32) NOT NULL , [display_on_index] [int] DEFAULT (1) NOT NULL , @@ -518,8 +518,8 @@ GO CREATE TABLE [phpbb_groups] ( [group_id] [int] IDENTITY (1, 1) NOT NULL , [group_type] [int] DEFAULT (1) NOT NULL , - [group_name] [varchar] (252) DEFAULT ('') NOT NULL , - [group_desc] [varchar] (8000) DEFAULT ('') NOT NULL , + [group_name] [nvarchar] (252) DEFAULT ('') NOT NULL , + [group_desc] [nvarchar] (8000) DEFAULT ('') NOT NULL , [group_desc_bitfield] [varchar] (252) DEFAULT ('') NOT NULL , [group_desc_options] [int] DEFAULT (0) NOT NULL , [group_desc_uid] [varchar] (5) DEFAULT ('') NOT NULL , @@ -579,9 +579,9 @@ CREATE TABLE [phpbb_lang] ( [lang_id] [int] IDENTITY (1, 1) NOT NULL , [lang_iso] [varchar] (30) DEFAULT ('') NOT NULL , [lang_dir] [varchar] (30) DEFAULT ('') NOT NULL , - [lang_english_name] [varchar] (100) DEFAULT ('') NOT NULL , - [lang_local_name] [varchar] (255) DEFAULT ('') NOT NULL , - [lang_author] [varchar] (255) DEFAULT ('') NOT NULL + [lang_english_name] [nvarchar] (100) DEFAULT ('') NOT NULL , + [lang_local_name] [nvarchar] (255) DEFAULT ('') NOT NULL , + [lang_author] [nvarchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -608,9 +608,9 @@ CREATE TABLE [phpbb_log] ( [reportee_id] [int] DEFAULT (0) NOT NULL , [log_ip] [varchar] (40) DEFAULT ('') NOT NULL , [log_time] [int] DEFAULT (0) NOT NULL , - [log_operation] [varchar] (8000) DEFAULT ('') NOT NULL , - [log_data] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + [log_operation] [nvarchar] (8000) DEFAULT ('') NOT NULL , + [log_data] [ntext] DEFAULT ('') NOT NULL +) ON [PRIMARY] GO ALTER TABLE [phpbb_log] WITH NOCHECK ADD @@ -642,9 +642,9 @@ GO CREATE TABLE [phpbb_moderator_cache] ( [forum_id] [int] DEFAULT (0) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , - [username] [varchar] (252) DEFAULT ('') NOT NULL , + [username] [nvarchar] (252) DEFAULT ('') NOT NULL , [group_id] [int] DEFAULT (0) NOT NULL , - [group_name] [varchar] (255) DEFAULT ('') NOT NULL , + [group_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [display_on_index] [int] DEFAULT (1) NOT NULL ) ON [PRIMARY] GO @@ -697,7 +697,7 @@ GO CREATE TABLE [phpbb_poll_options] ( [poll_option_id] [int] DEFAULT (0) NOT NULL , [topic_id] [int] DEFAULT (0) NOT NULL , - [poll_option_text] [varchar] (8000) DEFAULT ('') NOT NULL , + [poll_option_text] [nvarchar] (8000) DEFAULT ('') NOT NULL , [poll_option_total] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO @@ -747,9 +747,9 @@ CREATE TABLE [phpbb_posts] ( [enable_smilies] [int] DEFAULT (1) NOT NULL , [enable_magic_url] [int] DEFAULT (1) NOT NULL , [enable_sig] [int] DEFAULT (1) NOT NULL , - [post_username] [varchar] (252) DEFAULT ('') NOT NULL , - [post_subject] [varchar] (1000) DEFAULT ('') NOT NULL , - [post_text] [text] DEFAULT ('') NOT NULL , + [post_username] [nvarchar] (252) DEFAULT ('') NOT NULL , + [post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL , + [post_text] [ntext] DEFAULT ('') NOT NULL , [post_checksum] [varchar] (32) DEFAULT ('') NOT NULL , [post_encoding] [varchar] (20) DEFAULT ('iso-8859-1') NOT NULL , [post_attachment] [int] DEFAULT (0) NOT NULL , @@ -757,11 +757,11 @@ CREATE TABLE [phpbb_posts] ( [bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , [post_postcount] [int] DEFAULT (1) NOT NULL , [post_edit_time] [int] DEFAULT (0) NOT NULL , - [post_edit_reason] [varchar] (3000) DEFAULT ('') NOT NULL , + [post_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL , [post_edit_user] [int] DEFAULT (0) NOT NULL , [post_edit_count] [int] DEFAULT (0) NOT NULL , [post_edit_locked] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +) ON [PRIMARY] GO ALTER TABLE [phpbb_posts] WITH NOCHECK ADD @@ -807,9 +807,9 @@ CREATE TABLE [phpbb_privmsgs] ( [enable_smilies] [int] DEFAULT (1) NOT NULL , [enable_magic_url] [int] DEFAULT (1) NOT NULL , [enable_sig] [int] DEFAULT (1) NOT NULL , - [message_subject] [varchar] (1000) DEFAULT ('') NOT NULL , - [message_text] [text] DEFAULT ('') NOT NULL , - [message_edit_reason] [varchar] (3000) DEFAULT ('') NOT NULL , + [message_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL , + [message_text] [ntext] DEFAULT ('') NOT NULL , + [message_edit_reason] [nvarchar] (3000) DEFAULT ('') NOT NULL , [message_edit_user] [int] DEFAULT (0) NOT NULL , [message_encoding] [varchar] (20) DEFAULT ('iso-8859-1') NOT NULL , [message_attachment] [int] DEFAULT (0) NOT NULL , @@ -817,9 +817,9 @@ CREATE TABLE [phpbb_privmsgs] ( [bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , [message_edit_time] [int] DEFAULT (0) NOT NULL , [message_edit_count] [int] DEFAULT (0) NOT NULL , - [to_address] [varchar] (8000) DEFAULT ('') NOT NULL , - [bcc_address] [varchar] (8000) DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + [to_address] [nvarchar] (8000) DEFAULT ('') NOT NULL , + [bcc_address] [nvarchar] (8000) DEFAULT ('') NOT NULL +) ON [PRIMARY] GO ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD @@ -848,7 +848,7 @@ GO CREATE TABLE [phpbb_privmsgs_folder] ( [folder_id] [int] IDENTITY (1, 1) NOT NULL , [user_id] [int] DEFAULT (0) NOT NULL , - [folder_name] [varchar] (255) DEFAULT ('') NOT NULL , + [folder_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [pm_count] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO @@ -872,7 +872,7 @@ CREATE TABLE [phpbb_privmsgs_rules] ( [user_id] [int] DEFAULT (0) NOT NULL , [rule_check] [int] DEFAULT (0) NOT NULL , [rule_connection] [int] DEFAULT (0) NOT NULL , - [rule_string] [varchar] (255) DEFAULT ('') NOT NULL , + [rule_string] [nvarchar] (255) DEFAULT ('') NOT NULL , [rule_user_id] [int] DEFAULT (0) NOT NULL , [rule_group_id] [int] DEFAULT (0) NOT NULL , [rule_action] [int] DEFAULT (0) NOT NULL , @@ -923,15 +923,15 @@ GO */ CREATE TABLE [phpbb_profile_fields] ( [field_id] [int] IDENTITY (1, 1) NOT NULL , - [field_name] [varchar] (255) DEFAULT ('') NOT NULL , + [field_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [field_type] [int] DEFAULT (0) NOT NULL , [field_ident] [varchar] (20) DEFAULT ('') NOT NULL , [field_length] [varchar] (20) DEFAULT ('') NOT NULL , [field_minlen] [varchar] (255) DEFAULT ('') NOT NULL , [field_maxlen] [varchar] (255) DEFAULT ('') NOT NULL , - [field_novalue] [varchar] (255) DEFAULT ('') NOT NULL , - [field_default_value] [varchar] (255) DEFAULT ('') NOT NULL , - [field_validation] [varchar] (20) DEFAULT ('') NOT NULL , + [field_novalue] [nvarchar] (255) DEFAULT ('') NOT NULL , + [field_default_value] [nvarchar] (255) DEFAULT ('') NOT NULL , + [field_validation] [nvarchar] (20) DEFAULT ('') NOT NULL , [field_required] [int] DEFAULT (0) NOT NULL , [field_show_on_reg] [int] DEFAULT (0) NOT NULL , [field_hide] [int] DEFAULT (0) NOT NULL , @@ -979,7 +979,7 @@ CREATE TABLE [phpbb_profile_fields_lang] ( [lang_id] [int] DEFAULT (0) NOT NULL , [option_id] [int] DEFAULT (0) NOT NULL , [field_type] [int] DEFAULT (0) NOT NULL , - [lang_value] [varchar] (255) DEFAULT ('') NOT NULL + [lang_value] [nvarchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -999,9 +999,9 @@ GO CREATE TABLE [phpbb_profile_lang] ( [field_id] [int] DEFAULT (0) NOT NULL , [lang_id] [int] DEFAULT (0) NOT NULL , - [lang_name] [varchar] (255) DEFAULT ('') NOT NULL , - [lang_explain] [varchar] (8000) DEFAULT ('') NOT NULL , - [lang_default_value] [varchar] (255) DEFAULT ('') NOT NULL + [lang_name] [nvarchar] (255) DEFAULT ('') NOT NULL , + [lang_explain] [nvarchar] (8000) DEFAULT ('') NOT NULL , + [lang_default_value] [nvarchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1019,7 +1019,7 @@ GO */ CREATE TABLE [phpbb_ranks] ( [rank_id] [int] IDENTITY (1, 1) NOT NULL , - [rank_title] [varchar] (255) DEFAULT ('') NOT NULL , + [rank_title] [nvarchar] (255) DEFAULT ('') NOT NULL , [rank_min] [int] DEFAULT (0) NOT NULL , [rank_special] [int] DEFAULT (0) NOT NULL , [rank_image] [varchar] (255) DEFAULT ('') NOT NULL @@ -1045,8 +1045,8 @@ CREATE TABLE [phpbb_reports] ( [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 -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + [report_text] [ntext] DEFAULT ('') NOT NULL +) ON [PRIMARY] GO ALTER TABLE [phpbb_reports] WITH NOCHECK ADD @@ -1062,10 +1062,10 @@ GO */ CREATE TABLE [phpbb_reports_reasons] ( [reason_id] [int] IDENTITY (1, 1) NOT NULL , - [reason_title] [varchar] (255) DEFAULT ('') NOT NULL , - [reason_description] [text] DEFAULT ('') NOT NULL , + [reason_title] [nvarchar] (255) DEFAULT ('') NOT NULL , + [reason_description] [ntext] DEFAULT ('') NOT NULL , [reason_order] [int] DEFAULT (0) NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +) ON [PRIMARY] GO ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD @@ -1082,7 +1082,7 @@ GO CREATE TABLE [phpbb_search_results] ( [search_key] [varchar] (32) DEFAULT ('') NOT NULL , [search_time] [int] DEFAULT (0) NOT NULL , - [search_keywords] [text] DEFAULT ('') NOT NULL , + [search_keywords] [ntext] DEFAULT ('') NOT NULL , [search_authors] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -1100,7 +1100,7 @@ GO */ CREATE TABLE [phpbb_search_wordlist] ( [word_id] [int] IDENTITY (1, 1) NOT NULL , - [word_text] [nvarchar] (252) DEFAULT ('') NOT NULL , + [word_text] [nvarchar] (255) DEFAULT ('') NOT NULL , [word_common] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO @@ -1144,7 +1144,7 @@ CREATE TABLE [phpbb_sessions] ( [session_time] [int] DEFAULT (0) NOT NULL , [session_ip] [varchar] (40) DEFAULT ('') NOT NULL , [session_browser] [varchar] (150) DEFAULT ('') NOT NULL , - [session_page] [varchar] (255) DEFAULT ('') NOT NULL , + [session_page] [nvarchar] (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 @@ -1212,8 +1212,8 @@ GO */ CREATE TABLE [phpbb_smilies] ( [smiley_id] [int] IDENTITY (1, 1) NOT NULL , - [code] [varchar] (50) DEFAULT ('') NOT NULL , - [emotion] [varchar] (50) DEFAULT ('') NOT NULL , + [code] [nvarchar] (50) DEFAULT ('') NOT NULL , + [emotion] [nvarchar] (50) DEFAULT ('') NOT NULL , [smiley_url] [varchar] (50) DEFAULT ('') NOT NULL , [smiley_width] [int] DEFAULT (0) NOT NULL , [smiley_height] [int] DEFAULT (0) NOT NULL , @@ -1238,8 +1238,8 @@ GO */ CREATE TABLE [phpbb_styles] ( [style_id] [int] IDENTITY (1, 1) NOT NULL , - [style_name] [varchar] (252) DEFAULT ('') NOT NULL , - [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL , + [style_name] [nvarchar] (252) DEFAULT ('') NOT NULL , + [style_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL , [style_active] [int] DEFAULT (1) NOT NULL , [template_id] [int] DEFAULT (0) NOT NULL , [theme_id] [int] DEFAULT (0) NOT NULL , @@ -1272,8 +1272,8 @@ GO */ CREATE TABLE [phpbb_styles_template] ( [template_id] [int] IDENTITY (1, 1) NOT NULL , - [template_name] [varchar] (252) DEFAULT ('') NOT NULL , - [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL , + [template_name] [nvarchar] (252) DEFAULT ('') NOT NULL , + [template_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL , [template_path] [varchar] (100) DEFAULT ('') NOT NULL , [bbcode_bitfield] [varchar] (252) DEFAULT ('kNg=') NOT NULL , [template_storedb] [int] DEFAULT (0) NOT NULL @@ -1299,8 +1299,8 @@ CREATE TABLE [phpbb_styles_template_data] ( [template_filename] [varchar] (100) DEFAULT ('') NOT NULL , [template_included] [varchar] (8000) DEFAULT ('') NOT NULL , [template_mtime] [int] DEFAULT (0) NOT NULL , - [template_data] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + [template_data] [ntext] DEFAULT ('') NOT NULL +) ON [PRIMARY] GO CREATE INDEX [tid] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY] @@ -1315,13 +1315,13 @@ GO */ CREATE TABLE [phpbb_styles_theme] ( [theme_id] [int] IDENTITY (1, 1) NOT NULL , - [theme_name] [varchar] (252) DEFAULT ('') NOT NULL , - [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL , + [theme_name] [nvarchar] (252) DEFAULT ('') NOT NULL , + [theme_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL , [theme_path] [varchar] (100) DEFAULT ('') NOT NULL , [theme_storedb] [int] DEFAULT (0) NOT NULL , [theme_mtime] [int] DEFAULT (0) NOT NULL , - [theme_data] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + [theme_data] [ntext] DEFAULT ('') NOT NULL +) ON [PRIMARY] GO ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD @@ -1340,8 +1340,8 @@ GO */ CREATE TABLE [phpbb_styles_imageset] ( [imageset_id] [int] IDENTITY (1, 1) NOT NULL , - [imageset_name] [varchar] (252) DEFAULT ('') NOT NULL , - [imageset_copyright] [varchar] (255) DEFAULT ('') NOT NULL , + [imageset_name] [nvarchar] (252) DEFAULT ('') NOT NULL , + [imageset_copyright] [nvarchar] (255) DEFAULT ('') NOT NULL , [imageset_path] [varchar] (100) DEFAULT ('') NOT NULL , [site_logo] [varchar] (200) DEFAULT ('') NOT NULL , [upload_bar] [varchar] (200) DEFAULT ('') NOT NULL , @@ -1461,7 +1461,7 @@ CREATE TABLE [phpbb_topics] ( [topic_attachment] [int] DEFAULT (0) NOT NULL , [topic_approved] [int] DEFAULT (1) NOT NULL , [topic_reported] [int] DEFAULT (0) NOT NULL , - [topic_title] [varchar] (1000) DEFAULT ('') NOT NULL , + [topic_title] [nvarchar] (1000) 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 , @@ -1471,19 +1471,19 @@ CREATE TABLE [phpbb_topics] ( [topic_status] [int] DEFAULT (0) NOT NULL , [topic_type] [int] DEFAULT (0) NOT NULL , [topic_first_post_id] [int] DEFAULT (0) NOT NULL , - [topic_first_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , + [topic_first_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [topic_first_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , [topic_last_post_id] [int] DEFAULT (0) NOT NULL , [topic_last_poster_id] [int] DEFAULT (0) NOT NULL , - [topic_last_poster_name] [varchar] (255) DEFAULT ('') NOT NULL , + [topic_last_poster_name] [nvarchar] (255) DEFAULT ('') NOT NULL , [topic_last_poster_colour] [varchar] (6) DEFAULT ('') NOT NULL , - [topic_last_post_subject] [varchar] (1000) DEFAULT ('') NOT NULL , + [topic_last_post_subject] [nvarchar] (1000) DEFAULT ('') NOT NULL , [topic_last_post_time] [int] DEFAULT (0) NOT NULL , [topic_last_view_time] [int] DEFAULT (0) NOT NULL , [topic_moved_id] [int] DEFAULT (0) NOT NULL , [topic_bumped] [int] DEFAULT (0) NOT NULL , [topic_bumper] [int] DEFAULT (0) NOT NULL , - [poll_title] [varchar] (1000) DEFAULT ('') NOT NULL , + [poll_title] [nvarchar] (1000) DEFAULT ('') NOT NULL , [poll_start] [int] DEFAULT (0) NOT NULL , [poll_length] [int] DEFAULT (0) NOT NULL , [poll_max_options] [int] DEFAULT (1) NOT NULL , @@ -1606,16 +1606,16 @@ CREATE TABLE [phpbb_users] ( [user_perm_from] [int] DEFAULT (0) NOT NULL , [user_ip] [varchar] (40) DEFAULT ('') NOT NULL , [user_regdate] [int] DEFAULT (0) NOT NULL , - [username] [varchar] (252) DEFAULT ('') NOT NULL , - [user_password] [varchar] (40) DEFAULT ('') NOT NULL , + [username] [nvarchar] (252) DEFAULT ('') NOT NULL , + [user_password] [nvarchar] (40) DEFAULT ('') NOT NULL , [user_passchg] [int] DEFAULT (0) NOT NULL , - [user_email] [varchar] (100) DEFAULT ('') NOT NULL , + [user_email] [nvarchar] (100) DEFAULT ('') NOT NULL , [user_email_hash] [float] DEFAULT (0) NOT NULL , [user_birthday] [varchar] (10) DEFAULT ('') NOT NULL , [user_lastvisit] [int] DEFAULT (0) NOT NULL , [user_lastmark] [int] DEFAULT (0) NOT NULL , [user_lastpost_time] [int] DEFAULT (0) NOT NULL , - [user_lastpage] [varchar] (200) DEFAULT ('') NOT NULL , + [user_lastpage] [nvarchar] (200) DEFAULT ('') NOT NULL , [user_last_confirm_key] [varchar] (10) DEFAULT ('') NOT NULL , [user_last_search] [int] DEFAULT (0) NOT NULL , [user_warnings] [int] DEFAULT (0) NOT NULL , @@ -1625,7 +1625,7 @@ CREATE TABLE [phpbb_users] ( [user_lang] [varchar] (30) DEFAULT ('') NOT NULL , [user_timezone] [float] DEFAULT (0) NOT NULL , [user_dst] [int] DEFAULT (0) NOT NULL , - [user_dateformat] [varchar] (30) DEFAULT ('d M Y H:i') NOT NULL , + [user_dateformat] [nvarchar] (30) DEFAULT ('d M Y H:i') NOT NULL , [user_style] [int] DEFAULT (0) NOT NULL , [user_rank] [int] DEFAULT (0) NOT NULL , [user_colour] [varchar] (6) DEFAULT ('') NOT NULL , @@ -1654,20 +1654,20 @@ CREATE TABLE [phpbb_users] ( [user_avatar_type] [int] DEFAULT (0) NOT NULL , [user_avatar_width] [int] DEFAULT (0) NOT NULL , [user_avatar_height] [int] DEFAULT (0) NOT NULL , - [user_sig] [text] DEFAULT ('') NOT NULL , + [user_sig] [ntext] DEFAULT ('') NOT NULL , [user_sig_bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , [user_sig_bbcode_bitfield] [varchar] (252) DEFAULT ('') NOT NULL , - [user_from] [varchar] (100) DEFAULT ('') NOT NULL , + [user_from] [nvarchar] (100) DEFAULT ('') NOT NULL , [user_icq] [varchar] (15) DEFAULT ('') NOT NULL , - [user_aim] [varchar] (255) DEFAULT ('') NOT NULL , - [user_yim] [varchar] (255) DEFAULT ('') NOT NULL , - [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , - [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , - [user_website] [varchar] (200) DEFAULT ('') NOT NULL , - [user_occ] [varchar] (255) DEFAULT ('') NOT NULL , - [user_interests] [varchar] (8000) DEFAULT ('') NOT NULL , + [user_aim] [nvarchar] (255) DEFAULT ('') NOT NULL , + [user_yim] [nvarchar] (255) DEFAULT ('') NOT NULL , + [user_msnm] [nvarchar] (255) DEFAULT ('') NOT NULL , + [user_jabber] [nvarchar] (255) DEFAULT ('') NOT NULL , + [user_website] [nvarchar] (200) DEFAULT ('') NOT NULL , + [user_occ] [nvarchar] (255) DEFAULT ('') NOT NULL , + [user_interests] [nvarchar] (8000) DEFAULT ('') NOT NULL , [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , - [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL + [user_newpasswd] [nvarchar] (32) DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -1716,8 +1716,8 @@ GO */ CREATE TABLE [phpbb_words] ( [word_id] [int] IDENTITY (1, 1) NOT NULL , - [word] [varchar] (255) DEFAULT ('') NOT NULL , - [replacement] [varchar] (255) DEFAULT ('') NOT NULL + [word] [nvarchar] (255) DEFAULT ('') NOT NULL , + [replacement] [nvarchar] (255) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql similarity index 97% rename from phpBB/install/schemas/mysql_schema.sql rename to phpBB/install/schemas/mysql_40_schema.sql index c3c2be3f4f..d71cf7c5d9 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -93,7 +93,7 @@ CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, ban_ip varchar(40) DEFAULT '' NOT NULL, - ban_email varchar(100) DEFAULT '' NOT NULL, + ban_email text DEFAULT '' NOT NULL, ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -171,7 +171,7 @@ CREATE TABLE phpbb_confirm ( # Table: 'phpbb_disallow' CREATE TABLE phpbb_disallow ( disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, - disallow_username varchar(252) DEFAULT '' NOT NULL, + disallow_username text DEFAULT '' NOT NULL, PRIMARY KEY (disallow_id) ); @@ -227,7 +227,7 @@ CREATE TABLE phpbb_forums ( forum_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL, forum_desc_uid varchar(5) DEFAULT '' NOT NULL, forum_link varchar(255) DEFAULT '' NOT NULL, - forum_password varchar(40) DEFAULT '' NOT NULL, + forum_password varchar(120) DEFAULT '' NOT NULL, forum_style tinyint(4) DEFAULT '0' NOT NULL, forum_image varchar(255) DEFAULT '' NOT NULL, forum_rules text DEFAULT '' NOT NULL, @@ -334,9 +334,9 @@ CREATE TABLE phpbb_lang ( lang_id tinyint(4) NOT NULL auto_increment, lang_iso varchar(30) DEFAULT '' NOT NULL, lang_dir varchar(30) DEFAULT '' NOT NULL, - lang_english_name varchar(100) DEFAULT '' NOT NULL, - lang_local_name varchar(255) DEFAULT '' NOT NULL, - lang_author varchar(255) DEFAULT '' NOT NULL, + lang_english_name text DEFAULT '' NOT NULL, + lang_local_name text DEFAULT '' NOT NULL, + lang_author text DEFAULT '' NOT NULL, PRIMARY KEY (lang_id), KEY lang_iso (lang_iso) ); @@ -367,7 +367,7 @@ CREATE TABLE phpbb_log ( CREATE TABLE phpbb_moderator_cache ( forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - username varchar(252) DEFAULT '' NOT NULL, + username text DEFAULT '' NOT NULL, group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, group_name varchar(255) DEFAULT '' NOT NULL, display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, @@ -434,7 +434,7 @@ CREATE TABLE phpbb_posts ( enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - post_username varchar(252) DEFAULT '' NOT NULL, + post_username text DEFAULT '' NOT NULL, post_subject text DEFAULT '' NOT NULL, post_text mediumtext DEFAULT '' NOT NULL, post_checksum varchar(32) DEFAULT '' NOT NULL, @@ -547,7 +547,7 @@ CREATE TABLE phpbb_profile_fields ( field_maxlen varchar(255) DEFAULT '' NOT NULL, field_novalue varchar(255) DEFAULT '' NOT NULL, field_default_value varchar(255) DEFAULT '' NOT NULL, - field_validation varchar(20) DEFAULT '' NOT NULL, + field_validation varchar(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_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -637,7 +637,7 @@ CREATE TABLE phpbb_search_results ( # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id mediumint(8) UNSIGNED NOT NULL auto_increment, - word_text varchar(252) /*!40101 CHARACTER SET utf8 */ BINARY DEFAULT '' NOT NULL, + word_text varchar(255) DEFAULT '' NOT NULL, word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (word_id), UNIQUE wrd_txt (word_text) @@ -697,8 +697,8 @@ CREATE TABLE phpbb_sitelist ( # Table: 'phpbb_smilies' CREATE TABLE phpbb_smilies ( smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, - code varchar(50) DEFAULT '' NOT NULL, - emotion varchar(50) DEFAULT '' NOT NULL, + code varchar(150) DEFAULT '' NOT NULL, + emotion varchar(150) DEFAULT '' NOT NULL, smiley_url varchar(50) DEFAULT '' NOT NULL, smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, @@ -712,7 +712,7 @@ CREATE TABLE phpbb_smilies ( # Table: 'phpbb_styles' CREATE TABLE phpbb_styles ( style_id tinyint(4) NOT NULL auto_increment, - style_name varchar(252) DEFAULT '' NOT NULL, + style_name text DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, template_id tinyint(4) DEFAULT '0' NOT NULL, @@ -729,7 +729,7 @@ CREATE TABLE phpbb_styles ( # Table: 'phpbb_styles_template' CREATE TABLE phpbb_styles_template ( template_id tinyint(4) NOT NULL auto_increment, - template_name varchar(252) DEFAULT '' NOT NULL, + template_name text DEFAULT '' NOT NULL, template_copyright varchar(255) DEFAULT '' NOT NULL, template_path varchar(100) DEFAULT '' NOT NULL, bbcode_bitfield varchar(252) DEFAULT 'kNg=' NOT NULL, @@ -754,7 +754,7 @@ CREATE TABLE phpbb_styles_template_data ( # Table: 'phpbb_styles_theme' CREATE TABLE phpbb_styles_theme ( theme_id tinyint(4) NOT NULL auto_increment, - theme_name varchar(252) DEFAULT '' NOT NULL, + theme_name text DEFAULT '' NOT NULL, theme_copyright varchar(255) DEFAULT '' NOT NULL, theme_path varchar(100) DEFAULT '' NOT NULL, theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, @@ -768,7 +768,7 @@ CREATE TABLE phpbb_styles_theme ( # Table: 'phpbb_styles_imageset' CREATE TABLE phpbb_styles_imageset ( imageset_id tinyint(4) NOT NULL auto_increment, - imageset_name varchar(252) DEFAULT '' NOT NULL, + imageset_name text DEFAULT '' NOT NULL, imageset_copyright varchar(255) DEFAULT '' NOT NULL, imageset_path varchar(100) DEFAULT '' NOT NULL, site_logo varchar(200) DEFAULT '' NOT NULL, @@ -967,15 +967,15 @@ CREATE TABLE phpbb_users ( user_ip varchar(40) DEFAULT '' NOT NULL, user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, username varchar(252) DEFAULT '' NOT NULL, - user_password varchar(40) DEFAULT '' NOT NULL, + user_password varchar(120) DEFAULT '' NOT NULL, user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_email varchar(100) DEFAULT '' NOT NULL, + user_email text DEFAULT '' NOT NULL, user_email_hash bigint(20) DEFAULT '0' NOT NULL, user_birthday varchar(10) DEFAULT '' NOT NULL, user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, - user_lastpage varchar(200) DEFAULT '' NOT NULL, + user_lastpage text DEFAULT '' NOT NULL, user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, user_warnings tinyint(4) DEFAULT '0' NOT NULL, @@ -985,7 +985,7 @@ CREATE TABLE phpbb_users ( user_lang varchar(30) DEFAULT '' NOT NULL, 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_dateformat varchar(90) DEFAULT 'd M Y H:i' NOT NULL, user_style tinyint(4) DEFAULT '0' NOT NULL, user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_colour varchar(6) DEFAULT '' NOT NULL, @@ -1017,17 +1017,17 @@ CREATE TABLE phpbb_users ( user_sig mediumtext DEFAULT '' NOT NULL, user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL, user_sig_bbcode_bitfield varchar(252) DEFAULT '' NOT NULL, - user_from varchar(100) DEFAULT '' NOT NULL, + user_from text DEFAULT '' NOT NULL, user_icq varchar(15) DEFAULT '' NOT NULL, user_aim varchar(255) DEFAULT '' NOT NULL, user_yim varchar(255) DEFAULT '' NOT NULL, user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, - user_website varchar(200) DEFAULT '' NOT NULL, + user_website text DEFAULT '' NOT NULL, user_occ varchar(255) DEFAULT '' NOT NULL, user_interests text DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, - user_newpasswd varchar(32) DEFAULT '' NOT NULL, + user_newpasswd varchar(96) DEFAULT '' NOT NULL, PRIMARY KEY (user_id), KEY user_birthday (user_birthday), KEY user_email_hash (user_email_hash), diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql new file mode 100644 index 0000000000..8fda313642 --- /dev/null +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -0,0 +1,1069 @@ +# +# MySQL Schema for phpBB 3.x - (c) phpBB Group, 2005 +# +# $Id$ +# + +# 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 DEFAULT '' 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_general_ci`; + + +# Table: 'phpbb_acl_groups' +CREATE TABLE phpbb_acl_groups ( + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_setting tinyint(2) DEFAULT '0' NOT NULL, + KEY group_id (group_id), + KEY auth_opt_id (auth_option_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_acl_options' +CREATE TABLE phpbb_acl_options ( + auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment, + auth_option varchar(50) DEFAULT '' NOT NULL, + is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (auth_option_id), + KEY auth_option (auth_option) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_acl_roles' +CREATE TABLE phpbb_acl_roles ( + role_id mediumint(8) UNSIGNED NOT NULL auto_increment, + role_name varchar(255) DEFAULT '' NOT NULL, + role_description text DEFAULT '' NOT NULL, + role_type varchar(10) DEFAULT '' NOT NULL, + role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (role_id), + KEY role_type (role_type), + KEY role_order (role_order) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_acl_roles_data' +CREATE TABLE phpbb_acl_roles_data ( + role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_setting tinyint(2) DEFAULT '0' NOT NULL, + PRIMARY KEY (role_id, auth_option_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_acl_users' +CREATE TABLE phpbb_acl_users ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + auth_setting tinyint(2) DEFAULT '0' NOT NULL, + KEY user_id (user_id), + KEY auth_option_id (auth_option_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_banlist' +CREATE TABLE phpbb_banlist ( + ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, + ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + ban_ip varchar(40) DEFAULT '' NOT NULL, + ban_email varchar(100) DEFAULT '' NOT NULL, + ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL, + ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL, + ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + ban_reason text DEFAULT '' NOT NULL, + ban_give_reason text DEFAULT '' NOT NULL, + PRIMARY KEY (ban_id), + KEY ban_end (ban_end), + KEY ban_user (ban_userid, ban_exclude), + KEY ban_email (ban_email, ban_exclude), + KEY ban_ip (ban_ip, ban_exclude) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_bbcodes' +CREATE TABLE phpbb_bbcodes ( + bbcode_id tinyint(3) DEFAULT '0' NOT NULL, + bbcode_tag varchar(16) DEFAULT '' NOT NULL, + bbcode_helpline varchar(255) DEFAULT '' NOT NULL, + display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + bbcode_match text DEFAULT '' NOT NULL, + bbcode_tpl mediumtext DEFAULT '' NOT NULL, + first_pass_match mediumtext DEFAULT '' NOT NULL, + first_pass_replace mediumtext DEFAULT '' NOT NULL, + second_pass_match mediumtext DEFAULT '' NOT NULL, + second_pass_replace mediumtext DEFAULT '' NOT NULL, + PRIMARY KEY (bbcode_id), + KEY display_on_post (display_on_posting) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_bookmarks' +CREATE TABLE phpbb_bookmarks ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + order_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + KEY order_id (order_id), + KEY topic_user_id (topic_id, user_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_bots' +CREATE TABLE phpbb_bots ( + bot_id mediumint(8) UNSIGNED NOT NULL auto_increment, + bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + bot_name text DEFAULT '' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + bot_agent varchar(255) DEFAULT '' NOT NULL, + bot_ip varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (bot_id), + KEY bot_active (bot_active) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_config' +CREATE TABLE phpbb_config ( + config_name varchar(252) DEFAULT '' NOT NULL, + config_value varchar(255) DEFAULT '' NOT NULL, + is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (config_name), + KEY is_dynamic (is_dynamic) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_confirm' +CREATE TABLE phpbb_confirm ( + confirm_id char(32) DEFAULT '' NOT NULL, + session_id char(32) DEFAULT '' NOT NULL, + confirm_type tinyint(3) DEFAULT '0' NOT NULL, + code varchar(8) DEFAULT '' NOT NULL, + PRIMARY KEY (session_id, confirm_id), + KEY confirm_type (confirm_type) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_disallow' +CREATE TABLE phpbb_disallow ( + disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment, + disallow_username varchar(252) DEFAULT '' NOT NULL, + PRIMARY KEY (disallow_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_drafts' +CREATE TABLE phpbb_drafts ( + draft_id mediumint(8) UNSIGNED NOT NULL auto_increment, + 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, + save_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + draft_subject text DEFAULT '' NOT NULL, + draft_message mediumtext DEFAULT '' NOT NULL, + PRIMARY KEY (draft_id), + KEY save_time (save_time) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# 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_general_ci`; + + +# Table: 'phpbb_extension_groups' +CREATE TABLE phpbb_extension_groups ( + group_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_name varchar(255) DEFAULT '' NOT NULL, + cat_id tinyint(2) DEFAULT '0' NOT NULL, + allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + upload_icon varchar(255) DEFAULT '' NOT NULL, + max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL, + allowed_forums text DEFAULT '' NOT NULL, + allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (group_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_forums' +CREATE TABLE phpbb_forums ( + forum_id mediumint(8) UNSIGNED NOT NULL auto_increment, + parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_parents mediumtext DEFAULT '' NOT NULL, + forum_name text DEFAULT '' NOT NULL, + forum_desc text DEFAULT '' NOT NULL, + forum_desc_bitfield varchar(252) DEFAULT '' NOT NULL, + forum_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL, + forum_desc_uid varchar(5) DEFAULT '' NOT NULL, + forum_link varchar(255) DEFAULT '' NOT NULL, + forum_password varchar(40) DEFAULT '' NOT NULL, + forum_style tinyint(4) DEFAULT '0' NOT NULL, + forum_image varchar(255) DEFAULT '' NOT NULL, + forum_rules text DEFAULT '' NOT NULL, + forum_rules_link varchar(255) DEFAULT '' NOT NULL, + forum_rules_bitfield varchar(252) DEFAULT '' NOT NULL, + forum_rules_options int(11) UNSIGNED DEFAULT '0' NOT NULL, + forum_rules_uid varchar(5) DEFAULT '' NOT NULL, + 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 mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_topics_real 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 text DEFAULT '' NOT NULL, + forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + 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, + 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, + enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL, + prune_days tinyint(4) DEFAULT '0' NOT NULL, + prune_viewed tinyint(4) DEFAULT '0' NOT NULL, + prune_freq tinyint(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (forum_id), + KEY left_right_id (left_id, right_id), + KEY forum_lastpost_id (forum_last_post_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_forums_access' +CREATE TABLE phpbb_forums_access ( + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_id char(32) DEFAULT '' NOT NULL, + PRIMARY KEY (forum_id, user_id, session_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_forums_track' +CREATE TABLE phpbb_forums_track ( + user_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, forum_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_forums_watch' +CREATE TABLE phpbb_forums_watch ( + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + KEY forum_id (forum_id), + KEY user_id (user_id), + KEY notify_stat (notify_status) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_groups' +CREATE TABLE phpbb_groups ( + group_id mediumint(8) UNSIGNED NOT NULL auto_increment, + group_type tinyint(4) DEFAULT '1' NOT NULL, + group_name varchar(252) DEFAULT '' NOT NULL, + group_desc text DEFAULT '' NOT NULL, + group_desc_bitfield varchar(252) DEFAULT '' NOT NULL, + group_desc_options int(11) UNSIGNED DEFAULT '0' NOT NULL, + group_desc_uid varchar(5) DEFAULT '' NOT NULL, + group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + group_avatar varchar(255) DEFAULT '' NOT NULL, + group_avatar_type tinyint(4) DEFAULT '0' NOT NULL, + group_avatar_width tinyint(4) DEFAULT '0' NOT NULL, + group_avatar_height tinyint(4) DEFAULT '0' NOT NULL, + group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_colour varchar(6) DEFAULT '' NOT NULL, + 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_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (group_id), + KEY group_legend (group_legend) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_icons' +CREATE TABLE phpbb_icons ( + icons_id mediumint(8) UNSIGNED NOT NULL auto_increment, + icons_url varchar(255) DEFAULT '' NOT NULL, + icons_width tinyint(4) DEFAULT '0' NOT NULL, + icons_height tinyint(4) DEFAULT '0' NOT NULL, + icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (icons_id), + KEY display_on_posting (display_on_posting) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_lang' +CREATE TABLE phpbb_lang ( + lang_id tinyint(4) NOT NULL auto_increment, + lang_iso varchar(30) DEFAULT '' NOT NULL, + lang_dir varchar(30) DEFAULT '' NOT NULL, + lang_english_name varchar(100) DEFAULT '' NOT NULL, + lang_local_name varchar(255) DEFAULT '' NOT NULL, + lang_author varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (lang_id), + KEY lang_iso (lang_iso) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_log' +CREATE TABLE phpbb_log ( + log_id mediumint(8) UNSIGNED NOT NULL auto_increment, + log_type tinyint(4) DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + log_ip varchar(40) DEFAULT '' NOT NULL, + log_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + log_operation text DEFAULT '' NOT NULL, + log_data mediumtext DEFAULT '' NOT NULL, + PRIMARY KEY (log_id), + KEY log_type (log_type), + KEY forum_id (forum_id), + KEY topic_id (topic_id), + KEY reportee_id (reportee_id), + KEY user_id (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_moderator_cache' +CREATE TABLE phpbb_moderator_cache ( + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + username varchar(252) DEFAULT '' NOT NULL, + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_name varchar(255) DEFAULT '' NOT NULL, + display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + KEY disp_idx (display_on_index), + KEY forum_id (forum_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_modules' +CREATE TABLE phpbb_modules ( + module_id mediumint(8) UNSIGNED NOT NULL auto_increment, + module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + module_basename varchar(255) DEFAULT '' NOT NULL, + module_class varchar(10) DEFAULT '' NOT NULL, + parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + module_langname varchar(255) DEFAULT '' NOT NULL, + module_mode varchar(255) DEFAULT '' NOT NULL, + module_auth varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (module_id), + KEY left_right_id (left_id, right_id), + KEY module_enabled (module_enabled), + KEY class_left_id (module_class, left_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_poll_options' +CREATE TABLE phpbb_poll_options ( + poll_option_id tinyint(4) DEFAULT '0' NOT NULL, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poll_option_text text DEFAULT '' NOT NULL, + poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + KEY poll_opt_id (poll_option_id), + KEY topic_id (topic_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_poll_votes' +CREATE TABLE phpbb_poll_votes ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poll_option_id tinyint(4) DEFAULT '0' NOT NULL, + vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + vote_user_ip varchar(40) DEFAULT '' NOT NULL, + KEY topic_id (topic_id), + KEY vote_user_id (vote_user_id), + KEY vote_user_ip (vote_user_ip) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_posts' +CREATE TABLE phpbb_posts ( + post_id mediumint(8) UNSIGNED NOT NULL auto_increment, + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + 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_approved tinyint(1) UNSIGNED DEFAULT '1' 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, + enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + post_username varchar(252) DEFAULT '' NOT NULL, + post_subject text DEFAULT '' NOT NULL, + post_text mediumtext DEFAULT '' NOT NULL, + post_checksum varchar(32) DEFAULT '' NOT NULL, + post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL, + post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + bbcode_bitfield varchar(252) DEFAULT '' NOT NULL, + bbcode_uid varchar(5) DEFAULT '' NOT NULL, + post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + post_edit_reason text DEFAULT '' NOT NULL, + 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, + PRIMARY KEY (post_id), + KEY forum_id (forum_id), + KEY topic_id (topic_id), + KEY poster_ip (poster_ip), + KEY poster_id (poster_id), + KEY post_approved (post_approved), + KEY post_postcount (post_postcount), + KEY post_time (post_time) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_privmsgs' +CREATE TABLE phpbb_privmsgs ( + msg_id mediumint(8) UNSIGNED NOT NULL auto_increment, + root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_ip varchar(40) DEFAULT '' NOT NULL, + message_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + message_subject text DEFAULT '' NOT NULL, + message_text mediumtext DEFAULT '' NOT NULL, + message_edit_reason text DEFAULT '' NOT NULL, + message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL, + message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + bbcode_bitfield varchar(252) DEFAULT '' NOT NULL, + bbcode_uid varchar(5) DEFAULT '' NOT NULL, + message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + to_address text DEFAULT '' NOT NULL, + bcc_address text DEFAULT '' NOT NULL, + PRIMARY KEY (msg_id), + KEY author_ip (author_ip), + KEY message_time (message_time), + KEY author_id (author_id), + KEY root_level (root_level) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_privmsgs_folder' +CREATE TABLE phpbb_privmsgs_folder ( + folder_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + folder_name varchar(255) DEFAULT '' NOT NULL, + pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (folder_id), + KEY user_id (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_privmsgs_rules' +CREATE TABLE phpbb_privmsgs_rules ( + rule_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_string varchar(255) DEFAULT '' NOT NULL, + rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rule_folder_id int(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (rule_id), + KEY user_id (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_privmsgs_to' +CREATE TABLE phpbb_privmsgs_to ( + msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + folder_id int(4) DEFAULT '0' NOT NULL, + KEY msg_id (msg_id), + KEY author_id (author_id), + KEY usr_flder_id (user_id, folder_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_profile_fields' +CREATE TABLE phpbb_profile_fields ( + field_id mediumint(8) UNSIGNED NOT NULL auto_increment, + field_name varchar(255) DEFAULT '' NOT NULL, + field_type tinyint(4) DEFAULT '0' NOT NULL, + field_ident varchar(20) DEFAULT '' NOT NULL, + field_length varchar(20) DEFAULT '' NOT NULL, + field_minlen varchar(255) DEFAULT '' NOT NULL, + field_maxlen varchar(255) DEFAULT '' NOT NULL, + field_novalue varchar(255) DEFAULT '' NOT NULL, + 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_on_reg 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, + PRIMARY KEY (field_id), + KEY fld_type (field_type), + KEY fld_ordr (field_order) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_profile_fields_data' +CREATE TABLE phpbb_profile_fields_data ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_profile_fields_lang' +CREATE TABLE phpbb_profile_fields_lang ( + field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + field_type tinyint(4) DEFAULT '0' NOT NULL, + lang_value varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (field_id, lang_id, option_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_profile_lang' +CREATE TABLE phpbb_profile_lang ( + field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + lang_name varchar(255) DEFAULT '' NOT NULL, + lang_explain text DEFAULT '' NOT NULL, + lang_default_value varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (field_id, lang_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_ranks' +CREATE TABLE phpbb_ranks ( + rank_id mediumint(8) UNSIGNED NOT NULL auto_increment, + rank_title varchar(255) DEFAULT '' NOT NULL, + rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + rank_image varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (rank_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_reports' +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, + 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 DEFAULT '' NOT NULL, + PRIMARY KEY (report_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_reports_reasons' +CREATE TABLE phpbb_reports_reasons ( + reason_id smallint(4) UNSIGNED NOT NULL auto_increment, + reason_title varchar(255) DEFAULT '' NOT NULL, + reason_description mediumtext DEFAULT '' NOT NULL, + reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (reason_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_search_results' +CREATE TABLE phpbb_search_results ( + search_key varchar(32) DEFAULT '' NOT NULL, + search_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + search_keywords mediumtext DEFAULT '' NOT NULL, + search_authors mediumtext DEFAULT '' NOT NULL, + PRIMARY KEY (search_key) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_search_wordlist' +CREATE TABLE phpbb_search_wordlist ( + word_id mediumint(8) UNSIGNED NOT NULL auto_increment, + word_text varchar(255) DEFAULT '' NOT NULL, + word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (word_id), + UNIQUE wrd_txt (word_text) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_search_wordmatch' +CREATE TABLE phpbb_search_wordmatch ( + post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + KEY word_id (word_id), + KEY post_id (post_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_sessions' +CREATE TABLE phpbb_sessions ( + session_id char(32) DEFAULT '' NOT NULL, + session_user_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, + session_ip varchar(40) DEFAULT '' NOT NULL, + session_browser varchar(150) DEFAULT '' NOT NULL, + session_page varchar(255) DEFAULT '' NOT NULL, + 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, + PRIMARY KEY (session_id), + KEY session_time (session_time), + KEY session_user_id (session_user_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_sessions_keys' +CREATE TABLE phpbb_sessions_keys ( + key_id char(32) DEFAULT '' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + last_ip varchar(40) DEFAULT '' NOT NULL, + last_login int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (key_id, user_id), + KEY last_login (last_login) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_sitelist' +CREATE TABLE phpbb_sitelist ( + site_id mediumint(8) UNSIGNED NOT NULL auto_increment, + site_ip varchar(40) DEFAULT '' NOT NULL, + site_hostname varchar(255) DEFAULT '' NOT NULL, + ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (site_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_smilies' +CREATE TABLE phpbb_smilies ( + smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment, + code varchar(50) DEFAULT '' NOT NULL, + emotion varchar(50) DEFAULT '' NOT NULL, + smiley_url varchar(50) DEFAULT '' NOT NULL, + smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + PRIMARY KEY (smiley_id), + KEY display_on_post (display_on_posting) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_styles' +CREATE TABLE phpbb_styles ( + style_id tinyint(4) NOT NULL auto_increment, + style_name varchar(252) DEFAULT '' NOT NULL, + style_copyright varchar(255) DEFAULT '' NOT NULL, + style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + template_id tinyint(4) DEFAULT '0' NOT NULL, + theme_id tinyint(4) DEFAULT '0' NOT NULL, + imageset_id tinyint(4) DEFAULT '0' NOT NULL, + PRIMARY KEY (style_id), + UNIQUE style_name (style_name), + KEY template_id (template_id), + KEY theme_id (theme_id), + KEY imageset_id (imageset_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_styles_template' +CREATE TABLE phpbb_styles_template ( + template_id tinyint(4) NOT NULL auto_increment, + template_name varchar(252) DEFAULT '' NOT NULL, + template_copyright varchar(255) DEFAULT '' NOT NULL, + template_path varchar(100) DEFAULT '' NOT NULL, + bbcode_bitfield varchar(252) DEFAULT 'kNg=' NOT NULL, + template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (template_id), + UNIQUE tmplte_nm (template_name) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_styles_template_data' +CREATE TABLE phpbb_styles_template_data ( + template_id tinyint(4) NOT NULL auto_increment, + template_filename varchar(100) DEFAULT '' NOT NULL, + template_included text DEFAULT '' NOT NULL, + template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, + template_data mediumtext DEFAULT '' NOT NULL, + KEY tid (template_id), + KEY tfn (template_filename) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_styles_theme' +CREATE TABLE phpbb_styles_theme ( + theme_id tinyint(4) NOT NULL auto_increment, + theme_name varchar(252) DEFAULT '' NOT NULL, + theme_copyright varchar(255) DEFAULT '' NOT NULL, + theme_path varchar(100) DEFAULT '' NOT NULL, + theme_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL, + theme_data mediumtext DEFAULT '' NOT NULL, + PRIMARY KEY (theme_id), + UNIQUE theme_name (theme_name) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_styles_imageset' +CREATE TABLE phpbb_styles_imageset ( + imageset_id tinyint(4) NOT NULL auto_increment, + imageset_name varchar(252) DEFAULT '' NOT NULL, + imageset_copyright varchar(255) DEFAULT '' NOT NULL, + imageset_path varchar(100) DEFAULT '' NOT NULL, + site_logo varchar(200) DEFAULT '' NOT NULL, + upload_bar varchar(200) DEFAULT '' NOT NULL, + poll_left varchar(200) DEFAULT '' NOT NULL, + poll_center varchar(200) DEFAULT '' NOT NULL, + poll_right varchar(200) DEFAULT '' NOT NULL, + icon_friend varchar(200) DEFAULT '' NOT NULL, + icon_foe varchar(200) DEFAULT '' NOT NULL, + forum_link varchar(200) DEFAULT '' NOT NULL, + forum_read varchar(200) DEFAULT '' NOT NULL, + forum_read_locked varchar(200) DEFAULT '' NOT NULL, + forum_read_subforum varchar(200) DEFAULT '' NOT NULL, + forum_unread varchar(200) DEFAULT '' NOT NULL, + forum_unread_locked varchar(200) DEFAULT '' NOT NULL, + forum_unread_subforum varchar(200) DEFAULT '' NOT NULL, + topic_moved varchar(200) DEFAULT '' NOT NULL, + topic_read varchar(200) DEFAULT '' NOT NULL, + topic_read_mine varchar(200) DEFAULT '' NOT NULL, + topic_read_hot varchar(200) DEFAULT '' NOT NULL, + topic_read_hot_mine varchar(200) DEFAULT '' NOT NULL, + topic_read_locked varchar(200) DEFAULT '' NOT NULL, + topic_read_locked_mine varchar(200) DEFAULT '' NOT NULL, + topic_unread varchar(200) DEFAULT '' NOT NULL, + topic_unread_mine varchar(200) DEFAULT '' NOT NULL, + topic_unread_hot varchar(200) DEFAULT '' NOT NULL, + topic_unread_hot_mine varchar(200) DEFAULT '' NOT NULL, + topic_unread_locked varchar(200) DEFAULT '' NOT NULL, + topic_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, + sticky_read varchar(200) DEFAULT '' NOT NULL, + sticky_read_mine varchar(200) DEFAULT '' NOT NULL, + sticky_read_locked varchar(200) DEFAULT '' NOT NULL, + sticky_read_locked_mine varchar(200) DEFAULT '' NOT NULL, + sticky_unread varchar(200) DEFAULT '' NOT NULL, + sticky_unread_mine varchar(200) DEFAULT '' NOT NULL, + sticky_unread_locked varchar(200) DEFAULT '' NOT NULL, + sticky_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, + announce_read varchar(200) DEFAULT '' NOT NULL, + announce_read_mine varchar(200) DEFAULT '' NOT NULL, + announce_read_locked varchar(200) DEFAULT '' NOT NULL, + announce_read_locked_mine varchar(200) DEFAULT '' NOT NULL, + announce_unread varchar(200) DEFAULT '' NOT NULL, + announce_unread_mine varchar(200) DEFAULT '' NOT NULL, + announce_unread_locked varchar(200) DEFAULT '' NOT NULL, + announce_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, + global_read varchar(200) DEFAULT '' NOT NULL, + global_read_mine varchar(200) DEFAULT '' NOT NULL, + global_read_locked varchar(200) DEFAULT '' NOT NULL, + global_read_locked_mine varchar(200) DEFAULT '' NOT NULL, + global_unread varchar(200) DEFAULT '' NOT NULL, + global_unread_mine varchar(200) DEFAULT '' NOT NULL, + global_unread_locked varchar(200) DEFAULT '' NOT NULL, + global_unread_locked_mine varchar(200) DEFAULT '' NOT NULL, + pm_read varchar(200) DEFAULT '' NOT NULL, + pm_unread varchar(200) DEFAULT '' NOT NULL, + icon_contact_aim varchar(200) DEFAULT '' NOT NULL, + icon_contact_email varchar(200) DEFAULT '' NOT NULL, + icon_contact_icq varchar(200) DEFAULT '' NOT NULL, + icon_contact_jabber varchar(200) DEFAULT '' NOT NULL, + icon_contact_msnm varchar(200) DEFAULT '' NOT NULL, + icon_contact_pm varchar(200) DEFAULT '' NOT NULL, + icon_contact_yahoo varchar(200) DEFAULT '' NOT NULL, + icon_contact_www varchar(200) DEFAULT '' NOT NULL, + icon_post_delete varchar(200) DEFAULT '' NOT NULL, + icon_post_edit varchar(200) DEFAULT '' NOT NULL, + icon_post_info varchar(200) DEFAULT '' NOT NULL, + icon_post_quote varchar(200) DEFAULT '' NOT NULL, + icon_post_report varchar(200) DEFAULT '' NOT NULL, + icon_post_target varchar(200) DEFAULT '' NOT NULL, + icon_post_target_unread varchar(200) DEFAULT '' NOT NULL, + icon_topic_attach varchar(200) DEFAULT '' NOT NULL, + icon_topic_latest varchar(200) DEFAULT '' NOT NULL, + icon_topic_newest varchar(200) DEFAULT '' NOT NULL, + icon_topic_reported varchar(200) DEFAULT '' NOT NULL, + icon_topic_unapproved varchar(200) DEFAULT '' NOT NULL, + icon_user_online varchar(200) DEFAULT '' NOT NULL, + icon_user_offline varchar(200) DEFAULT '' NOT NULL, + icon_user_profile varchar(200) DEFAULT '' NOT NULL, + icon_user_search varchar(200) DEFAULT '' NOT NULL, + icon_user_warn varchar(200) DEFAULT '' NOT NULL, + button_pm_forward varchar(200) DEFAULT '' NOT NULL, + button_pm_new varchar(200) DEFAULT '' NOT NULL, + button_pm_reply varchar(200) DEFAULT '' NOT NULL, + button_topic_locked varchar(200) DEFAULT '' NOT NULL, + button_topic_new varchar(200) DEFAULT '' NOT NULL, + button_topic_reply varchar(200) DEFAULT '' NOT NULL, + user_icon1 varchar(200) DEFAULT '' NOT NULL, + user_icon2 varchar(200) DEFAULT '' NOT NULL, + user_icon3 varchar(200) DEFAULT '' NOT NULL, + user_icon4 varchar(200) DEFAULT '' NOT NULL, + user_icon5 varchar(200) DEFAULT '' NOT NULL, + user_icon6 varchar(200) DEFAULT '' NOT NULL, + user_icon7 varchar(200) DEFAULT '' NOT NULL, + user_icon8 varchar(200) DEFAULT '' NOT NULL, + user_icon9 varchar(200) DEFAULT '' NOT NULL, + user_icon10 varchar(200) DEFAULT '' NOT NULL, + PRIMARY KEY (imageset_id), + UNIQUE imgset_nm (imageset_name) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_topics' +CREATE TABLE phpbb_topics ( + topic_id mediumint(8) UNSIGNED NOT NULL auto_increment, + 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_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + topic_title text DEFAULT '' 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_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_replies_real 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, + topic_first_poster_name varchar(255) DEFAULT '' NOT NULL, + topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL, + topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_last_poster_name varchar(255) DEFAULT '' NOT NULL, + topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL, + topic_last_post_subject text DEFAULT '' NOT NULL, + topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + poll_title text DEFAULT '' NOT NULL, + poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL, + poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL, + 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, + 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) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# 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, + 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) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# 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, + topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (user_id, topic_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_topics_watch' +CREATE TABLE phpbb_topics_watch ( + topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + KEY topic_id (topic_id), + KEY user_id (user_id), + KEY notify_stat (notify_status) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_user_group' +CREATE TABLE phpbb_user_group ( + group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + KEY group_id (group_id), + KEY user_id (user_id), + KEY group_leader (group_leader) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_users' +CREATE TABLE phpbb_users ( + user_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_type tinyint(2) DEFAULT '0' NOT NULL, + group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, + user_permissions mediumtext DEFAULT '' NOT NULL, + user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_ip varchar(40) DEFAULT '' NOT NULL, + user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, + username varchar(252) DEFAULT '' NOT NULL, + user_password varchar(40) DEFAULT '' NOT NULL, + user_passchg int(11) UNSIGNED DEFAULT '0' 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, + user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_lastpage varchar(200) DEFAULT '' NOT NULL, + user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, + user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_warnings tinyint(4) DEFAULT '0' NOT NULL, + user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, + user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_lang varchar(30) DEFAULT '' NOT NULL, + 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 tinyint(4) 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_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, + user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, + user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL, + user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL, + user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL, + user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL, + user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_notify_type tinyint(4) DEFAULT '0' NOT NULL, + user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_email tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, + user_options int(11) UNSIGNED DEFAULT '893' NOT NULL, + user_avatar varchar(255) DEFAULT '' NOT NULL, + user_avatar_type tinyint(2) DEFAULT '0' NOT NULL, + user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL, + user_sig mediumtext DEFAULT '' NOT NULL, + user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL, + user_sig_bbcode_bitfield varchar(252) DEFAULT '' NOT NULL, + user_from varchar(100) DEFAULT '' NOT NULL, + user_icq varchar(15) DEFAULT '' NOT NULL, + user_aim varchar(255) DEFAULT '' NOT NULL, + user_yim varchar(255) DEFAULT '' NOT NULL, + user_msnm varchar(255) DEFAULT '' NOT NULL, + user_jabber varchar(255) DEFAULT '' NOT NULL, + user_website varchar(200) DEFAULT '' NOT NULL, + user_occ varchar(255) DEFAULT '' NOT NULL, + user_interests text DEFAULT '' NOT NULL, + user_actkey varchar(32) DEFAULT '' NOT NULL, + user_newpasswd varchar(32) DEFAULT '' NOT NULL, + PRIMARY KEY (user_id), + KEY user_birthday (user_birthday), + KEY user_email_hash (user_email_hash), + KEY user_type (user_type), + KEY username (username) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_warnings' +CREATE TABLE phpbb_warnings ( + warning_id mediumint(8) UNSIGNED NOT NULL auto_increment, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + PRIMARY KEY (warning_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_words' +CREATE TABLE phpbb_words ( + word_id mediumint(8) UNSIGNED NOT NULL auto_increment, + word varchar(255) DEFAULT '' NOT NULL, + replacement varchar(255) DEFAULT '' NOT NULL, + PRIMARY KEY (word_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + +# Table: 'phpbb_zebra' +CREATE TABLE phpbb_zebra ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, + KEY user_id (user_id), + KEY zebra_id (zebra_id) +) CHARACTER SET `utf8` COLLATE `utf8_general_ci`; + + diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 6cfb6d5bcd..74c37acacd 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1232,7 +1232,7 @@ CREATE TABLE phpbb_search_results ( */ CREATE TABLE phpbb_search_wordlist ( word_id number(8) NOT NULL, - word_text nvarchar2(252) DEFAULT '' , + word_text varchar2(255) DEFAULT '' , word_common number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_id), CONSTRAINT u_phpbb_wrd_txt UNIQUE (word_text) diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 89cd209547..147df5875b 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -847,7 +847,7 @@ CREATE SEQUENCE phpbb_search_wordlist_seq; CREATE TABLE phpbb_search_wordlist ( word_id INT4 DEFAULT nextval('phpbb_search_wordlist_seq'), - word_text varchar(252) DEFAULT '' NOT NULL, + word_text varchar(255) DEFAULT '' NOT NULL, word_common INT2 DEFAULT '0' NOT NULL CHECK (word_common >= 0), PRIMARY KEY (word_id) ); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 0161ef60ad..6750113dce 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -616,7 +616,7 @@ CREATE TABLE phpbb_search_results ( # Table: 'phpbb_search_wordlist' CREATE TABLE phpbb_search_wordlist ( word_id INTEGER PRIMARY KEY NOT NULL , - word_text nvarchar(252) NOT NULL DEFAULT '', + word_text varchar(255) NOT NULL DEFAULT '', word_common INTEGER UNSIGNED NOT NULL DEFAULT '0' ); diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 0c0fdb0274..811d5414bb 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -157,7 +157,9 @@ $lang = array_merge($lang, array( 'INST_ERR_DB_FORUM_PATH' => 'The database file specified is within your forum directory tree. You should put this file in a non web-accessible location', 'INST_ERR_DB_NO_ERROR' => 'No error message given', 'INST_ERR_DB_NO_MYSQL4' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.x/5.x" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.', - 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.1.x/5.x with MySQLi Extension" option you have selected. Please try the "MySQL 4.x/5.x" or "MySQL 3.23.x/4.x" option instead.', + 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the "MySQL 4.1.x/5.x with MySQLi Extension" option you have selected. Please try the "MySQL 3.23.x/4.x" option instead.', + 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the NLS_CHARACTERSET parameter to UTF8. Either upgrade your installation to 9.2+ or change the parameter.', + 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in UNICODE or UTF8 encoding. Try installing with a database in UNICODE or UTF8 encoding', 'INST_ERR_DB_NO_NAME' => 'No database name specified', 'INST_ERR_EMAIL_INVALID' => 'The email address you entered is invalid', 'INST_ERR_EMAIL_MISMATCH' => 'The emails you entered did not match.',