aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acp/acp_board.php3
-rw-r--r--phpBB/includes/auth/auth_db.php18
-rw-r--r--phpBB/includes/captcha/captcha_gd.php213
-rw-r--r--phpBB/includes/captcha/fonts/shark.ttfbin46616 -> 0 bytes
-rw-r--r--phpBB/includes/ucp/ucp_register.php12
-rw-r--r--phpBB/install/schemas/firebird_schema.sql464
-rw-r--r--phpBB/install/schemas/mssql_schema.sql473
-rw-r--r--phpBB/install/schemas/mysql_schema.sql876
-rw-r--r--phpBB/install/schemas/oracle_schema.sql394
-rw-r--r--phpBB/install/schemas/postgres_schema.sql51
-rw-r--r--phpBB/install/schemas/schema_data.sql5
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql40
-rw-r--r--phpBB/language/en/acp/board.php3
-rw-r--r--phpBB/language/en/ucp.php7
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--phpBB/posting.php2
16 files changed, 1469 insertions, 1094 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 280ef4e395..d54ac32227 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -225,6 +225,9 @@ class acp_board
'policy_entropy' => array('lang' => 'CAPTCHA_ENTROPY', 'type' => 'radio:yes_no', 'explain' => false),
'policy_entropy_noise_pixel' => array('lang' => 'ENTROPY_NOISE_PIXEL', 'type' => 'select', 'method' => 'captcha_pixel_noise_select', 'explain' => false),
'policy_entropy_noise_line' => array('lang' => 'ENTROPY_NOISE_LINE', 'type' => 'radio:yes_no', 'explain' => false),
+ 'policy_shape' => array('lang' => 'CAPTCHA_SHAPE', 'type' => 'radio:yes_no', 'explain' => false),
+ 'policy_shape_noise_pixel' => array('lang' => 'SHAPE_NOISE_PIXEL', 'type' => 'select', 'method' => 'captcha_pixel_noise_select', 'explain' => false),
+ 'policy_shape_noise_line' => array('lang' => 'SHAPE_NOISE_LINE', 'type' => 'radio:yes_no', 'explain' => false),
'policy_3dbitmap' => array('lang' => 'CAPTCHA_3DBITMAP', 'type' => 'radio:yes_no', 'explain' => false),
)
);
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
index a4a6c8d268..071b61fdfe 100644
--- a/phpBB/includes/auth/auth_db.php
+++ b/phpBB/includes/auth/auth_db.php
@@ -71,15 +71,7 @@ function login_db(&$username, &$password)
if ($confirm_row)
{
- if (strcasecmp($confirm_row['code'], $confirm_code) == 0)
- {
- return array(
- 'status' => LOGIN_ERROR_ATTEMPTS,
- 'error_msg' => 'CONFIRM_CODE_WRONG',
- 'user_row' => $row,
- );
- }
- else
+ if (strcasecmp($confirm_row['code'], $confirm_code) === 0)
{
$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
@@ -87,6 +79,14 @@ function login_db(&$username, &$password)
AND confirm_type = " . CONFIRM_LOGIN;
$db->sql_query($sql);
}
+ else
+ {
+ return array(
+ 'status' => LOGIN_ERROR_ATTEMPTS,
+ 'error_msg' => 'CONFIRM_CODE_WRONG',
+ 'user_row' => $row,
+ );
+ }
}
else
{
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index fb7dee7a49..15c082225a 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -25,7 +25,7 @@ class captcha
{
global $config;
- $policy_modules = array('policy_entropy', 'policy_occlude', 'policy_3dbitmap');
+ $policy_modules = array('policy_entropy', 'policy_occlude', 'policy_3dbitmap', 'policy_shape');
// Remove all disabled policy modules
foreach ($policy_modules as $key => $name)
@@ -69,6 +69,210 @@ class captcha
}
/**
+ *
+ */
+ function draw_shape($type, $img, $x_min, $y_min, $x_max, $y_max, $color)
+ {
+ switch ($type)
+ {
+ case 'Square':
+ imagefilledpolygon($img, array($x_min, $y_max, $x_min, $y_min, $x_max, $y_min, $x_max, $y_max), 4, $color);
+ break;
+
+ case 'TriangleUp':
+ imagefilledpolygon($img, array($x_min, $y_max, ($x_min + $x_max) / 2, $y_min, $x_max, $y_max), 3, $color);
+ break;
+
+ case 'TriangleDown':
+ imagefilledpolygon($img, array($x_min, $y_min, ($x_min + $x_max) / 2, $y_max, $x_max, $y_min), 3, $color);
+ break;
+
+ case 'Circle':
+ imagefilledellipse($img, ($x_min + $x_max) / 2, ($y_min + $y_max) / 2, $x_max - $x_min, $y_max - $y_min, $color);
+ break;
+ }
+ }
+
+ /**
+ *
+ */
+ function draw_pattern($seed, $img, $x_min, $y_min, $x_max, $y_max, $colors, $thickness = 1)
+ {
+ $x_size = ($x_max - $x_min) / 4;
+ $y_size = ($y_max - $y_min) / 4;
+ $bitmap = substr($seed, 16, 4);
+ $numcolors = sizeof($colors) - 1;
+ for ($y = 0; $y < 4; ++$y)
+ {
+ $map = hexdec(substr($bitmap, $y, 1));
+ for ($x = 0; $x < 4; ++$x)
+ {
+ if ($map & (1 << $x))
+ {
+ $char = hexdec(substr($seed, ($y * 4) + $x, 1));
+ if (!($char >> 2))
+ {
+ switch ($char % 4)
+ {
+ case 0:
+ $shape = 'Circle';
+ break;
+
+ case 1:
+ $shape = 'Square';
+ break;
+
+ case 2:
+ $shape = 'TriangleUp';
+ break;
+
+ case 3:
+ $shape = 'TriangleDown';
+ break;
+ }
+ $this->draw_shape($shape, $img, $x_min + ($x * $x_size), $y_min + ($y * $y_size), $x_min + (($x + 1) * $x_size), $y_min + (($y + 1) * $y_size), $colors[array_rand($colors)]);
+ }
+ }
+ }
+ }
+
+ $cells = array();
+ for ($i = 0; $i < 6; ++$i)
+ {
+ $cells = hexdec(substr($seed, 20 + ($i * 2), 2));
+ $x1 = $cells % 4;
+ $cells = $cells >> 2;
+ $y1 = $cells % 4;
+ $cells = $cells >> 2;
+ $x2 = $cells % 4;
+ $cells = $cells >> 2;
+ $y2 = $cells % 4;
+ $x1_real = $x_min + (($x1 + 0.5) * $x_size);
+ $y1_real = $y_min + (($y1 + 0.5) * $y_size);
+ $x2_real = $x_min + (($x2 + 0.5) * $x_size);
+ $y2_real = $y_min + (($y2 + 0.5) * $y_size);
+ if ($thickness > 1)
+ {
+ imagesetthickness($img,$thickness);
+ }
+ imageline($img, $x1_real, $y1_real, $x2_real, $y2_real, $colors[array_rand($colors)]);
+ if ($thickness > 1)
+ {
+ imagesetthickness($img, 1);
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ function get_char_string()
+ {
+ static $chars = false;
+ static $charcount = 0;
+ if (!$chars)
+ {
+ $chars = array_merge(range('A', 'Z'), range('1', '9'));
+ $charcount = sizeof($chars) - 1;
+ }
+ $word = '';
+ for ($i = mt_rand(6, 8); $i > 0; --$i)
+ {
+ $word .= $chars[mt_rand(0, $charcount)];
+ }
+ return $word;
+ }
+
+ /**
+ * shape
+ */
+ function policy_shape($code)
+ {
+ global $config;
+ // Generate image
+ $img_x = 800;
+ $img_y = 250;
+ $img = imagecreate($img_x, $img_y);
+
+ // Generate colors
+ $background = imagecolorallocate($img, mt_rand(155, 255), mt_rand(155, 255), mt_rand(155, 255));
+ imagefill($img, 0, 0, $background);
+
+ $random = array();
+ $fontcolors = array();
+ for ($i = 0; $i < 15; $i++)
+ {
+ $random[$i] = imagecolorallocate($img, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
+ $fontcolors[$i] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120));
+ }
+
+ // Generate code characters
+ $characters = array();
+ $sizes = array();
+ $bounding_boxes = array();
+ $width_avail = $img_x;
+ $code_num = sizeof($code);
+
+ // Add some line noise
+ if ($config['policy_shape_noise_line'])
+ {
+ $this->noise_line($img, 0, 0, $img_x, $img_y, $background, $fontcolors, $random);
+ }
+
+ $real = mt_rand(0, 3);
+ $patterns = array('', '', '', '');
+ for ($i = 32; $i > 0; --$i)
+ {
+ $patterns[$i % 4] .= str_pad(dechex(mt_rand(0, 65535)), 4, '0', STR_PAD_LEFT);
+ }
+
+ $char_class = $this->captcha_char('char_ttf');
+ for ($i = 0; $i < 4; ++$i)
+ {
+ if ($i)
+ {
+ $y = 5 + ($i * 60);
+ imageline($img, 550, $y, 650, $y, $fontcolors[0]);
+ }
+ $this->draw_pattern($patterns[$i], $img, 525, 10 + ($i * 60), 575, ($i + 1) * 60, $fontcolors);
+ if ($i == $real)
+ {
+ $this->draw_pattern($patterns[$i], $img, 25, 25, 225, 225, $fontcolors, 3);
+ for ($j = 0; $j < $code_num; ++$j)
+ {
+ $character = new $char_class($code[$j]);
+ $character->drawchar(25, 600 + ($j * 25), 35 + ($i * 60), $img, $background, $fontcolors);
+ }
+ }
+ else
+ {
+ $word = $this->get_char_string();
+ for ($j = strlen($word) - 1; $j >= 0; --$j)
+ {
+ $character = new $char_class(substr($word, $j, 1));
+ $character->drawchar(25, 600 + ($j * 25), 35 + ($i * 60), $img, $background, $fontcolors);
+ }
+ }
+ }
+
+ global $user;
+ imagestring($img, 6, 250, 50, $user->lang['CAPTCHA_LINE_1'], $fontcolors[0]);
+ imagestring($img, 6, 250, 100, $user->lang['CAPTCHA_LINE_2'], $fontcolors[0]);
+ imagestring($img, 6, 250, 150, $user->lang['CAPTCHA_LINE_3'], $fontcolors[0]);
+ imagestring($img, 6, 250, 200, $user->lang['CAPTCHA_LINE_4'], $fontcolors[0]);
+
+
+ // Add some pixel noise
+ if ($config['policy_shape_noise_pixel'])
+ {
+ $this->noise_pixel($img, 0, 0, $img_x, $img_y, $background, $fontcolors, $random, $config['policy_shape_noise_pixel']);
+ }
+
+ // Send image
+ $this->send_image($img);
+ }
+
+ /**
* entropy
*/
function policy_entropy($code)
@@ -126,7 +330,7 @@ class captcha
// Draw the text
$xoffset = 0;
- for ($i = 0, $char_num = sizeof($characters); $i < $char_num; ++$i)
+ for ($i = 0; $i < $code_num; ++$i)
{
$dimm = $bounding_boxes[$i];
$xoffset += ($offset[$i] - $dimm[0]);
@@ -392,8 +596,9 @@ class captcha
// Get the character rendering scheme
$char_class = $this->captcha_char('char_ttf');
+ $code_num = sizeof($code);
- for ($i = 0, $code_num = sizeof($code); $i < $code_num; ++$i)
+ for ($i = 0; $i < $code_num; ++$i)
{
$characters[$i] = new $char_class($code[$i], array('angle' => 0));
$box = $characters[$i]->dimensions($char_size);
@@ -417,7 +622,7 @@ class captcha
$yoffset = mt_rand($med, $max);
- for ($i = 0, $char_num = sizeof($characters); $i < $char_num; ++$i)
+ for ($i = 0; $i < $code_num; ++$i)
{
$dimm = $bounding_boxes[$i];
$offset -= $dimm[0];
diff --git a/phpBB/includes/captcha/fonts/shark.ttf b/phpBB/includes/captcha/fonts/shark.ttf
deleted file mode 100644
index 42b3f78159..0000000000
--- a/phpBB/includes/captcha/fonts/shark.ttf
+++ /dev/null
Binary files differ
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 2696a2eb1e..c8d37ddf07 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -156,12 +156,7 @@ class ucp_register
if ($row = $db->sql_fetchrow($result))
{
- if (strcasecmp($row['code'], $confirm_code) == 0)
- {
- $error[] = $user->lang['CONFIRM_CODE_WRONG'];
- $wrong_confirm = true;
- }
- else
+ if (strcasecmp($row['code'], $confirm_code) === 0)
{
$sql = 'DELETE FROM ' . CONFIRM_TABLE . "
WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "'
@@ -169,6 +164,11 @@ class ucp_register
AND confirm_type = " . CONFIRM_REG;
$db->sql_query($sql);
}
+ else
+ {
+ $error[] = $user->lang['CONFIRM_CODE_WRONG'];
+ $wrong_confirm = true;
+ }
}
else
{
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 661b31c399..c994f97f95 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -16,7 +16,7 @@ CREATE TABLE phpbb_attachments (
comment BLOB SUB_TYPE TEXT,
extension VARCHAR(100),
mimetype VARCHAR(100),
- filesize INTEGER DEFAULT 0 NOT NULL,
+ filesize INTEGER NOT NULL,
filetime INTEGER DEFAULT 0 NOT NULL,
thumbnail INTEGER DEFAULT 0 NOT NULL
);;
@@ -80,9 +80,9 @@ END;;
# phpbb_auth_roles
CREATE TABLE phpbb_auth_roles (
role_id INTEGER NOT NULL,
- role_name VARCHAR(255) NOT NULL,
+ role_name VARCHAR(255) DEFAULT '' NOT NULL,
role_description BLOB SUB_TYPE TEXT,
- role_type VARCHAR(10) NOT NULL,
+ role_type VARCHAR(10) DEFAULT '' NOT NULL,
role_order INTEGER DEFAULT 0 NOT NULL
);;
@@ -129,8 +129,8 @@ CREATE INDEX phpbb_auth_users_user_id ON phpbb_auth_users(user_id);;
CREATE TABLE phpbb_banlist (
ban_id INTEGER NOT NULL,
ban_userid INTEGER DEFAULT 0 NOT NULL,
- ban_ip VARCHAR(40) NOT NULL,
- ban_email VARCHAR(100) NOT NULL,
+ ban_ip VARCHAR(40) DEFAULT '' NOT NULL,
+ ban_email VARCHAR(100) DEFAULT '' NOT NULL,
ban_start INTEGER DEFAULT 0 NOT NULL,
ban_end INTEGER DEFAULT 0 NOT NULL,
ban_exclude INTEGER DEFAULT 0 NOT NULL,
@@ -153,13 +153,13 @@ END;;
# phpbb_bbcodes
CREATE TABLE phpbb_bbcodes (
bbcode_id INTEGER DEFAULT 0 NOT NULL,
- bbcode_tag VARCHAR(16) NOT NULL,
+ bbcode_tag VARCHAR(16) DEFAULT '' NOT NULL,
display_on_posting INTEGER DEFAULT 0 NOT NULL,
- bbcode_match VARCHAR(255) NOT NULL,
+ bbcode_match VARCHAR(255) DEFAULT '' NOT NULL,
bbcode_tpl BLOB SUB_TYPE TEXT,
- first_pass_match VARCHAR(255) NOT NULL,
- first_pass_replace VARCHAR(255) NOT NULL,
- second_pass_match VARCHAR(255) NOT NULL,
+ first_pass_match VARCHAR(255) DEFAULT '' NOT NULL,
+ first_pass_replace VARCHAR(255) DEFAULT '' NOT NULL,
+ second_pass_match VARCHAR(255) DEFAULT '' NOT NULL,
second_pass_replace BLOB SUB_TYPE TEXT
);;
@@ -185,8 +185,8 @@ CREATE TABLE phpbb_bots (
bot_active INTEGER DEFAULT 1 NOT NULL,
bot_name BLOB SUB_TYPE TEXT,
user_id INTEGER DEFAULT 0 NOT NULL,
- bot_agent VARCHAR(255) NOT NULL,
- bot_ip VARCHAR(255) NOT NULL
+ bot_agent VARCHAR(255) DEFAULT '' NOT NULL,
+ bot_ip VARCHAR(255) DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_bots ADD PRIMARY KEY (bot_id);;
@@ -216,7 +216,7 @@ ALTER TABLE phpbb_cache ADD PRIMARY KEY (var_name);;
# phpbb_config
CREATE TABLE phpbb_config (
- config_name VARCHAR(200) NOT NULL,
+ config_name VARCHAR(252) NOT NULL,
config_value VARCHAR(255) NOT NULL,
is_dynamic INTEGER DEFAULT 0 NOT NULL
);;
@@ -228,10 +228,10 @@ CREATE INDEX phpbb_config_is_dynamic ON phpbb_config(is_dynamic);;
# phpbb_confirm
CREATE TABLE phpbb_confirm (
- confirm_id VARCHAR(32) NOT NULL,
- session_id VARCHAR(32) NOT NULL,
+ confirm_id CHAR(32) DEFAULT '' NOT NULL,
+ session_id CHAR(32) DEFAULT '' NOT NULL,
confirm_type INTEGER DEFAULT 0 NOT NULL,
- code VARCHAR(8) NOT NULL
+ code VARCHAR(8) DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);;
@@ -240,7 +240,7 @@ ALTER TABLE phpbb_confirm ADD PRIMARY KEY (session_id, confirm_id);;
# phpbb_disallow
CREATE TABLE phpbb_disallow (
disallow_id INTEGER NOT NULL,
- disallow_username VARCHAR(255) NOT NULL
+ disallow_username VARCHAR(255) DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_disallow ADD PRIMARY KEY (disallow_id);;
@@ -282,6 +282,26 @@ BEGIN
END;;
+# phpbb_extensions
+CREATE TABLE phpbb_extensions (
+ extension_id INTEGER NOT NULL,
+ group_id INTEGER DEFAULT 0 NOT NULL,
+ extension VARCHAR(100) DEFAULT '' NOT NULL
+);;
+
+ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);;
+
+CREATE GENERATOR phpbb_extensions_gen;;
+SET GENERATOR phpbb_extensions_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_extensions_gen FOR phpbb_extensions
+BEFORE INSERT
+AS
+BEGIN
+ NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1);
+END;;
+
+
# phpbb_extension_groups
CREATE TABLE phpbb_extension_groups (
group_id INTEGER NOT NULL,
@@ -289,7 +309,7 @@ CREATE TABLE phpbb_extension_groups (
cat_id INTEGER DEFAULT 0 NOT NULL,
allow_group INTEGER DEFAULT 0 NOT NULL,
download_mode INTEGER DEFAULT 1 NOT NULL,
- upload_icon VARCHAR(255) NOT NULL,
+ upload_icon VARCHAR(255) DEFAULT '' NOT NULL,
max_filesize INTEGER DEFAULT 0 NOT NULL,
allowed_forums BLOB SUB_TYPE TEXT,
allow_in_pm INTEGER DEFAULT 0 NOT NULL
@@ -308,45 +328,25 @@ BEGIN
END;;
-# phpbb_extensions
-CREATE TABLE phpbb_extensions (
- extension_id INTEGER NOT NULL,
- group_id INTEGER DEFAULT 0 NOT NULL,
- extension VARCHAR(100) NOT NULL
-);;
-
-ALTER TABLE phpbb_extensions ADD PRIMARY KEY (extension_id);;
-
-CREATE GENERATOR phpbb_extensions_gen;;
-SET GENERATOR phpbb_extensions_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_extensions_gen FOR phpbb_extensions
-BEFORE INSERT
-AS
-BEGIN
- NEW.extension_id = GEN_ID(phpbb_extensions_gen, 1);
-END;;
-
-
# phpbb_forums
CREATE TABLE phpbb_forums (
forum_id INTEGER NOT NULL,
- parent_id INTEGER DEFAULT 0 NOT NULL,
- left_id INTEGER DEFAULT 0 NOT NULL,
- right_id INTEGER DEFAULT 0 NOT NULL,
+ parent_id INTEGER NOT NULL,
+ left_id INTEGER NOT NULL,
+ right_id INTEGER NOT NULL,
forum_parents BLOB SUB_TYPE TEXT,
forum_name BLOB SUB_TYPE TEXT,
forum_desc BLOB SUB_TYPE TEXT,
forum_desc_bitfield INTEGER DEFAULT 0 NOT NULL,
- forum_desc_uid VARCHAR(5) NOT NULL,
- forum_link VARCHAR(255) NOT NULL,
- forum_password VARCHAR(40) 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 INTEGER,
- forum_image VARCHAR(255) NOT NULL,
+ forum_image VARCHAR(255) DEFAULT '' NOT NULL,
forum_rules BLOB SUB_TYPE TEXT,
- forum_rules_link VARCHAR(255) NOT NULL,
+ forum_rules_link VARCHAR(255) DEFAULT '' NOT NULL,
forum_rules_bitfield INTEGER DEFAULT 0 NOT NULL,
- forum_rules_uid VARCHAR(5) NOT NULL,
+ forum_rules_uid VARCHAR(5) DEFAULT '' NOT NULL,
forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
forum_type INTEGER DEFAULT 0 NOT NULL,
forum_status INTEGER DEFAULT 0 NOT NULL,
@@ -363,8 +363,8 @@ CREATE TABLE phpbb_forums (
enable_icons INTEGER DEFAULT 1 NOT NULL,
enable_prune INTEGER DEFAULT 0 NOT NULL,
prune_next INTEGER,
- prune_days INTEGER DEFAULT 0 NOT NULL,
- prune_viewed INTEGER DEFAULT 0 NOT NULL,
+ prune_days INTEGER NOT NULL,
+ prune_viewed INTEGER NOT NULL,
prune_freq INTEGER DEFAULT 0 NOT NULL
);;
@@ -388,7 +388,7 @@ END;;
CREATE TABLE phpbb_forum_access (
forum_id INTEGER DEFAULT 0 NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
- session_id VARCHAR(32) NOT NULL
+ session_id VARCHAR(32) DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_forum_access ADD PRIMARY KEY (forum_id, user_id, session_id);;
@@ -420,17 +420,17 @@ CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch(user_id);;
CREATE TABLE phpbb_groups (
group_id INTEGER NOT NULL,
group_type INTEGER DEFAULT 1 NOT NULL,
- group_name VARCHAR(255) NOT NULL,
+ group_name VARCHAR(255) DEFAULT '' NOT NULL,
group_desc BLOB SUB_TYPE TEXT,
group_desc_bitfield INTEGER DEFAULT 0 NOT NULL,
- group_desc_uid VARCHAR(5) NOT NULL,
+ group_desc_uid VARCHAR(5) DEFAULT '' NOT NULL,
group_display INTEGER DEFAULT 0 NOT NULL,
- group_avatar VARCHAR(255) NOT NULL,
+ group_avatar VARCHAR(255) DEFAULT '' NOT NULL,
group_avatar_type INTEGER DEFAULT 0 NOT NULL,
group_avatar_width INTEGER DEFAULT 0 NOT NULL,
group_avatar_height INTEGER DEFAULT 0 NOT NULL,
group_rank INTEGER DEFAULT -1 NOT NULL,
- group_colour VARCHAR(6) NOT NULL,
+ group_colour VARCHAR(6) DEFAULT '' NOT NULL,
group_sig_chars INTEGER DEFAULT 0 NOT NULL,
group_receive_pm INTEGER DEFAULT 0 NOT NULL,
group_message_limit INTEGER DEFAULT 0 NOT NULL,
@@ -457,9 +457,9 @@ END;;
CREATE TABLE phpbb_icons (
icons_id INTEGER NOT NULL,
icons_url VARCHAR(255),
- icons_width INTEGER DEFAULT 0 NOT NULL,
- icons_height INTEGER DEFAULT 0 NOT NULL,
- icons_order INTEGER DEFAULT 0 NOT NULL,
+ icons_width INTEGER NOT NULL,
+ icons_height INTEGER NOT NULL,
+ icons_order INTEGER NOT NULL,
display_on_posting INTEGER DEFAULT 1 NOT NULL
);;
@@ -508,7 +508,7 @@ CREATE TABLE phpbb_log (
topic_id INTEGER DEFAULT 0 NOT NULL,
reportee_id INTEGER DEFAULT 0 NOT NULL,
log_ip VARCHAR(40) NOT NULL,
- log_time INTEGER DEFAULT 0 NOT NULL,
+ log_time INTEGER NOT NULL,
log_operation BLOB SUB_TYPE TEXT,
log_data BLOB SUB_TYPE TEXT
);;
@@ -534,11 +534,11 @@ END;;
# phpbb_moderator_cache
CREATE TABLE phpbb_moderator_cache (
- forum_id INTEGER DEFAULT 0 NOT NULL,
+ forum_id INTEGER NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
- username VARCHAR(255) NOT NULL,
+ username VARCHAR(255) DEFAULT '' NOT NULL,
group_id INTEGER DEFAULT 0 NOT NULL,
- group_name VARCHAR(255) NOT NULL,
+ group_name VARCHAR(255) DEFAULT '' NOT NULL,
display_on_index INTEGER DEFAULT 1 NOT NULL
);;
@@ -551,14 +551,14 @@ CREATE TABLE phpbb_modules (
module_id INTEGER NOT NULL,
module_enabled INTEGER DEFAULT 1 NOT NULL,
module_display INTEGER DEFAULT 1 NOT NULL,
- "module_name" VARCHAR(255) NOT NULL,
- module_class VARCHAR(10) NOT NULL,
- parent_id INTEGER NOT NULL,
- left_id INTEGER NOT NULL,
- right_id INTEGER NOT NULL,
- module_langname VARCHAR(255) NOT NULL,
- module_mode VARCHAR(255) NOT NULL,
- module_auth VARCHAR(255) NOT NULL
+ "module_name" VARCHAR(255) DEFAULT '' NOT NULL,
+ module_class VARCHAR(10) DEFAULT '' NOT NULL,
+ parent_id INTEGER DEFAULT 0 NOT NULL,
+ left_id INTEGER DEFAULT 0 NOT NULL,
+ right_id INTEGER 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
);;
ALTER TABLE phpbb_modules ADD PRIMARY KEY (module_id);;
@@ -580,7 +580,7 @@ END;;
# phpbb_poll_results
CREATE TABLE phpbb_poll_results (
poll_option_id INTEGER DEFAULT 0 NOT NULL,
- topic_id INTEGER DEFAULT 0 NOT NULL,
+ topic_id INTEGER NOT NULL,
poll_option_text BLOB SUB_TYPE TEXT,
poll_option_total INTEGER DEFAULT 0 NOT NULL
);;
@@ -623,7 +623,7 @@ CREATE TABLE phpbb_posts (
post_encoding VARCHAR(20) DEFAULT 'iso-8859-1' NOT NULL,
post_attachment INTEGER DEFAULT 0 NOT NULL,
bbcode_bitfield INTEGER DEFAULT 0 NOT NULL,
- bbcode_uid VARCHAR(5) NOT NULL,
+ bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL,
post_edit_time INTEGER DEFAULT 0,
post_edit_reason BLOB SUB_TYPE TEXT,
post_edit_user INTEGER DEFAULT 0,
@@ -657,7 +657,7 @@ CREATE TABLE phpbb_privmsgs (
root_level INTEGER DEFAULT 0 NOT NULL,
author_id INTEGER DEFAULT 0 NOT NULL,
icon_id INTEGER DEFAULT 0 NOT NULL,
- author_ip VARCHAR(40) NOT NULL,
+ author_ip VARCHAR(40) DEFAULT '' NOT NULL,
message_time INTEGER DEFAULT 0 NOT NULL,
enable_bbcode INTEGER DEFAULT 1 NOT NULL,
enable_smilies INTEGER DEFAULT 1 NOT NULL,
@@ -670,7 +670,7 @@ CREATE TABLE phpbb_privmsgs (
message_encoding VARCHAR(20) DEFAULT 'iso-8859-1' NOT NULL,
message_attachment INTEGER DEFAULT 0 NOT NULL,
bbcode_bitfield INTEGER DEFAULT 0 NOT NULL,
- bbcode_uid VARCHAR(5) NOT NULL,
+ bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL,
message_edit_time INTEGER DEFAULT 0,
message_edit_count INTEGER DEFAULT 0,
to_address BLOB SUB_TYPE TEXT NOT NULL,
@@ -699,7 +699,7 @@ END;;
CREATE TABLE phpbb_privmsgs_folder (
folder_id INTEGER NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
- folder_name VARCHAR(255) NOT NULL,
+ folder_name VARCHAR(255) DEFAULT '' NOT NULL,
pm_count INTEGER DEFAULT 0 NOT NULL
);;
@@ -724,7 +724,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) NOT NULL,
+ rule_string VARCHAR(255) 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,
@@ -767,14 +767,14 @@ CREATE TABLE phpbb_profile_fields (
field_id INTEGER NOT NULL,
field_name VARCHAR(255) NOT NULL,
field_desc BLOB SUB_TYPE TEXT,
- field_type INTEGER DEFAULT 0 NOT NULL,
- field_ident VARCHAR(20) NOT NULL,
- field_length VARCHAR(20) NOT NULL,
- field_minlen VARCHAR(255) NOT NULL,
- field_maxlen VARCHAR(255) NOT NULL,
- field_novalue VARCHAR(255) NOT NULL,
+ field_type INTEGER 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 '0' NOT NULL,
- field_validation VARCHAR(20) NOT NULL,
+ field_validation VARCHAR(20) 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,
@@ -813,7 +813,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,
- "value" VARCHAR(255) NOT NULL
+ "value" VARCHAR(255) DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_profile_fields_lang ADD PRIMARY KEY (field_id, lang_id, option_id);;
@@ -823,9 +823,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) NOT NULL,
+ lang_name VARCHAR(255) DEFAULT '' NOT NULL,
lang_explain BLOB SUB_TYPE TEXT,
- lang_default_value VARCHAR(255) NOT NULL
+ lang_default_value VARCHAR(255) DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_profile_lang ADD PRIMARY KEY (field_id, lang_id);;
@@ -881,7 +881,7 @@ END;;
# phpbb_reports_reasons
CREATE TABLE phpbb_reports_reasons (
reason_id INTEGER NOT NULL,
- reason_title VARCHAR(255) NOT NULL,
+ reason_title VARCHAR(255) DEFAULT '' NOT NULL,
reason_description BLOB SUB_TYPE TEXT,
reason_order INTEGER DEFAULT 0 NOT NULL
);;
@@ -901,7 +901,7 @@ END;;
# phpbb_search_results
CREATE TABLE phpbb_search_results (
- search_key VARCHAR(32) NOT NULL,
+ search_key VARCHAR(32) DEFAULT '' NOT NULL,
search_time INTEGER DEFAULT 0 NOT NULL,
search_keywords BLOB SUB_TYPE TEXT,
search_authors BLOB SUB_TYPE TEXT
@@ -912,7 +912,7 @@ ALTER TABLE phpbb_search_results ADD PRIMARY KEY (search_key);;
# phpbb_search_wordlist
CREATE TABLE phpbb_search_wordlist (
- word_text VARCHAR(50) NOT NULL,
+ word_text VARCHAR(50) DEFAULT '' NOT NULL,
word_id INTEGER NOT NULL,
word_common INTEGER DEFAULT 0 NOT NULL
);;
@@ -943,14 +943,14 @@ CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);;
# phpbb_sessions
CREATE TABLE phpbb_sessions (
- session_id VARCHAR(32) NOT NULL,
+ session_id VARCHAR(32) DEFAULT '' NOT NULL,
session_user_id INTEGER DEFAULT 0 NOT NULL,
session_last_visit INTEGER DEFAULT 0 NOT NULL,
session_start INTEGER DEFAULT 0 NOT NULL,
session_time INTEGER DEFAULT 0 NOT NULL,
session_ip VARCHAR(40) DEFAULT '0' NOT NULL,
- session_browser VARCHAR(150),
- session_page VARCHAR(200) NOT NULL,
+ session_browser VARCHAR(150) DEFAULT '' NOT NULL,
+ session_page VARCHAR(200) DEFAULT '' NOT NULL,
session_viewonline INTEGER DEFAULT 1 NOT NULL,
session_autologin INTEGER DEFAULT 0 NOT NULL,
session_admin INTEGER DEFAULT 0 NOT NULL
@@ -964,7 +964,7 @@ CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions(session_user_id);;
# phpbb_sessions_keys
CREATE TABLE phpbb_sessions_keys (
- key_id VARCHAR(32) NOT NULL,
+ key_id VARCHAR(32) DEFAULT '' NOT NULL,
user_id INTEGER DEFAULT 0 NOT NULL,
last_ip VARCHAR(40) DEFAULT '0' NOT NULL,
last_login INTEGER DEFAULT 0 NOT NULL
@@ -978,8 +978,8 @@ CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys(last_login);;
# phpbb_sitelist
CREATE TABLE phpbb_sitelist (
site_id INTEGER NOT NULL,
- site_ip VARCHAR(40) NOT NULL,
- site_hostname VARCHAR(255) NOT NULL,
+ site_ip VARCHAR(40) DEFAULT '' NOT NULL,
+ site_hostname VARCHAR(255) DEFAULT '' NOT NULL,
ip_exclude INTEGER DEFAULT 0 NOT NULL
);;
@@ -1002,9 +1002,9 @@ CREATE TABLE phpbb_smilies (
code VARCHAR(50),
emotion VARCHAR(50),
smiley_url VARCHAR(50),
- smiley_width INTEGER DEFAULT 0 NOT NULL,
- smiley_height INTEGER DEFAULT 0 NOT NULL,
- smiley_order INTEGER DEFAULT 0 NOT NULL,
+ smiley_width INTEGER NOT NULL,
+ smiley_height INTEGER NOT NULL,
+ smiley_order INTEGER NOT NULL,
display_on_posting INTEGER DEFAULT 1 NOT NULL
);;
@@ -1024,132 +1024,14 @@ END;;
# phpbb_styles
CREATE TABLE phpbb_styles (
style_id INTEGER NOT NULL,
- style_name VARCHAR(252) NOT NULL,
- style_copyright VARCHAR(255) NOT NULL,
+ style_name VARCHAR(252) DEFAULT '' NOT NULL,
+ style_copyright VARCHAR(255) DEFAULT '' NOT NULL,
style_active INTEGER DEFAULT 1 NOT NULL,
- template_id INTEGER DEFAULT 0 NOT NULL,
- theme_id INTEGER DEFAULT 0 NOT NULL,
- imageset_id INTEGER DEFAULT 0 NOT NULL
-);;
-
-ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
-
-CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
-CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);;
-CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
-CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
-
-CREATE GENERATOR phpbb_styles_gen;;
-SET GENERATOR phpbb_styles_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_gen FOR phpbb_styles
-BEFORE INSERT
-AS
-BEGIN
- NEW.style_id = GEN_ID(phpbb_styles_gen, 1);
-END;;
-
-
-# phpbb_styles_imageset
-CREATE TABLE phpbb_styles_imageset (
- imageset_id INTEGER NOT NULL,
- imageset_name VARCHAR(252) NOT NULL,
- imageset_copyright VARCHAR(255) NOT NULL,
- imageset_path VARCHAR(100) NOT NULL,
- site_logo VARCHAR(200) NOT NULL,
- btn_post VARCHAR(200) NOT NULL,
- btn_post_pm VARCHAR(200) NOT NULL,
- btn_reply VARCHAR(200) NOT NULL,
- btn_reply_pm VARCHAR(200) NOT NULL,
- btn_locked VARCHAR(200) NOT NULL,
- btn_profile VARCHAR(200) NOT NULL,
- btn_pm VARCHAR(200) NOT NULL,
- btn_delete VARCHAR(200) NOT NULL,
- btn_info VARCHAR(200) NOT NULL,
- btn_quote VARCHAR(200) NOT NULL,
- btn_search VARCHAR(200) NOT NULL,
- btn_edit VARCHAR(200) NOT NULL,
- btn_report VARCHAR(200) NOT NULL,
- btn_email VARCHAR(200) NOT NULL,
- btn_www VARCHAR(200) NOT NULL,
- btn_icq VARCHAR(200) NOT NULL,
- btn_aim VARCHAR(200) NOT NULL,
- btn_yim VARCHAR(200) NOT NULL,
- btn_msnm VARCHAR(200) NOT NULL,
- btn_jabber VARCHAR(200) NOT NULL,
- btn_online VARCHAR(200) NOT NULL,
- btn_offline VARCHAR(200) NOT NULL,
- btn_friend VARCHAR(200) NOT NULL,
- btn_foe VARCHAR(200) NOT NULL,
- icon_unapproved VARCHAR(200) NOT NULL,
- icon_reported VARCHAR(200) NOT NULL,
- icon_attach VARCHAR(200) NOT NULL,
- icon_post VARCHAR(200) NOT NULL,
- icon_post_new VARCHAR(200) NOT NULL,
- icon_post_latest VARCHAR(200) NOT NULL,
- icon_post_newest VARCHAR(200) NOT NULL,
- forum VARCHAR(200) NOT NULL,
- forum_new VARCHAR(200) NOT NULL,
- forum_locked VARCHAR(200) NOT NULL,
- forum_link VARCHAR(200) NOT NULL,
- sub_forum VARCHAR(200) NOT NULL,
- sub_forum_new VARCHAR(200) NOT NULL,
- folder VARCHAR(200) NOT NULL,
- folder_moved VARCHAR(200) NOT NULL,
- folder_posted VARCHAR(200) NOT NULL,
- folder_new VARCHAR(200) NOT NULL,
- folder_new_posted VARCHAR(200) NOT NULL,
- folder_hot VARCHAR(200) NOT NULL,
- folder_hot_posted VARCHAR(200) NOT NULL,
- folder_hot_new VARCHAR(200) NOT NULL,
- folder_hot_new_posted VARCHAR(200) NOT NULL,
- folder_locked VARCHAR(200) NOT NULL,
- folder_locked_posted VARCHAR(200) NOT NULL,
- folder_locked_new VARCHAR(200) NOT NULL,
- folder_locked_new_posted VARCHAR(200) NOT NULL,
- folder_sticky VARCHAR(200) NOT NULL,
- folder_sticky_posted VARCHAR(200) NOT NULL,
- folder_sticky_new VARCHAR(200) NOT NULL,
- folder_sticky_new_posted VARCHAR(200) NOT NULL,
- folder_announce VARCHAR(200) NOT NULL,
- folder_announce_posted VARCHAR(200) NOT NULL,
- folder_announce_new VARCHAR(200) NOT NULL,
- folder_announce_new_posted VARCHAR(200) NOT NULL,
- folder_global VARCHAR(200) NOT NULL,
- folder_global_posted VARCHAR(200) NOT NULL,
- folder_global_new VARCHAR(200) NOT NULL,
- folder_global_new_posted VARCHAR(200) NOT NULL,
- poll_left VARCHAR(200) NOT NULL,
- poll_center VARCHAR(200) NOT NULL,
- poll_right VARCHAR(200) NOT NULL,
- attach_progress_bar VARCHAR(200) NOT NULL,
- user_icon1 VARCHAR(200) NOT NULL,
- user_icon2 VARCHAR(200) NOT NULL,
- user_icon3 VARCHAR(200) NOT NULL,
- user_icon4 VARCHAR(200) NOT NULL,
- user_icon5 VARCHAR(200) NOT NULL,
- user_icon6 VARCHAR(200) NOT NULL,
- user_icon7 VARCHAR(200) NOT NULL,
- user_icon8 VARCHAR(200) NOT NULL,
- user_icon9 VARCHAR(200) NOT NULL,
- user_icon10 VARCHAR(200) NOT NULL
+ template_id INTEGER NOT NULL,
+ theme_id INTEGER NOT NULL,
+ imageset_id INTEGER NOT NULL
);;
-ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);;
-
-CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);;
-
-CREATE GENERATOR phpbb_styles_imageset_gen;;
-SET GENERATOR phpbb_styles_imageset_gen TO 0;;
-
-CREATE TRIGGER t_phpbb_styles_imageset_gen FOR phpbb_styles_imageset
-BEFORE INSERT
-AS
-BEGIN
- NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1);
-END;;
-
-
# phpbb_styles_template
CREATE TABLE phpbb_styles_template (
template_id INTEGER NOT NULL,
@@ -1167,8 +1049,8 @@ CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(tem
# phpbb_styles_template_data
CREATE TABLE phpbb_styles_template_data (
- template_id INTEGER DEFAULT 0 NOT NULL,
- template_filename VARCHAR(100) NOT NULL,
+ template_id INTEGER NOT NULL,
+ template_filename VARCHAR(100) DEFAULT '' NOT NULL,
template_included BLOB SUB_TYPE TEXT,
template_mtime INTEGER DEFAULT 0 NOT NULL,
template_data BLOB SUB_TYPE TEXT
@@ -1191,9 +1073,9 @@ END;;
# phpbb_styles_theme
CREATE TABLE phpbb_styles_theme (
theme_id INTEGER NOT NULL,
- theme_name VARCHAR(252) NOT NULL,
- theme_copyright VARCHAR(255) NOT NULL,
- theme_path VARCHAR(100) NOT NULL,
+ theme_name VARCHAR(252) DEFAULT '' NOT NULL,
+ theme_copyright VARCHAR(255) DEFAULT '' NOT NULL,
+ theme_path VARCHAR(100) DEFAULT '' NOT NULL,
theme_storedb INTEGER DEFAULT 0 NOT NULL,
theme_mtime INTEGER DEFAULT 0 NOT NULL,
theme_data BLOB SUB_TYPE TEXT
@@ -1213,6 +1095,122 @@ BEGIN
NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1);
END;;
+ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);;
+CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles(imageset_id);;
+CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);;
+CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);;
+
+CREATE GENERATOR phpbb_styles_gen;;
+SET GENERATOR phpbb_styles_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles_gen FOR phpbb_styles
+BEFORE INSERT
+AS
+BEGIN
+ NEW.style_id = GEN_ID(phpbb_styles_gen, 1);
+END;;
+
+
+# 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_path VARCHAR(100) DEFAULT '' NOT NULL,
+ site_logo VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_post VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_post_pm VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_reply VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_reply_pm VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_locked VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_profile VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_pm VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_delete VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_info VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_quote VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_search VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_edit VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_report VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_email VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_www VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_icq VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_aim VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_yim VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_msnm VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_jabber VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_online VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_offline VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_friend VARCHAR(200) DEFAULT '' NOT NULL,
+ btn_foe VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_unapproved VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_reported VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_attach VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_post VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_post_new VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_post_latest VARCHAR(200) DEFAULT '' NOT NULL,
+ icon_post_newest VARCHAR(200) DEFAULT '' NOT NULL,
+ forum VARCHAR(200) DEFAULT '' NOT NULL,
+ forum_new VARCHAR(200) DEFAULT '' NOT NULL,
+ forum_locked VARCHAR(200) DEFAULT '' NOT NULL,
+ forum_link VARCHAR(200) DEFAULT '' NOT NULL,
+ sub_forum VARCHAR(200) DEFAULT '' NOT NULL,
+ sub_forum_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_moved VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_new_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_hot VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_hot_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_hot_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_hot_new_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_locked VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_locked_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_locked_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_locked_new_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_sticky VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_sticky_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_sticky_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_sticky_new_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_announce VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_announce_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_announce_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_announce_new_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_global VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_global_posted VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_global_new VARCHAR(200) DEFAULT '' NOT NULL,
+ folder_global_new_posted 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,
+ attach_progress_bar 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
+);;
+
+ALTER TABLE phpbb_styles_imageset ADD PRIMARY KEY (imageset_id);;
+
+CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset(imageset_name);;
+
+CREATE GENERATOR phpbb_styles_imageset_gen;;
+SET GENERATOR phpbb_styles_imageset_gen TO 0;;
+
+CREATE TRIGGER t_phpbb_styles_imageset_gen FOR phpbb_styles_imageset
+BEFORE INSERT
+AS
+BEGIN
+ NEW.imageset_id = GEN_ID(phpbb_styles_imageset_gen, 1);
+END;;
# phpbb_topics
CREATE TABLE phpbb_topics (
@@ -1320,13 +1318,13 @@ CREATE TABLE phpbb_users (
user_type INTEGER DEFAULT 0 NOT NULL,
group_id INTEGER DEFAULT 3 NOT NULL,
user_permissions BLOB SUB_TYPE TEXT,
- user_perm_from INTEGER DEFAULT 0,
- user_ip VARCHAR(40) NOT NULL,
+ 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) NOT NULL,
- user_password VARCHAR(40) NOT NULL,
+ username VARCHAR(252) DEFAULT '' NOT NULL,
+ user_password VARCHAR(40) DEFAULT '' NOT NULL,
user_passchg INTEGER DEFAULT 0,
- user_email VARCHAR(100) NOT NULL,
+ user_email VARCHAR(100) DEFAULT '' NOT NULL,
user_email_hash DOUBLE PRECISION DEFAULT 0 NOT NULL,
user_birthday VARCHAR(10) DEFAULT '',
user_lastvisit INTEGER DEFAULT 0 NOT NULL,
@@ -1338,7 +1336,7 @@ CREATE TABLE phpbb_users (
user_last_warning INTEGER DEFAULT 0,
user_login_attempts INTEGER DEFAULT 0,
user_posts INTEGER DEFAULT 0 NOT NULL,
- user_lang VARCHAR(30) NOT NULL,
+ 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,
@@ -1355,8 +1353,8 @@ CREATE TABLE phpbb_users (
user_topic_sortby_type VARCHAR(1) DEFAULT 't' NOT NULL,
user_topic_sortby_dir VARCHAR(1) DEFAULT 'd' NOT NULL,
user_post_show_days INTEGER DEFAULT 0 NOT NULL,
- user_post_sortby_type VARCHAR(2) DEFAULT 't' NOT NULL,
- user_post_sortby_dir VARCHAR(2) DEFAULT 'a' NOT NULL,
+ user_post_sortby_type VARCHAR(1) DEFAULT 't' NOT NULL,
+ user_post_sortby_dir VARCHAR(1) DEFAULT 'a' NOT NULL,
user_notify INTEGER DEFAULT 0 NOT NULL,
user_notify_pm INTEGER DEFAULT 1 NOT NULL,
user_notify_type INTEGER DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index 4605a0590a..c9f575579d 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -43,7 +43,6 @@ ALTER TABLE [phpbb_attachments] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_attach_in_message] DEFAULT (0) FOR [in_message],
CONSTRAINT [DF_phpbb_attach_poster_id] DEFAULT (0) FOR [poster_id],
CONSTRAINT [DF_phpbb_attach_download_count] DEFAULT (0) FOR [download_count],
- CONSTRAINT [DF_phpbb_attach_filesize] DEFAULT (0) FOR [filesize],
CONSTRAINT [DF_phpbb_attach_filetime] DEFAULT (0) FOR [filetime],
CONSTRAINT [DF_phpbb_attach_thumbnail] DEFAULT (0) FOR [thumbnail]
GO
@@ -143,7 +142,9 @@ ALTER TABLE [phpbb_auth_roles] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_auth_roles] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_auth_p_role_role_order] DEFAULT(0) FOR [role_order]
+ CONSTRAINT [DF_phpbb_auth_p_role_role_order] DEFAULT (0) FOR [role_order],
+ CONSTRAINT [DF_phpbb_auth_p_role_role_type] DEFAULT ('') FOR [role_type],
+ CONSTRAINT [DF_phpbb_auth_p_role_role_name] DEFAULT ('') FOR [role_name]
GO
CREATE INDEX [role_type] ON [phpbb_auth_roles]([role_type]) ON [PRIMARY]
@@ -232,7 +233,9 @@ ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_banlis_ban_userid] DEFAULT (0) FOR [ban_userid],
CONSTRAINT [DF_phpbb_banlis_ban_start] DEFAULT (0) FOR [ban_start],
CONSTRAINT [DF_phpbb_banlis_ban_end] DEFAULT (0) FOR [ban_end],
- CONSTRAINT [DF_phpbb_banlis_ban_exclude] DEFAULT (0) FOR [ban_exclude]
+ CONSTRAINT [DF_phpbb_banlis_ban_exclude] DEFAULT (0) FOR [ban_exclude],
+ CONSTRAINT [DF_phpbb_banlis_ban_ip] DEFAULT ('') FOR [ban_ip],
+ CONSTRAINT [DF_phpbb_banlis_ban_email] DEFAULT ('') FOR [ban_email]
GO
@@ -261,7 +264,12 @@ GO
ALTER TABLE [phpbb_bbcodes] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_bbcode_bbcode_id] DEFAULT (0) FOR [bbcode_id],
- CONSTRAINT [DF_phpbb_bbcode_display_on_posting] DEFAULT (0) FOR [display_on_posting]
+ CONSTRAINT [DF_phpbb_bbcode_bbcode_tag] DEFAULT ('') FOR [bbcode_tag],
+ CONSTRAINT [DF_phpbb_bbcode_bbcode_match] DEFAULT ('') FOR [bbcode_match],
+ CONSTRAINT [DF_phpbb_bbcode_display_on_posting] DEFAULT (0) FOR [display_on_posting],
+ CONSTRAINT [DF_phpbb_bbcode_first_pass_match] DEFAULT ('') FOR [first_pass_match],
+ CONSTRAINT [DF_phpbb_bbcode_first_pass_replace] DEFAULT ('') FOR [first_pass_replace],
+ CONSTRAINT [DF_phpbb_bbcode_second_pass_match] DEFAULT ('') FOR [second_pass_match]
GO
CREATE INDEX [display_on_posting] ON [phpbb_bbcodes]([display_on_posting]) ON [PRIMARY]
@@ -313,7 +321,8 @@ GO
ALTER TABLE [phpbb_bots] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_bots___bot_active] DEFAULT (1) FOR [bot_active],
- CONSTRAINT [DF_phpbb_bots___user_id] DEFAULT (0) FOR [user_id]
+ CONSTRAINT [DF_phpbb_bots___user_id] DEFAULT (0) FOR [user_id],
+ CONSTRAINT [DF_phpbb_bots___bot_ip] DEFAULT ('') FOR [bot_ip]
GO
CREATE INDEX [bot_active] ON [phpbb_bots]([bot_active]) ON [PRIMARY]
@@ -338,7 +347,8 @@ ALTER TABLE [phpbb_cache] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_cache] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_cache__var_expires] DEFAULT (0) FOR [var_expires]
+ CONSTRAINT [DF_phpbb_cache__var_expires] DEFAULT (0) FOR [var_expires],
+ CONSTRAINT [DF_phpbb_cache__var_name] DEFAULT ('') FOR [var_name]
GO
@@ -371,8 +381,8 @@ GO
Table: phpbb_confirm
*/
CREATE TABLE [phpbb_confirm] (
- [confirm_id] [varchar] (32) NOT NULL ,
- [session_id] [varchar] (32) NOT NULL ,
+ [confirm_id] [char] (32) NOT NULL ,
+ [session_id] [char] (32) NOT NULL ,
[confirm_type] [int] NOT NULL ,
[code] [varchar] (8) NOT NULL
) ON [PRIMARY]
@@ -387,7 +397,10 @@ ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_confirm_confirm_type] DEFAULT (0) FOR [confirm_type]
+ CONSTRAINT [DF_phpbb_confirm_confirm_type] DEFAULT (0) FOR [confirm_type],
+ CONSTRAINT [DF_phpbb_confirm_confirm_id] DEFAULT ('') FOR [confirm_id],
+ CONSTRAINT [DF_phpbb_confirm_session_id] DEFAULT ('') FOR [session_id],
+ CONSTRAINT [DF_phpbb_confirm_code] DEFAULT ('') FOR [code]
GO
@@ -407,6 +420,10 @@ ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
) ON [PRIMARY]
GO
+ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_disallow_disallow_username] DEFAULT ('') FOR [disallow_username]
+GO
+
/*
Table: phpbb_drafts
@@ -441,6 +458,30 @@ GO
/*
+ Table: phpbb_extensions
+*/
+CREATE TABLE [phpbb_extensions] (
+ [extension_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [group_id] [int] NOT NULL ,
+ [extension] [varchar] (100) NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
+ (
+ [extension_id]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_extens_group_id] DEFAULT (0) FOR [group_id],
+ CONSTRAINT [DF_phpbb_extens_extension] DEFAULT (0) FOR [extension]
+GO
+
+
+
+/*
Table: phpbb_extension_groups
*/
CREATE TABLE [phpbb_extension_groups] (
@@ -468,29 +509,8 @@ ALTER TABLE [phpbb_extension_groups] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_extens_allow_group] DEFAULT (0) FOR [allow_group],
CONSTRAINT [DF_phpbb_extens_download_mode] DEFAULT (1) FOR [download_mode],
CONSTRAINT [DF_phpbb_extens_max_filesize] DEFAULT (0) FOR [max_filesize],
- CONSTRAINT [DF_phpbb_extens_allow_in_pm] DEFAULT (0) FOR [allow_in_pm]
-GO
-
-
-/*
- Table: phpbb_extensions
-*/
-CREATE TABLE [phpbb_extensions] (
- [extension_id] [int] IDENTITY (1, 1) NOT NULL ,
- [group_id] [int] NOT NULL ,
- [extension] [varchar] (100) NOT NULL
-) ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_extensions] PRIMARY KEY CLUSTERED
- (
- [extension_id]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_extensions] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_extens_group_id] DEFAULT (0) FOR [group_id]
+ CONSTRAINT [DF_phpbb_extens_allow_in_pm] DEFAULT (0) FOR [allow_in_pm],
+ CONSTRAINT [DF_phpbb_extens_upload_icon] DEFAULT ('') FOR [upload_icon]
GO
@@ -545,9 +565,6 @@ ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_forums_parent_id] DEFAULT (0) FOR [parent_id],
- CONSTRAINT [DF_phpbb_forums_left_id] DEFAULT (0) FOR [left_id],
- CONSTRAINT [DF_phpbb_forums_right_id] DEFAULT (0) FOR [right_id],
CONSTRAINT [DF_phpbb_forums_desc_bitfield] DEFAULT (0) FOR [forum_desc_bitfield],
CONSTRAINT [DF_phpbb_forums_rules_bitfield] DEFAULT (0) FOR [forum_rules_bitfield],
CONSTRAINT [DF_phpbb_forums_topics_per_page] DEFAULT (0) FOR [forum_topics_per_page],
@@ -564,9 +581,13 @@ ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_forums_enable_indexing] DEFAULT (1) FOR [enable_indexing],
CONSTRAINT [DF_phpbb_forums_enable_icons] DEFAULT (1) FOR [enable_icons],
CONSTRAINT [DF_phpbb_forums_enable_prune] DEFAULT (0) FOR [enable_prune],
- CONSTRAINT [DF_phpbb_forums_prune_days] DEFAULT (0) FOR [prune_days],
- CONSTRAINT [DF_phpbb_forums_prune_viewed] DEFAULT (0) FOR [prune_viewed],
- CONSTRAINT [DF_phpbb_forums_prune_freq] DEFAULT (0) FOR [prune_freq]
+ CONSTRAINT [DF_phpbb_forums_prune_freq] DEFAULT (0) FOR [prune_freq],
+ CONSTRAINT [DF_phpbb_forums_forum_desc_uid] DEFAULT ('') FOR [forum_desc_uid],
+ CONSTRAINT [DF_phpbb_forums_forum_link] DEFAULT ('') FOR [forum_link],
+ CONSTRAINT [DF_phpbb_forums_forum_password] DEFAULT ('') FOR [forum_password],
+ CONSTRAINT [DF_phpbb_forums_forum_image] DEFAULT ('') FOR [forum_image],
+ CONSTRAINT [DF_phpbb_forums_forum_rules_link] DEFAULT ('') FOR [forum_rules_link],
+ CONSTRAINT [DF_phpbb_forums_forum_rules_uid] DEFAULT ('') FOR [forum_rules_uid]
GO
CREATE INDEX [left_right_id] ON [phpbb_forums]([left_id], [right_id]) ON [PRIMARY]
@@ -597,7 +618,8 @@ GO
ALTER TABLE [phpbb_forum_access] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_forum__forum_id] DEFAULT (0) FOR [forum_id],
- CONSTRAINT [DF_phpbb_forum__user_id] DEFAULT (0) FOR [user_id]
+ CONSTRAINT [DF_phpbb_forum__user_id] DEFAULT (0) FOR [user_id],
+ CONSTRAINT [DF_phpbb_forum__session_id] DEFAULT ('') FOR [session_id]
GO
@@ -696,7 +718,11 @@ ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_groups_group_receive_pm] DEFAULT (0) FOR [group_receive_pm],
CONSTRAINT [DF_phpbb_groups_group_message_limit] DEFAULT (0) FOR [group_message_limit],
CONSTRAINT [DF_phpbb_groups_group_chgpass] DEFAULT (0) FOR [group_chgpass],
- CONSTRAINT [DF_phpbb_groups_group_legend] DEFAULT (1) FOR [group_legend]
+ CONSTRAINT [DF_phpbb_groups_group_legend] DEFAULT (1) FOR [group_legend],
+ CONSTRAINT [DF_phpbb_groups_group_name] DEFAULT ('') FOR [group_name],
+ CONSTRAINT [DF_phpbb_groups_group_desc_uid] DEFAULT ('') FOR [group_desc_uid],
+ CONSTRAINT [DF_phpbb_groups_group_avatar] DEFAULT ('') FOR [group_avatar],
+ CONSTRAINT [DF_phpbb_groups_group_colour] DEFAULT ('') FOR [group_colour]
GO
CREATE INDEX [group_legend] ON [phpbb_groups]([group_legend]) ON [PRIMARY]
@@ -724,9 +750,6 @@ ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_icons] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_icons__icons_width] DEFAULT (0) FOR [icons_width],
- CONSTRAINT [DF_phpbb_icons__icons_height] DEFAULT (0) FOR [icons_height],
- CONSTRAINT [DF_phpbb_icons__icons_order] DEFAULT (0) FOR [icons_order],
CONSTRAINT [DF_phpbb_icons__display_on_posting] DEFAULT (1) FOR [display_on_posting]
GO
@@ -781,8 +804,7 @@ ALTER TABLE [phpbb_log] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_log____user_id] DEFAULT (0) FOR [user_id],
CONSTRAINT [DF_phpbb_log____forum_id] DEFAULT (0) FOR [forum_id],
CONSTRAINT [DF_phpbb_log____topic_id] DEFAULT (0) FOR [topic_id],
- CONSTRAINT [DF_phpbb_log____reportee_id] DEFAULT (0) FOR [reportee_id],
- CONSTRAINT [DF_phpbb_log____log_time] DEFAULT (0) FOR [log_time]
+ CONSTRAINT [DF_phpbb_log____reportee_id] DEFAULT (0) FOR [reportee_id]
GO
CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
@@ -815,10 +837,11 @@ CREATE TABLE [phpbb_moderator_cache] (
GO
ALTER TABLE [phpbb_moderator_cache] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_modera_forum_id] DEFAULT (0) FOR [forum_id],
CONSTRAINT [DF_phpbb_modera_user_id] DEFAULT (0) FOR [user_id],
CONSTRAINT [DF_phpbb_modera_group_id] DEFAULT (0) FOR [group_id],
- CONSTRAINT [DF_phpbb_modera_display_on_index] DEFAULT (1) FOR [display_on_index]
+ CONSTRAINT [DF_phpbb_modera_display_on_index] DEFAULT (1) FOR [display_on_index],
+ CONSTRAINT [DF_phpbb_modera_username] DEFAULT ('') FOR [username],
+ CONSTRAINT [DF_phpbb_modera_group_name] DEFAULT ('') FOR [group_name]
GO
CREATE INDEX [display_on_index] ON [phpbb_moderator_cache]([display_on_index]) ON [PRIMARY]
@@ -854,8 +877,16 @@ ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_modules] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_module_forums_parent_id] DEFAULT (0) FOR [parent_id],
+ CONSTRAINT [DF_phpbb_module_left_id] DEFAULT (0) FOR [left_id],
+ CONSTRAINT [DF_phpbb_module_right_id] DEFAULT (0) FOR [right_id],
CONSTRAINT [DF_phpbb_module_module_enabled] DEFAULT (1) FOR [module_enabled],
- CONSTRAINT [DF_phpbb_module_module_display] DEFAULT (1) FOR [module_display]
+ CONSTRAINT [DF_phpbb_module_module_display] DEFAULT (1) FOR [module_display],
+ CONSTRAINT [DF_phpbb_module_module_name] DEFAULT ('') FOR [module_name],
+ CONSTRAINT [DF_phpbb_module_module_class] DEFAULT ('') FOR [module_class],
+ CONSTRAINT [DF_phpbb_module_module_langname] DEFAULT ('') FOR [module_langname],
+ CONSTRAINT [DF_phpbb_module_module_mode] DEFAULT ('') FOR [module_mode],
+ CONSTRAINT [DF_phpbb_module_module_auth] DEFAULT ('') FOR [module_auth]
GO
CREATE INDEX [module_enabled] ON [phpbb_modules]([module_enabled]) ON [PRIMARY]
@@ -878,7 +909,6 @@ GO
ALTER TABLE [phpbb_poll_results] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_poll_r_poll_option_id] DEFAULT (0) FOR [poll_option_id],
- CONSTRAINT [DF_phpbb_poll_r_topic_id] DEFAULT (0) FOR [topic_id],
CONSTRAINT [DF_phpbb_poll_r_poll_option_total] DEFAULT (0) FOR [poll_option_total]
GO
@@ -974,7 +1004,8 @@ ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_posts__post_edit_time] DEFAULT (0) FOR [post_edit_time],
CONSTRAINT [DF_phpbb_posts__post_edit_user] DEFAULT (0) FOR [post_edit_user],
CONSTRAINT [DF_phpbb_posts__post_edit_count] DEFAULT (0) FOR [post_edit_count],
- CONSTRAINT [DF_phpbb_posts__post_edit_locked] DEFAULT (0) FOR [post_edit_locked]
+ CONSTRAINT [DF_phpbb_posts__post_edit_locked] DEFAULT (0) FOR [post_edit_locked],
+ CONSTRAINT [DF_phpbb_posts__bbcode_uid] DEFAULT ('') FOR [bbcode_uid]
GO
CREATE INDEX [forum_id] ON [phpbb_posts]([forum_id]) ON [PRIMARY]
@@ -1046,7 +1077,9 @@ ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_privms_message_attachment] DEFAULT (0) FOR [message_attachment],
CONSTRAINT [DF_phpbb_privms_bbcode_bitfield] DEFAULT (0) FOR [bbcode_bitfield],
CONSTRAINT [DF_phpbb_privms_message_edit_time] DEFAULT (0) FOR [message_edit_time],
- CONSTRAINT [DF_phpbb_privms_message_edit_count] DEFAULT (0) FOR [message_edit_count]
+ CONSTRAINT [DF_phpbb_privms_message_edit_count] DEFAULT (0) FOR [message_edit_count],
+ CONSTRAINT [DF_phpbb_privms_author_ip] DEFAULT ('') FOR [author_ip],
+ CONSTRAINT [DF_phpbb_privms_bbcode_uid] DEFAULT ('') FOR [bbcode_uid]
GO
CREATE INDEX [author_ip] ON [phpbb_privmsgs]([author_ip]) ON [PRIMARY]
@@ -1082,7 +1115,8 @@ GO
ALTER TABLE [phpbb_privmsgs_folder] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_pmfold_user_id] DEFAULT (0) FOR [user_id],
- CONSTRAINT [DF_phpbb_pmfold_pm_count] DEFAULT (0) FOR [pm_count]
+ CONSTRAINT [DF_phpbb_pmfold_pm_count] DEFAULT (0) FOR [pm_count],
+ CONSTRAINT [DF_phpbb_pmfold_folder_name] DEFAULT ('') FOR [folder_name]
GO
CREATE INDEX [user_id] ON [phpbb_privmsgs_folder]([user_id]) ON [PRIMARY]
@@ -1119,7 +1153,8 @@ ALTER TABLE [phpbb_privmsgs_rules] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_pmrule_rule_user_id] DEFAULT (0) FOR [rule_user_id],
CONSTRAINT [DF_phpbb_pmrule_rule_group_id] DEFAULT (0) FOR [rule_group_id],
CONSTRAINT [DF_phpbb_pmrule_rule_action] DEFAULT (0) FOR [rule_action],
- CONSTRAINT [DF_phpbb_pmrule_rule_folder_id] DEFAULT (0) FOR [rule_folder_id]
+ CONSTRAINT [DF_phpbb_pmrule_rule_folder_id] DEFAULT (0) FOR [rule_folder_id],
+ CONSTRAINT [DF_phpbb_pmrule_rule_string] DEFAULT ('') FOR [rule_string]
GO
@@ -1192,14 +1227,20 @@ ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_profile_fields] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_pffiel_field_type] DEFAULT (0) FOR [field_type],
CONSTRAINT [DF_phpbb_pffiel_field_default_value] DEFAULT ('0') FOR [field_default_value],
CONSTRAINT [DF_phpbb_pffiel_field_required] DEFAULT (0) FOR [field_required],
CONSTRAINT [DF_phpbb_pffiel_field_show_on_reg] DEFAULT (0) FOR [field_show_on_reg],
CONSTRAINT [DF_phpbb_pffiel_field_hide] DEFAULT (0) FOR [field_hide],
CONSTRAINT [DF_phpbb_pffiel_field_no_view] DEFAULT (0) FOR [field_no_view],
CONSTRAINT [DF_phpbb_pffiel_field_active] DEFAULT (0) FOR [field_active],
- CONSTRAINT [DF_phpbb_pffiel_field_order] DEFAULT (0) FOR [field_order]
+ CONSTRAINT [DF_phpbb_pffiel_field_order] DEFAULT (0) FOR [field_order],
+ CONSTRAINT [DF_phpbb_pffiel_field_name] DEFAULT ('') FOR [field_name],
+ CONSTRAINT [DF_phpbb_pffiel_field_ident] DEFAULT ('') FOR [field_ident],
+ CONSTRAINT [DF_phpbb_pffiel_field_length] DEFAULT ('') FOR [field_length],
+ CONSTRAINT [DF_phpbb_pffiel_field_minlen] DEFAULT ('') FOR [field_minlen],
+ CONSTRAINT [DF_phpbb_pffiel_field_maxlen] DEFAULT ('') FOR [field_maxlen],
+ CONSTRAINT [DF_phpbb_pffiel_field_novalue] DEFAULT ('') FOR [field_novalue],
+ CONSTRAINT [DF_phpbb_pffiel_field_validation] DEFAULT ('') FOR [field_validation]
GO
CREATE INDEX [field_type] ON [phpbb_profile_fields]([field_type]) ON [PRIMARY]
@@ -1254,7 +1295,8 @@ ALTER TABLE [phpbb_profile_fields_lang] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_pfflan_field_id] DEFAULT (0) FOR [field_id],
CONSTRAINT [DF_phpbb_pfflan_lang_id] DEFAULT (0) FOR [lang_id],
CONSTRAINT [DF_phpbb_pfflan_option_id] DEFAULT (0) FOR [option_id],
- CONSTRAINT [DF_phpbb_pfflan_field_type] DEFAULT (0) FOR [field_type]
+ CONSTRAINT [DF_phpbb_pfflan_field_type] DEFAULT (0) FOR [field_type],
+ CONSTRAINT [DF_phpbb_pfflan_value] DEFAULT ('') FOR [value]
GO
@@ -1280,7 +1322,9 @@ GO
ALTER TABLE [phpbb_profile_lang] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_pflang_field_id] DEFAULT (0) FOR [field_id],
- CONSTRAINT [DF_phpbb_pflang_lang_id] DEFAULT (0) FOR [lang_id]
+ CONSTRAINT [DF_phpbb_pflang_lang_id] DEFAULT (0) FOR [lang_id],
+ CONSTRAINT [DF_phpbb_pflang_lang_name] DEFAULT ('') FOR [lang_name],
+ CONSTRAINT [DF_phpbb_pflang_lang_default_value] DEFAULT ('') FOR [lang_default_value]
GO
@@ -1360,7 +1404,8 @@ ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_reporr_reason_order] DEFAULT (0) FOR [reason_order]
+ CONSTRAINT [DF_phpbb_reporr_reason_order] DEFAULT (0) FOR [reason_order],
+ CONSTRAINT [DF_phpbb_reporr_reason_title] DEFAULT ('') FOR [reason_title]
GO
@@ -1383,7 +1428,8 @@ ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_search_search_time] DEFAULT (0) FOR [search_time]
+ CONSTRAINT [DF_phpbb_search_search_time] DEFAULT (0) FOR [search_time],
+ CONSTRAINT [DF_phpbb_search_search_key] DEFAULT ('') FOR [search_key]
GO
@@ -1405,7 +1451,8 @@ ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_swlist_word_common] DEFAULT (0) FOR [word_common]
+ CONSTRAINT [DF_phpbb_swlist_word_common] DEFAULT (0) FOR [word_common],
+ CONSTRAINT [DF_phpbb_swlist_word_text] DEFAULT ('') FOR [word_text]
GO
CREATE INDEX [word_id] ON [phpbb_search_wordlist]([word_id]) ON [PRIMARY]
@@ -1442,7 +1489,7 @@ CREATE TABLE [phpbb_sessions] (
[session_start] [int] NOT NULL ,
[session_time] [int] NOT NULL ,
[session_ip] [varchar] (40) NOT NULL ,
- [session_browser] [varchar] (150) NULL ,
+ [session_browser] [varchar] (150) NOT NULL ,
[session_page] [varchar] (200) NOT NULL ,
[session_viewonline] [int] NOT NULL ,
[session_autologin] [int] NOT NULL ,
@@ -1465,7 +1512,10 @@ ALTER TABLE [phpbb_sessions] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_sessio_session_ip] DEFAULT ('0') FOR [session_ip],
CONSTRAINT [DF_phpbb_sessio_session_viewonline] DEFAULT (1) FOR [session_viewonline],
CONSTRAINT [DF_phpbb_sessio_session_autologin] DEFAULT (0) FOR [session_autologin],
- CONSTRAINT [DF_phpbb_sessio_session_admin] DEFAULT (0) FOR [session_admin]
+ CONSTRAINT [DF_phpbb_sessio_session_admin] DEFAULT (0) FOR [session_admin],
+ CONSTRAINT [DF_phpbb_sessio_session_id] DEFAULT ('') FOR [session_id],
+ CONSTRAINT [DF_phpbb_sessio_session_browser] DEFAULT ('') FOR [session_browser],
+ CONSTRAINT [DF_phpbb_sessio_session_page] DEFAULT ('') FOR [session_page]
GO
CREATE INDEX [session_time] ON [phpbb_sessions]([session_time]) ON [PRIMARY]
@@ -1481,7 +1531,7 @@ GO
CREATE TABLE [phpbb_sessions_keys] (
[key_id] [varchar] (32) NOT NULL ,
[user_id] [int] NOT NULL ,
- [last_ip] [varchar] (100) NOT NULL ,
+ [last_ip] [varchar] (40) NOT NULL ,
[last_login] [int] NOT NULL
) ON [PRIMARY]
GO
@@ -1524,7 +1574,9 @@ ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_sitelist] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_siteli_ip_exclude] DEFAULT (0) FOR [ip_exclude]
+ CONSTRAINT [DF_phpbb_siteli_ip_exclude] DEFAULT (0) FOR [ip_exclude],
+ CONSTRAINT [DF_phpbb_siteli_ip_site_ip] DEFAULT ('') FOR [site_ip],
+ CONSTRAINT [DF_phpbb_siteli_ip_site_hostname] DEFAULT ('') FOR [site_hostname]
GO
@@ -1551,9 +1603,6 @@ ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
GO
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_smilie_smiley_width] DEFAULT (0) FOR [smiley_width],
- CONSTRAINT [DF_phpbb_smilie_smiley_height] DEFAULT (0) FOR [smiley_height],
- CONSTRAINT [DF_phpbb_smilie_smiley_order] DEFAULT (0) FOR [smiley_order],
CONSTRAINT [DF_phpbb_smilie_display_on_posting] DEFAULT (1) FOR [display_on_posting]
GO
@@ -1581,9 +1630,8 @@ GO
ALTER TABLE [phpbb_styles] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_styles_style_active] DEFAULT (1) FOR [style_active],
- CONSTRAINT [DF_phpbb_styles_template_id] DEFAULT (0) FOR [template_id],
- CONSTRAINT [DF_phpbb_styles_theme_id] DEFAULT (0) FOR [theme_id],
- CONSTRAINT [DF_phpbb_styles_imageset_id] DEFAULT (0) FOR [imageset_id]
+ CONSTRAINT [DF_phpbb_styles_style_name] DEFAULT ('') FOR [style_name],
+ CONSTRAINT [DF_phpbb_styles_style_copyright] DEFAULT ('') FOR [style_copyright]
GO
CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
@@ -1600,6 +1648,91 @@ GO
/*
+ Table: phpbb_styles_template
+*/
+CREATE TABLE [phpbb_styles_template] (
+ [template_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [template_name] [varchar] (255) NOT NULL ,
+ [template_copyright] [varchar] (255) NOT NULL ,
+ [template_path] [varchar] (100) NOT NULL ,
+ [bbcode_bitfield] [int] NOT NULL ,
+ [template_storedb] [int] NOT NULL
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
+ (
+ [template_id]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_templa_bbcode_bitfield] DEFAULT (6921) FOR [bbcode_bitfield],
+ CONSTRAINT [DF_phpbb_templa_template_storedb] DEFAULT (0) FOR [template_storedb]
+GO
+
+CREATE UNIQUE INDEX [template_name] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: phpbb_styles_template_data
+*/
+CREATE TABLE [phpbb_styles_template_data] (
+ [template_id] [int] NOT NULL ,
+ [template_filename] [varchar] (100) NOT NULL ,
+ [template_included] [text] ,
+ [template_mtime] [int] NOT NULL ,
+ [template_data] [text]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_template_data] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_tpldat_template_mtime] DEFAULT (0) FOR [template_mtime],
+ CONSTRAINT [DF_phpbb_tpldat_template_filename] DEFAULT ('') FOR [template_filename]
+GO
+
+CREATE INDEX [template_id] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
+GO
+
+CREATE INDEX [template_filename] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
+GO
+
+
+/*
+ Table: phpbb_styles_theme
+*/
+CREATE TABLE [phpbb_styles_theme] (
+ [theme_id] [int] IDENTITY (1, 1) NOT NULL ,
+ [theme_name] [varchar] (255) NOT NULL ,
+ [theme_copyright] [varchar] (255) NOT NULL ,
+ [theme_path] [varchar] (100) NOT NULL ,
+ [theme_storedb] [int] NOT NULL ,
+ [theme_mtime] [int] NOT NULL ,
+ [theme_data] [text]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
+ CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
+ (
+ [theme_id]
+ ) ON [PRIMARY]
+GO
+
+ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_theme__theme_storedb] DEFAULT (0) FOR [theme_storedb],
+ CONSTRAINT [DF_phpbb_theme__theme_mtime] DEFAULT (0) FOR [theme_mtime],
+ CONSTRAINT [DF_phpbb_theme__theme_name] DEFAULT ('') FOR [theme_name],
+ CONSTRAINT [DF_phpbb_theme__theme_copyright] DEFAULT ('') FOR [theme_copyright],
+ CONSTRAINT [DF_phpbb_theme__theme_path] DEFAULT ('') FOR [theme_path]
+GO
+
+CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
+GO
+
+/*
Table: phpbb_styles_imageset
*/
CREATE TABLE [phpbb_styles_imageset] (
@@ -1694,91 +1827,92 @@ ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD
) ON [PRIMARY]
GO
-CREATE UNIQUE INDEX [imageset_name] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY]
-GO
-
-
-/*
- Table: phpbb_styles_template
-*/
-CREATE TABLE [phpbb_styles_template] (
- [template_id] [int] IDENTITY (1, 1) NOT NULL ,
- [template_name] [varchar] (255) NOT NULL ,
- [template_copyright] [varchar] (255) NOT NULL ,
- [template_path] [varchar] (100) NOT NULL ,
- [bbcode_bitfield] [int] NOT NULL ,
- [template_storedb] [int] NOT NULL
-) ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED
- (
- [template_id]
- ) ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_templa_bbcode_bitfield] DEFAULT (6921) FOR [bbcode_bitfield],
- CONSTRAINT [DF_phpbb_templa_template_storedb] DEFAULT (0) FOR [template_storedb]
-GO
-
-CREATE UNIQUE INDEX [template_name] ON [phpbb_styles_template]([template_name]) ON [PRIMARY]
-GO
-
-
-/*
- Table: phpbb_styles_template_data
-*/
-CREATE TABLE [phpbb_styles_template_data] (
- [template_id] [int] NOT NULL ,
- [template_filename] [varchar] (100) NOT NULL ,
- [template_included] [text] ,
- [template_mtime] [int] NOT NULL ,
- [template_data] [text]
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_styles_template_data] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_tpldat_template_id] DEFAULT (0) FOR [template_id],
- CONSTRAINT [DF_phpbb_tpldat_template_mtime] DEFAULT (0) FOR [template_mtime]
-GO
-
-CREATE INDEX [template_id] ON [phpbb_styles_template_data]([template_id]) ON [PRIMARY]
-GO
-
-CREATE INDEX [template_filename] ON [phpbb_styles_template_data]([template_filename]) ON [PRIMARY]
-GO
-
-
-/*
- Table: phpbb_styles_theme
-*/
-CREATE TABLE [phpbb_styles_theme] (
- [theme_id] [int] IDENTITY (1, 1) NOT NULL ,
- [theme_name] [varchar] (255) NOT NULL ,
- [theme_copyright] [varchar] (255) NOT NULL ,
- [theme_path] [varchar] (100) NOT NULL ,
- [theme_storedb] [int] NOT NULL ,
- [theme_mtime] [int] NOT NULL ,
- [theme_data] [text]
-) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-GO
-
-ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
- CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED
- (
- [theme_id]
- ) ON [PRIMARY]
+ALTER TABLE [phpbb_styles_imageset] WITH NOCHECK ADD
+ CONSTRAINT [DF_phpbb_styles_imageset_imageset_name] DEFAULT ('') FOR [imageset_name],
+ CONSTRAINT [DF_phpbb_styles_imageset_imageset_copyright] DEFAULT ('') FOR [imageset_copyright],
+ CONSTRAINT [DF_phpbb_styles_imageset_imageset_path] DEFAULT ('') FOR [imageset_path],
+ CONSTRAINT [DF_phpbb_styles_imageset_site_logo] DEFAULT ('') FOR [site_logo],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_post] DEFAULT ('') FOR [btn_post],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_post_pm] DEFAULT ('') FOR [btn_post_pm],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_reply] DEFAULT ('') FOR [btn_reply],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_reply_pm] DEFAULT ('') FOR [btn_reply_pm],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_locked] DEFAULT ('') FOR [btn_locked],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_profile] DEFAULT ('') FOR [btn_profile],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_pm] DEFAULT ('') FOR [btn_pm],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_delete] DEFAULT ('') FOR [btn_delete],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_info] DEFAULT ('') FOR [btn_info],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_quote] DEFAULT ('') FOR [btn_quote],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_search] DEFAULT ('') FOR [btn_search],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_edit] DEFAULT ('') FOR [btn_edit],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_report] DEFAULT ('') FOR [btn_report],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_email] DEFAULT ('') FOR [btn_email],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_www] DEFAULT ('') FOR [btn_www],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_icq] DEFAULT ('') FOR [btn_icq],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_aim] DEFAULT ('') FOR [btn_aim],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_yim] DEFAULT ('') FOR [btn_yim],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_msnm] DEFAULT ('') FOR [btn_msnm],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_jabber] DEFAULT ('') FOR [btn_jabber],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_online] DEFAULT ('') FOR [btn_online],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_offline] DEFAULT ('') FOR [btn_offline],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_friend] DEFAULT ('') FOR [btn_friend],
+ CONSTRAINT [DF_phpbb_styles_imageset_btn_foe] DEFAULT ('') FOR [btn_foe],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_unapproved] DEFAULT ('') FOR [icon_unapproved],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_reported] DEFAULT ('') FOR [icon_reported],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_attach] DEFAULT ('') FOR [icon_attach],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_post] DEFAULT ('') FOR [icon_post],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_post_new] DEFAULT ('') FOR [icon_post_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_post_latest] DEFAULT ('') FOR [icon_post_latest],
+ CONSTRAINT [DF_phpbb_styles_imageset_icon_post_newest] DEFAULT ('') FOR [icon_post_newest],
+ CONSTRAINT [DF_phpbb_styles_imageset_forum] DEFAULT ('') FOR [forum],
+ CONSTRAINT [DF_phpbb_styles_imageset_forum_new] DEFAULT ('') FOR [forum_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_forum_locked] DEFAULT ('') FOR [forum_locked],
+ CONSTRAINT [DF_phpbb_styles_imageset_forum_link] DEFAULT ('') FOR [forum_link],
+ CONSTRAINT [DF_phpbb_styles_imageset_sub_forum] DEFAULT ('') FOR [sub_forum],
+ CONSTRAINT [DF_phpbb_styles_imageset_sub_forum_new] DEFAULT ('') FOR [sub_forum_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder] DEFAULT ('') FOR [folder],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_moved] DEFAULT ('') FOR [folder_moved],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_posted] DEFAULT ('') FOR [folder_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_new] DEFAULT ('') FOR [folder_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_new_posted] DEFAULT ('') FOR [folder_new_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_hot] DEFAULT ('') FOR [folder_hot],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_hot_posted] DEFAULT ('') FOR [folder_hot_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_hot_new] DEFAULT ('') FOR [folder_hot_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_hot_new_posted] DEFAULT ('') FOR [folder_hot_new_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_locked] DEFAULT ('') FOR [folder_locked],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_locked_posted] DEFAULT ('') FOR [folder_locked_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_locked_new] DEFAULT ('') FOR [folder_locked_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_locked_new_posted] DEFAULT ('') FOR [folder_locked_new_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_sticky] DEFAULT ('') FOR [folder_sticky],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_sticky_posted] DEFAULT ('') FOR [folder_sticky_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_sticky_new] DEFAULT ('') FOR [folder_sticky_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_sticky_new_posted] DEFAULT ('') FOR [folder_sticky_new_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_announce] DEFAULT ('') FOR [folder_announce],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_announce_posted] DEFAULT ('') FOR [folder_announce_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_announce_new] DEFAULT ('') FOR [folder_announce_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_announce_new_posted] DEFAULT ('') FOR [folder_announce_new_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_global] DEFAULT ('') FOR [folder_global],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_global_posted] DEFAULT ('') FOR [folder_global_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_global_new] DEFAULT ('') FOR [folder_global_new],
+ CONSTRAINT [DF_phpbb_styles_imageset_folder_global_new_posted] DEFAULT ('') FOR [folder_global_new_posted],
+ CONSTRAINT [DF_phpbb_styles_imageset_poll_left] DEFAULT ('') FOR [poll_left],
+ CONSTRAINT [DF_phpbb_styles_imageset_poll_center] DEFAULT ('') FOR [poll_center],
+ CONSTRAINT [DF_phpbb_styles_imageset_poll_right] DEFAULT ('') FOR [poll_right],
+ CONSTRAINT [DF_phpbb_styles_imageset_attach_progress_bar] DEFAULT ('') FOR [attach_progress_bar],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon1] DEFAULT ('') FOR [user_icon1],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon2] DEFAULT ('') FOR [user_icon2],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon3] DEFAULT ('') FOR [user_icon3],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon4] DEFAULT ('') FOR [user_icon4],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon5] DEFAULT ('') FOR [user_icon5],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon6] DEFAULT ('') FOR [user_icon6],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon7] DEFAULT ('') FOR [user_icon7],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon8] DEFAULT ('') FOR [user_icon8],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon9] DEFAULT ('') FOR [user_icon9],
+ CONSTRAINT [DF_phpbb_styles_imageset_user_icon10] DEFAULT ('') FOR [user_icon10]
GO
-ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD
- CONSTRAINT [DF_phpbb_theme__theme_storedb] DEFAULT (0) FOR [theme_storedb],
- CONSTRAINT [DF_phpbb_theme__theme_mtime] DEFAULT (0) FOR [theme_mtime]
+CREATE UNIQUE INDEX [imageset_name] ON [phpbb_styles_imageset]([imageset_name]) ON [PRIMARY]
GO
-CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY]
-GO
/*
@@ -1848,7 +1982,6 @@ ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_topics_topic_moved_id] DEFAULT (0) FOR [topic_moved_id],
CONSTRAINT [DF_phpbb_topics_topic_bumped] DEFAULT (0) FOR [topic_bumped],
CONSTRAINT [DF_phpbb_topics_topic_bumper] DEFAULT (0) FOR [topic_bumper],
- CONSTRAINT [DF_phpbb_topics_poll_title] DEFAULT ('') FOR [poll_title],
CONSTRAINT [DF_phpbb_topics_poll_start] DEFAULT (0) FOR [poll_start],
CONSTRAINT [DF_phpbb_topics_poll_length] DEFAULT (0) FOR [poll_length],
CONSTRAINT [DF_phpbb_topics_poll_max_options] DEFAULT (1) FOR [poll_max_options],
@@ -1982,14 +2115,14 @@ CREATE TABLE [phpbb_users] (
[user_type] [int] NOT NULL ,
[group_id] [int] NOT NULL ,
[user_permissions] [text] NULL ,
- [user_perm_from] [int] NULL ,
+ [user_perm_from] [int] NOT NULL ,
[user_ip] [varchar] (40) NOT NULL ,
[user_regdate] [int] NOT NULL ,
[username] [varchar] (255) NOT NULL ,
- [user_password] [varchar] (32) NOT NULL ,
+ [user_password] [varchar] (40) NOT NULL ,
[user_passchg] [int] NULL ,
[user_email] [varchar] (100) NOT NULL ,
- [user_email_hash] [float] NOT NULL ,
+ [user_email_hash] [int] NOT NULL ,
[user_birthday] [varchar] (10) NULL ,
[user_lastvisit] [int] NOT NULL ,
[user_lastmark] [int] NOT NULL ,
@@ -2013,12 +2146,12 @@ CREATE TABLE [phpbb_users] (
[user_message_rules] [int] NOT NULL ,
[user_full_folder] [int] NOT NULL ,
[user_emailtime] [int] NOT NULL ,
- [user_post_show_days] [int] NOT NULL ,
- [user_post_sortby_type] [varchar] (1) NOT NULL ,
- [user_post_sortby_dir] [varchar] (1) NOT NULL ,
[user_topic_show_days] [int] NOT NULL ,
[user_topic_sortby_type] [varchar] (1) NOT NULL ,
[user_topic_sortby_dir] [varchar] (1) NOT NULL ,
+ [user_post_show_days] [int] NOT NULL ,
+ [user_post_sortby_type] [varchar] (1) NOT NULL ,
+ [user_post_sortby_dir] [varchar] (1) NOT NULL ,
[user_notify] [int] NOT NULL ,
[user_notify_pm] [int] NOT NULL ,
[user_notify_type] [int] NOT NULL ,
@@ -2099,7 +2232,29 @@ ALTER TABLE [phpbb_users] WITH NOCHECK ADD
CONSTRAINT [DF_phpbb_users__user_avatar_type] DEFAULT (0) FOR [user_avatar_type],
CONSTRAINT [DF_phpbb_users__user_avatar_width] DEFAULT (0) FOR [user_avatar_width],
CONSTRAINT [DF_phpbb_users__user_avatar_height] DEFAULT (0) FOR [user_avatar_height],
- CONSTRAINT [DF_phpbb_users__user_sig_bbcode_bitf] DEFAULT (0) FOR [user_sig_bbcode_bitfield]
+ CONSTRAINT [DF_phpbb_users__user_sig_bbcode_bitf] DEFAULT (0) FOR [user_sig_bbcode_bitfield],
+ CONSTRAINT [DF_phpbb_users__user_ip] DEFAULT ('') FOR [user_ip],
+ CONSTRAINT [DF_phpbb_users__username] DEFAULT ('') FOR [username],
+ CONSTRAINT [DF_phpbb_users__user_password] DEFAULT ('') FOR [user_password],
+ CONSTRAINT [DF_phpbb_users__user_email] DEFAULT ('') FOR [user_email],
+ CONSTRAINT [DF_phpbb_users__user_birthday] DEFAULT ('') FOR [user_birthday],
+ CONSTRAINT [DF_phpbb_users__user_lastpage] DEFAULT ('') FOR [user_lastpage],
+ CONSTRAINT [DF_phpbb_users__user_last_confirm_key] DEFAULT ('') FOR [user_last_confirm_key],
+ CONSTRAINT [DF_phpbb_users__user_lang] DEFAULT ('') FOR [user_lang],
+ CONSTRAINT [DF_phpbb_users__user_colour] DEFAULT ('') FOR [user_colour],
+ CONSTRAINT [DF_phpbb_users__user_avatar] DEFAULT ('') FOR [user_avatar],
+ CONSTRAINT [DF_phpbb_users__user_sig_bbcode_uid] DEFAULT ('') FOR [user_sig_bbcode_uid],
+ CONSTRAINT [DF_phpbb_users__user_from] DEFAULT ('') FOR [user_from],
+ CONSTRAINT [DF_phpbb_users__user_icq] DEFAULT ('') FOR [user_icq],
+ CONSTRAINT [DF_phpbb_users__user_aim] DEFAULT ('') FOR [user_aim],
+ CONSTRAINT [DF_phpbb_users__user_yim] DEFAULT ('') FOR [user_yim],
+ CONSTRAINT [DF_phpbb_users__user_msnm] DEFAULT ('') FOR [user_msnm],
+ CONSTRAINT [DF_phpbb_users__user_jabber] DEFAULT ('') FOR [user_jabber],
+ CONSTRAINT [DF_phpbb_users__user_website] DEFAULT ('') FOR [user_website],
+ CONSTRAINT [DF_phpbb_users__user_occ] DEFAULT ('') FOR [user_occ],
+ CONSTRAINT [DF_phpbb_users__user_interests] DEFAULT ('') FOR [user_interests],
+ CONSTRAINT [DF_phpbb_users__user_actkey] DEFAULT ('') FOR [user_actkey],
+ CONSTRAINT [DF_phpbb_users__user_newpasswd] DEFAULT ('') FOR [user_newpasswd]
GO
CREATE INDEX [user_birthday] ON [phpbb_users]([user_birthday]) ON [PRIMARY]
diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql
index aa1128d93e..164aeb15f2 100644
--- a/phpBB/install/schemas/mysql_schema.sql
+++ b/phpBB/install/schemas/mysql_schema.sql
@@ -84,16 +84,16 @@ CREATE TABLE phpbb_auth_users (
# 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) DEFAULT '0' NOT NULL,
- ban_end int(11) DEFAULT '0' NOT NULL,
- ban_exclude tinyint(1) DEFAULT '0' NOT NULL,
- ban_reason text,
- ban_give_reason text,
- PRIMARY KEY (ban_id)
+ 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) DEFAULT '0' NOT NULL,
+ ban_end int(11) DEFAULT '0' NOT NULL,
+ ban_exclude tinyint(1) DEFAULT '0' NOT NULL,
+ ban_reason text,
+ ban_give_reason text,
+ PRIMARY KEY (ban_id)
);
# Table: 'phpbb_bbcodes'
@@ -113,11 +113,11 @@ CREATE TABLE phpbb_bbcodes (
# 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)
+ 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)
);
# Table: 'phpbb_bots'
@@ -137,16 +137,16 @@ CREATE TABLE phpbb_cache (
var_name varchar(255) DEFAULT '' NOT NULL,
var_expires int(10) UNSIGNED DEFAULT '0' NOT NULL,
var_data mediumtext,
- PRIMARY KEY (var_name)
+ PRIMARY KEY (var_name)
);
# Table: 'phpbb_config'
CREATE TABLE phpbb_config (
- config_name varchar(255) NOT NULL,
- config_value varchar(255) NOT NULL,
- is_dynamic tinyint(1) DEFAULT '0' NOT NULL,
- PRIMARY KEY (config_name),
- KEY is_dynamic (is_dynamic)
+ config_name varchar(255) NOT NULL,
+ config_value varchar(255) NOT NULL,
+ is_dynamic tinyint(1) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (config_name),
+ KEY is_dynamic (is_dynamic)
);
# Table: 'phpbb_confirm'
@@ -155,14 +155,14 @@ CREATE TABLE phpbb_confirm (
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)
+ PRIMARY KEY (session_id, confirm_id)
);
# Table: 'phpbb_disallow'
CREATE TABLE phpbb_disallow (
- disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- disallow_username varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (disallow_id)
+ disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ disallow_username varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (disallow_id)
);
# Table: 'phpbb_drafts'
@@ -202,45 +202,45 @@ CREATE TABLE phpbb_extension_groups (
# Table: 'phpbb_forums'
CREATE TABLE phpbb_forums (
- forum_id smallint(5) UNSIGNED NOT NULL auto_increment,
- parent_id smallint(5) UNSIGNED NOT NULL,
- left_id smallint(5) UNSIGNED NOT NULL,
- right_id smallint(5) UNSIGNED NOT NULL,
- forum_parents text,
- forum_name text,
- forum_desc text,
- forum_desc_bitfield 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) UNSIGNED,
- forum_image varchar(255) DEFAULT '' NOT NULL,
- forum_rules text,
- forum_rules_link varchar(255) DEFAULT '' NOT NULL,
- forum_rules_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
- forum_rules_uid varchar(5) DEFAULT '' NOT NULL,
- forum_topics_per_page tinyint(4) UNSIGNED 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) DEFAULT '0' NOT NULL,
- forum_last_post_time int(11) DEFAULT '0' NOT NULL,
- forum_last_poster_name varchar(255),
- forum_flags tinyint(4) DEFAULT '0' NOT NULL,
- display_on_index tinyint(1) DEFAULT '1' NOT NULL,
- enable_indexing tinyint(1) DEFAULT '1' NOT NULL,
- enable_icons tinyint(1) DEFAULT '1' NOT NULL,
- enable_prune tinyint(1) DEFAULT '0' NOT NULL,
- prune_next int(11) UNSIGNED,
- prune_days tinyint(4) UNSIGNED NOT NULL,
- prune_viewed tinyint(4) UNSIGNED NOT NULL,
- prune_freq tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (forum_id),
- KEY left_right_id (left_id, right_id),
- KEY forum_last_post_id (forum_last_post_id)
+ forum_id smallint(5) UNSIGNED NOT NULL auto_increment,
+ parent_id smallint(5) UNSIGNED NOT NULL,
+ left_id smallint(5) UNSIGNED NOT NULL,
+ right_id smallint(5) UNSIGNED NOT NULL,
+ forum_parents text,
+ forum_name text,
+ forum_desc text,
+ forum_desc_bitfield 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) UNSIGNED,
+ forum_image varchar(255) DEFAULT '' NOT NULL,
+ forum_rules text,
+ forum_rules_link varchar(255) DEFAULT '' NOT NULL,
+ forum_rules_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_rules_uid varchar(5) DEFAULT '' NOT NULL,
+ forum_topics_per_page tinyint(4) UNSIGNED 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) DEFAULT '0' NOT NULL,
+ forum_last_post_time int(11) DEFAULT '0' NOT NULL,
+ forum_last_poster_name varchar(255),
+ forum_flags tinyint(4) DEFAULT '0' NOT NULL,
+ display_on_index tinyint(1) DEFAULT '1' NOT NULL,
+ enable_indexing tinyint(1) DEFAULT '1' NOT NULL,
+ enable_icons tinyint(1) DEFAULT '1' NOT NULL,
+ enable_prune tinyint(1) DEFAULT '0' NOT NULL,
+ prune_next int(11) UNSIGNED,
+ prune_days tinyint(4) UNSIGNED NOT NULL,
+ prune_viewed tinyint(4) UNSIGNED NOT NULL,
+ prune_freq tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (forum_id),
+ KEY left_right_id (left_id, right_id),
+ KEY forum_last_post_id (forum_last_post_id)
);
# Table: 'phpbb_forum_access'
@@ -248,15 +248,15 @@ CREATE TABLE phpbb_forum_access (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id varchar(32) DEFAULT '' NOT NULL,
- PRIMARY KEY (forum_id,user_id,session_id)
+ PRIMARY KEY (forum_id, user_id, session_id)
);
# Table: 'phpbb_forums_marking'
CREATE TABLE phpbb_forums_marking (
- user_id mediumint(9) UNSIGNED DEFAULT '0' NOT NULL,
- forum_id mediumint(9) UNSIGNED DEFAULT '0' NOT NULL,
- mark_time int(11) DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, forum_id)
+ user_id mediumint(9) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id mediumint(9) UNSIGNED DEFAULT '0' NOT NULL,
+ mark_time int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, forum_id)
);
# Table: 'phpbb_forums_watch'
@@ -271,48 +271,48 @@ CREATE TABLE phpbb_forums_watch (
# Table: 'phpbb_groups'
CREATE TABLE phpbb_groups (
- group_id mediumint(8) NOT NULL auto_increment,
- group_type tinyint(4) DEFAULT '1' NOT NULL,
- group_name varchar(255) DEFAULT '' NOT NULL,
- group_desc text,
- group_desc_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
- group_desc_uid varchar(5) DEFAULT '' NOT NULL,
- group_display tinyint(1) 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) UNSIGNED DEFAULT '0' NOT NULL,
- group_avatar_height tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- group_rank smallint(5) DEFAULT '-1' NOT NULL,
- group_colour varchar(6) DEFAULT '' NOT NULL,
- group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_receive_pm tinyint(1) DEFAULT '0' NOT NULL,
- group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_chgpass smallint(6) DEFAULT '0' NOT NULL,
- group_legend tinyint(1) DEFAULT '1' NOT NULL,
- PRIMARY KEY (group_id),
- KEY group_legend (group_legend)
+ group_id mediumint(8) NOT NULL auto_increment,
+ group_type tinyint(4) DEFAULT '1' NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
+ group_desc text,
+ group_desc_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ group_desc_uid varchar(5) DEFAULT '' NOT NULL,
+ group_display tinyint(1) 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) UNSIGNED DEFAULT '0' NOT NULL,
+ group_avatar_height tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ group_rank smallint(5) DEFAULT '-1' NOT NULL,
+ group_colour varchar(6) DEFAULT '' NOT NULL,
+ group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_receive_pm tinyint(1) DEFAULT '0' NOT NULL,
+ group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_chgpass smallint(6) DEFAULT '0' NOT NULL,
+ group_legend tinyint(1) DEFAULT '1' NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY group_legend (group_legend)
);
# Table: 'phpbb_icons'
CREATE TABLE phpbb_icons (
- icons_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- icons_url varchar(255),
- icons_width tinyint(4) UNSIGNED NOT NULL,
- icons_height tinyint(4) UNSIGNED NOT NULL,
- icons_order tinyint(4) UNSIGNED NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (icons_id)
+ icons_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ icons_url varchar(255),
+ icons_width tinyint(4) UNSIGNED NOT NULL,
+ icons_height tinyint(4) UNSIGNED NOT NULL,
+ icons_order tinyint(4) UNSIGNED NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (icons_id)
);
# Table: 'phpbb_lang'
CREATE TABLE phpbb_lang (
- lang_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- lang_iso varchar(5) NOT NULL,
- lang_dir varchar(30) NOT NULL,
- lang_english_name varchar(100),
- lang_local_name varchar(255),
- lang_author varchar(255),
- PRIMARY KEY (lang_id)
+ lang_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ lang_iso varchar(5) NOT NULL,
+ lang_dir varchar(30) NOT NULL,
+ lang_english_name varchar(100),
+ lang_local_name varchar(255),
+ lang_author varchar(255),
+ PRIMARY KEY (lang_id)
);
# Table: 'phpbb_log'
@@ -350,16 +350,16 @@ CREATE TABLE phpbb_moderator_cache (
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- module_enabled tinyint(1) NOT NULL default '1',
- module_display tinyint(1) NOT NULL default '1',
- module_name varchar(255) NOT NULL default '',
- module_class varchar(10) NOT NULL default '',
- parent_id mediumint(8) unsigned NOT NULL default '0',
- left_id mediumint(8) unsigned NOT NULL default '0',
- right_id mediumint(8) unsigned NOT NULL default '0',
- module_langname varchar(255) NOT NULL default '',
- module_mode varchar(255) NOT NULL default '',
- module_auth varchar(255) NOT NULL default '',
+ module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ module_name varchar(255) UNSIGNED DEFAULT '' NOT NULL,
+ module_class varchar(10) UNSIGNED 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) UNSIGNED DEFAULT '' NOT NULL,
+ module_mode varchar(255) UNSIGNED DEFAULT '' NOT NULL,
+ module_auth varchar(255) UNSIGNED DEFAULT '' NOT NULL,
PRIMARY KEY (module_id),
KEY left_right_id (left_id, right_id),
KEY module_enabled (module_enabled)
@@ -388,170 +388,170 @@ CREATE TABLE phpbb_poll_voters (
# 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 smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
- poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- poster_ip varchar(40) NOT NULL,
- post_time int(11) DEFAULT '0' NOT NULL,
- post_approved tinyint(1) DEFAULT '1' NOT NULL,
- post_reported tinyint(1) DEFAULT '0' NOT NULL,
- enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
- enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
- enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
- enable_sig tinyint(1) DEFAULT '1' NOT NULL,
- post_username varchar(255) NULL,
- post_subject text NOT NULL,
- post_text mediumtext NOT NULL,
- post_checksum varchar(32) NOT NULL,
- post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
- post_attachment tinyint(1) DEFAULT '0' NOT NULL,
- bbcode_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_uid varchar(5) DEFAULT '' NOT NULL,
- post_edit_time int(11) UNSIGNED DEFAULT '0' NULL,
- post_edit_reason text NULL,
- post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NULL,
- post_edit_count smallint(5) UNSIGNED DEFAULT '0' NULL,
- post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' 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_time (post_time)
+ post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ poster_ip varchar(40) NOT NULL,
+ post_time int(11) DEFAULT '0' NOT NULL,
+ post_approved tinyint(1) DEFAULT '1' NOT NULL,
+ post_reported tinyint(1) DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) DEFAULT '1' NOT NULL,
+ post_username varchar(255) NULL,
+ post_subject text NOT NULL,
+ post_text mediumtext NOT NULL,
+ post_checksum varchar(32) NOT NULL,
+ post_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
+ post_attachment tinyint(1) DEFAULT '0' NOT NULL,
+ bbcode_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_uid varchar(5) DEFAULT '' NOT NULL,
+ post_edit_time int(11) UNSIGNED DEFAULT '0' NULL,
+ post_edit_reason text NULL,
+ post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NULL,
+ post_edit_count smallint(5) UNSIGNED DEFAULT '0' NULL,
+ post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' 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_time (post_time)
);
# 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 tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- author_ip varchar(40) DEFAULT '' NOT NULL,
- message_time int(11) DEFAULT '0' NOT NULL,
- enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
- enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
- enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
- enable_sig tinyint(1) DEFAULT '1' NOT NULL,
- message_subject text NOT NULL,
- message_text mediumtext NOT NULL,
- message_edit_reason text NULL,
- message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NULL,
- message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
- message_attachment tinyint(1) DEFAULT '0' NOT NULL,
- bbcode_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_uid varchar(5) DEFAULT '' NOT NULL,
- message_edit_time int(11) UNSIGNED DEFAULT '0' NULL,
- message_edit_count smallint(5) UNSIGNED DEFAULT '0' NULL,
- to_address text NOT NULL,
- bcc_address text 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)
+ 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 tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ author_ip varchar(40) DEFAULT '' NOT NULL,
+ message_time int(11) DEFAULT '0' NOT NULL,
+ enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
+ enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
+ enable_magic_url tinyint(1) DEFAULT '1' NOT NULL,
+ enable_sig tinyint(1) DEFAULT '1' NOT NULL,
+ message_subject text NOT NULL,
+ message_text mediumtext NOT NULL,
+ message_edit_reason text NULL,
+ message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NULL,
+ message_encoding varchar(20) DEFAULT 'iso-8859-1' NOT NULL,
+ message_attachment tinyint(1) DEFAULT '0' NOT NULL,
+ bbcode_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL,
+ bbcode_uid varchar(5) DEFAULT '' NOT NULL,
+ message_edit_time int(11) UNSIGNED DEFAULT '0' NULL,
+ message_edit_count smallint(5) UNSIGNED DEFAULT '0' NULL,
+ to_address text NOT NULL,
+ bcc_address text 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)
);
# 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)
+ 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)
);
# 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(4) UNSIGNED DEFAULT '0' NOT NULL,
- rule_connection mediumint(4) 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(4) UNSIGNED DEFAULT '0' NOT NULL,
- rule_folder_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (rule_id)
+ rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_check mediumint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_connection mediumint(4) 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(4) UNSIGNED DEFAULT '0' NOT NULL,
+ rule_folder_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (rule_id)
);
# 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,
- deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
- folder_id int(10) DEFAULT '0' NOT NULL,
- KEY msg_id (msg_id),
- KEY user_id (user_id,folder_id)
+ 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,
+ deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
+ folder_id int(10) DEFAULT '0' NOT NULL,
+ KEY msg_id (msg_id),
+ KEY user_id (user_id, folder_id)
);
# 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_desc text,
- field_type mediumint(8) UNSIGNED 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 '0' 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 tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (field_id),
- KEY field_type (field_type),
- KEY field_order (field_order)
+ field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ field_name varchar(255) DEFAULT '' NOT NULL,
+ field_desc text,
+ field_type mediumint(8) UNSIGNED 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 '0' 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 tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (field_id),
+ KEY field_type (field_type),
+ KEY field_order (field_order)
);
# Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data (
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id)
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id)
);
# 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,
- value varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (field_id, lang_id, option_id)
+ 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,
+ value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id, option_id)
);
# Table: 'phpbb_profile_lang'
CREATE TABLE phpbb_profile_lang (
- field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- lang_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- lang_name varchar(255) DEFAULT '' NOT NULL,
- lang_explain text,
- lang_default_value varchar(255) DEFAULT '' NOT NULL,
- PRIMARY KEY (field_id, lang_id)
+ field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_id tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ lang_name varchar(255) DEFAULT '' NOT NULL,
+ lang_explain text,
+ lang_default_value varchar(255) DEFAULT '' NOT NULL,
+ PRIMARY KEY (field_id, lang_id)
);
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
- rank_id smallint(5) UNSIGNED NOT NULL auto_increment,
- rank_title varchar(255) NOT NULL,
- rank_min mediumint(8) DEFAULT '0' NOT NULL,
- rank_special tinyint(1) DEFAULT '0',
- rank_image varchar(255),
- PRIMARY KEY (rank_id)
+ rank_id smallint(5) UNSIGNED NOT NULL auto_increment,
+ rank_title varchar(255) NOT NULL,
+ rank_min mediumint(8) DEFAULT '0' NOT NULL,
+ rank_special tinyint(1) DEFAULT '0',
+ rank_image varchar(255),
+ PRIMARY KEY (rank_id)
);
# Table: 'phpbb_reports'
@@ -604,20 +604,20 @@ CREATE TABLE phpbb_search_wordmatch (
# Table: 'phpbb_sessions'
CREATE TABLE phpbb_sessions (
- session_id varchar(32) DEFAULT '' NOT NULL,
- session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- session_last_visit int(11) DEFAULT '0' NOT NULL,
- session_start int(11) DEFAULT '0' NOT NULL,
- session_time int(11) DEFAULT '0' NOT NULL,
- session_ip varchar(40) DEFAULT '0' NOT NULL,
- session_browser varchar(150) DEFAULT '' NOT NULL,
- session_page varchar(200) DEFAULT '' NOT NULL,
- session_viewonline tinyint(1) DEFAULT '1' NOT NULL,
- session_autologin tinyint(1) DEFAULT '0' NOT NULL,
- session_admin tinyint(1) DEFAULT '0' NOT NULL,
- PRIMARY KEY (session_id),
- KEY session_time (session_time),
- KEY session_user_id (session_user_id)
+ session_id varchar(32) DEFAULT '' NOT NULL,
+ session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ session_last_visit int(11) DEFAULT '0' NOT NULL,
+ session_start int(11) DEFAULT '0' NOT NULL,
+ session_time int(11) DEFAULT '0' NOT NULL,
+ session_ip varchar(40) DEFAULT '0' NOT NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
+ session_page varchar(200) DEFAULT '' NOT NULL,
+ session_viewonline tinyint(1) DEFAULT '1' NOT NULL,
+ session_autologin tinyint(1) DEFAULT '0' NOT NULL,
+ session_admin tinyint(1) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (session_id),
+ KEY session_time (session_time),
+ KEY session_user_id (session_user_id)
);
# Table: 'phpbb_sessions_keys'
@@ -626,82 +626,82 @@ CREATE TABLE phpbb_sessions_keys (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
last_ip varchar(40) DEFAULT '' NOT NULL,
last_login int(11) DEFAULT '0' NOT NULL,
- PRIMARY KEY (key_id,user_id),
+ PRIMARY KEY (key_id, user_id),
KEY last_login (last_login)
);
# 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) DEFAULT '0' NOT NULL,
- PRIMARY KEY (site_id)
+ 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) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (site_id)
);
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
- smiley_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- code varchar(50),
- emotion varchar(50),
- smiley_url varchar(50),
- smiley_width tinyint(4) UNSIGNED NOT NULL,
- smiley_height tinyint(4) UNSIGNED NOT NULL,
- smiley_order tinyint(4) UNSIGNED NOT NULL,
- display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
- PRIMARY KEY (smiley_id)
+ smiley_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ code varchar(50),
+ emotion varchar(50),
+ smiley_url varchar(50),
+ smiley_width tinyint(4) UNSIGNED NOT NULL,
+ smiley_height tinyint(4) UNSIGNED NOT NULL,
+ smiley_order tinyint(4) UNSIGNED NOT NULL,
+ display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
+ PRIMARY KEY (smiley_id)
);
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
- style_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- style_name varchar(255) DEFAULT '' NOT NULL,
- style_copyright varchar(255) DEFAULT '' NOT NULL,
- style_active tinyint(1) DEFAULT '1' NOT NULL,
- template_id tinyint(4) UNSIGNED NOT NULL,
- theme_id tinyint(4) UNSIGNED NOT NULL,
- imageset_id tinyint(4) UNSIGNED NOT NULL,
- PRIMARY KEY (style_id),
- UNIQUE style_name (style_name),
- KEY (template_id),
- KEY (theme_id),
- KEY (imageset_id)
+ style_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ style_name varchar(255) DEFAULT '' NOT NULL,
+ style_copyright varchar(255) DEFAULT '' NOT NULL,
+ style_active tinyint(1) DEFAULT '1' NOT NULL,
+ template_id tinyint(4) UNSIGNED NOT NULL,
+ theme_id tinyint(4) UNSIGNED NOT NULL,
+ imageset_id tinyint(4) UNSIGNED NOT NULL,
+ PRIMARY KEY (style_id),
+ UNIQUE style_name (style_name),
+ KEY (template_id),
+ KEY (theme_id),
+ KEY (imageset_id)
);
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
- template_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- template_name varchar(255) NOT NULL,
- template_copyright varchar(255) NOT NULL,
- template_path varchar(100) NOT NULL,
- bbcode_bitfield int(11) UNSIGNED DEFAULT '6921' NOT NULL,
- template_storedb tinyint(1) DEFAULT '0' NOT NULL,
- PRIMARY KEY (template_id),
- UNIQUE template_name (template_name)
+ template_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ template_name varchar(255) NOT NULL,
+ template_copyright varchar(255) NOT NULL,
+ template_path varchar(100) NOT NULL,
+ bbcode_bitfield int(11) UNSIGNED DEFAULT '6921' NOT NULL,
+ template_storedb tinyint(1) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (template_id),
+ UNIQUE template_name (template_name)
);
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
- template_id tinyint(4) UNSIGNED NOT NULL,
- template_filename varchar(100) DEFAULT '' NOT NULL,
- template_included text,
- template_mtime int(11) DEFAULT '0' NOT NULL,
- template_data mediumtext,
- KEY (template_id),
- KEY (template_filename)
+ template_id tinyint(4) UNSIGNED NOT NULL,
+ template_filename varchar(100) DEFAULT '' NOT NULL,
+ template_included text,
+ template_mtime int(11) DEFAULT '0' NOT NULL,
+ template_data mediumtext,
+ KEY (template_id),
+ KEY (template_filename)
);
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
- theme_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- theme_name varchar(255) DEFAULT '' NOT NULL,
- theme_copyright varchar(255) DEFAULT '' NOT NULL,
- theme_path varchar(100) DEFAULT '' NOT NULL,
- theme_storedb tinyint(1) DEFAULT '0' NOT NULL,
- theme_mtime int(11) DEFAULT '0' NOT NULL,
- theme_data mediumtext,
- PRIMARY KEY (theme_id),
- UNIQUE theme_name (theme_name)
+ theme_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ theme_name varchar(255) DEFAULT '' NOT NULL,
+ theme_copyright varchar(255) DEFAULT '' NOT NULL,
+ theme_path varchar(100) DEFAULT '' NOT NULL,
+ theme_storedb tinyint(1) DEFAULT '0' NOT NULL,
+ theme_mtime int(11) DEFAULT '0' NOT NULL,
+ theme_data mediumtext,
+ PRIMARY KEY (theme_id),
+ UNIQUE theme_name (theme_name)
);
# Table: 'phpbb_styles_imageset'
@@ -766,11 +766,11 @@ CREATE TABLE phpbb_styles_imageset (
folder_sticky_new varchar(200) DEFAULT '' NOT NULL,
folder_sticky_new_posted varchar(200) DEFAULT '' NOT NULL,
folder_announce varchar(200) DEFAULT '' NOT NULL,
- folder_announce_posted varchar(200) DEFAULT '' NOT NULL,
+ folder_announce_posted varchar(200) DEFAULT '' NOT NULL,
folder_announce_new varchar(200) DEFAULT '' NOT NULL,
folder_announce_new_posted varchar(200) DEFAULT '' NOT NULL,
- folder_global varchar(200) DEFAULT '' NOT NULL,
- folder_global_posted varchar(200) DEFAULT '' NOT NULL,
+ folder_global varchar(200) DEFAULT '' NOT NULL,
+ folder_global_posted varchar(200) DEFAULT '' NOT NULL,
folder_global_new varchar(200) DEFAULT '' NOT NULL,
folder_global_new_posted varchar(200) DEFAULT '' NOT NULL,
poll_left varchar(200) DEFAULT '' NOT NULL,
@@ -793,59 +793,59 @@ CREATE TABLE phpbb_styles_imageset (
# Table: 'phpbb_topics'
CREATE TABLE phpbb_topics (
- topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
- icon_id tinyint(4) UNSIGNED DEFAULT '1' NOT NULL,
- topic_attachment tinyint(1) 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,
- topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_time int(11) DEFAULT '0' NOT NULL,
- topic_time_limit int(11) 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),
- 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),
- 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,
- poll_start int(11) DEFAULT '0' NOT NULL,
- poll_length int(11) DEFAULT '0' NOT NULL,
- poll_max_options tinyint(4) UNSIGNED DEFAULT '1' NOT NULL,
- poll_last_vote int(11) UNSIGNED DEFAULT '0',
- 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 topic_last_post_time (topic_last_post_time)
+ topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
+ icon_id tinyint(4) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_attachment tinyint(1) 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,
+ topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_time int(11) DEFAULT '0' NOT NULL,
+ topic_time_limit int(11) 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),
+ 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),
+ 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,
+ poll_start int(11) DEFAULT '0' NOT NULL,
+ poll_length int(11) DEFAULT '0' NOT NULL,
+ poll_max_options tinyint(4) UNSIGNED DEFAULT '1' NOT NULL,
+ poll_last_vote int(11) UNSIGNED DEFAULT '0',
+ 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 topic_last_post_time (topic_last_post_time)
);
# Table: 'phpbb_topic_marking'
CREATE TABLE phpbb_topics_marking (
- 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) DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, topic_id),
- KEY forum_id (forum_id)
+ 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) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id),
+ KEY forum_id (forum_id)
);
# Table: 'phpbb_topic_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(4) DEFAULT '0' NOT NULL,
- PRIMARY KEY (user_id, topic_id)
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posted tinyint(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (user_id, topic_id)
);
# Table: 'phpbb_topics_watch'
@@ -860,90 +860,90 @@ CREATE TABLE phpbb_topics_watch (
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (
- group_id mediumint(8) DEFAULT '0' NOT NULL,
- user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- group_leader tinyint(1) DEFAULT '0' NOT NULL,
- user_pending tinyint(1),
- KEY group_id (group_id),
- KEY user_id (user_id),
- KEY group_leader (group_leader)
+ group_id mediumint(8) DEFAULT '0' NOT NULL,
+ user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ group_leader tinyint(1) DEFAULT '0' NOT NULL,
+ user_pending tinyint(1),
+ KEY group_id (group_id),
+ KEY user_id (user_id),
+ KEY group_leader (group_leader)
);
# Table: 'phpbb_users'
CREATE TABLE phpbb_users (
- user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- user_type tinyint(1) DEFAULT '0' NOT NULL,
- group_id mediumint(8) DEFAULT '3' NOT NULL,
- user_permissions text NULL,
- user_perm_from mediumint(8) DEFAULT '0' NOT NULL,
- user_ip varchar(40) DEFAULT '' NOT NULL,
- user_regdate int(11) DEFAULT '0' NOT NULL,
- username varchar(255) DEFAULT '' NOT NULL,
- user_password varchar(40) DEFAULT '' NOT NULL,
- user_passchg int(11) DEFAULT '0' NULL,
- user_email varchar(100) DEFAULT '' NOT NULL,
- user_email_hash bigint(20) DEFAULT '0' NOT NULL,
- user_birthday varchar(10) DEFAULT '' NULL,
- user_lastvisit int(11) DEFAULT '0' NOT NULL,
- user_lastmark int(11) DEFAULT '0' NOT NULL,
- user_lastpost_time int(11) DEFAULT '0' NOT NULL,
- user_lastpage varchar(200) DEFAULT '' NOT NULL,
- user_last_confirm_key varchar(10) DEFAULT '' NULL,
- user_warnings tinyint(4) DEFAULT '0' NULL,
- user_last_warning int(11) DEFAULT '0' NULL,
- user_login_attempts smallint(4) DEFAULT '0' NULL,
- user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- user_lang varchar(30) DEFAULT '' NOT NULL,
- user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL,
- user_dst tinyint(1) 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 int(11) DEFAULT '0' NULL,
- user_colour varchar(6) DEFAULT '' NOT NULL,
- user_new_privmsg tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_unread_privmsg tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_last_privmsg int(11) 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) DEFAULT '0' NOT NULL,
- user_topic_show_days smallint(4) 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) 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) DEFAULT '0' NOT NULL,
- user_notify_pm tinyint(1) DEFAULT '1' NOT NULL,
- user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
- user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
- user_allow_email tinyint(1) DEFAULT '1' NOT NULL,
- user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
- user_allow_viewemail tinyint(1) DEFAULT '1' NOT NULL,
- user_allow_massemail tinyint(1) DEFAULT '1' NOT NULL,
- user_options int(11) DEFAULT '893' NOT NULL,
- user_avatar varchar(255) DEFAULT '' NOT NULL,
- user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
- user_avatar_width tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_avatar_height tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
- user_sig text NULL,
- user_sig_bbcode_uid varchar(5) DEFAULT '' NULL,
- user_sig_bbcode_bitfield int(11) DEFAULT '0' NULL,
- user_from varchar(100) DEFAULT '' NULL,
- user_icq varchar(15) DEFAULT '' NULL,
- user_aim varchar(255) DEFAULT '' NULL,
- user_yim varchar(255) DEFAULT '' NULL,
- user_msnm varchar(255) DEFAULT '' NULL,
- user_jabber varchar(255) DEFAULT '' NULL,
- user_website varchar(200) DEFAULT '' NULL,
- user_occ varchar(255) DEFAULT '' NULL,
- user_interests varchar(255) DEFAULT '' NULL,
- user_actkey varchar(32) DEFAULT '' NOT NULL,
- user_newpasswd varchar(32) DEFAULT '' NULL,
- PRIMARY KEY (user_id),
- KEY user_birthday (user_birthday(6)),
- KEY user_email_hash (user_email_hash),
- KEY user_type (user_type),
- KEY username (username)
+ user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ user_type tinyint(1) DEFAULT '0' NOT NULL,
+ group_id mediumint(8) DEFAULT '3' NOT NULL,
+ user_permissions text NULL,
+ user_perm_from mediumint(8) DEFAULT '0' NOT NULL,
+ user_ip varchar(40) DEFAULT '' NOT NULL,
+ user_regdate int(11) DEFAULT '0' NOT NULL,
+ username varchar(255) DEFAULT '' NOT NULL,
+ user_password varchar(40) DEFAULT '' NOT NULL,
+ user_passchg int(11) DEFAULT '0' NULL,
+ user_email varchar(100) DEFAULT '' NOT NULL,
+ user_email_hash bigint(20) DEFAULT '0' NOT NULL,
+ user_birthday varchar(10) DEFAULT '' NULL,
+ user_lastvisit int(11) DEFAULT '0' NOT NULL,
+ user_lastmark int(11) DEFAULT '0' NOT NULL,
+ user_lastpost_time int(11) DEFAULT '0' NOT NULL,
+ user_lastpage varchar(200) DEFAULT '' NOT NULL,
+ user_last_confirm_key varchar(10) DEFAULT '' NULL,
+ user_warnings tinyint(4) DEFAULT '0' NULL,
+ user_last_warning int(11) DEFAULT '0' NULL,
+ user_login_attempts smallint(4) DEFAULT '0' NULL,
+ user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ user_lang varchar(30) DEFAULT '' NOT NULL,
+ user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL,
+ user_dst tinyint(1) 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 int(11) DEFAULT '0' NULL,
+ user_colour varchar(6) DEFAULT '' NOT NULL,
+ user_new_privmsg tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_unread_privmsg tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_last_privmsg int(11) 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) DEFAULT '0' NOT NULL,
+ user_topic_show_days smallint(4) 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) 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) DEFAULT '0' NOT NULL,
+ user_notify_pm tinyint(1) DEFAULT '1' NOT NULL,
+ user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
+ user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
+ user_allow_email tinyint(1) DEFAULT '1' NOT NULL,
+ user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
+ user_allow_viewemail tinyint(1) DEFAULT '1' NOT NULL,
+ user_allow_massemail tinyint(1) DEFAULT '1' NOT NULL,
+ user_options int(11) DEFAULT '893' NOT NULL,
+ user_avatar varchar(255) DEFAULT '' NOT NULL,
+ user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
+ user_avatar_width tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_avatar_height tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ user_sig text NULL,
+ user_sig_bbcode_uid varchar(5) DEFAULT '' NULL,
+ user_sig_bbcode_bitfield int(11) DEFAULT '0' NULL,
+ user_from varchar(100) DEFAULT '' NULL,
+ user_icq varchar(15) DEFAULT '' NULL,
+ user_aim varchar(255) DEFAULT '' NULL,
+ user_yim varchar(255) DEFAULT '' NULL,
+ user_msnm varchar(255) DEFAULT '' NULL,
+ user_jabber varchar(255) DEFAULT '' NULL,
+ user_website varchar(200) DEFAULT '' NULL,
+ user_occ varchar(255) DEFAULT '' NULL,
+ user_interests varchar(255) DEFAULT '' NULL,
+ user_actkey varchar(32) DEFAULT '' NOT NULL,
+ user_newpasswd varchar(32) DEFAULT '' NULL,
+ PRIMARY KEY (user_id),
+ KEY user_birthday (user_birthday(6)),
+ KEY user_email_hash (user_email_hash),
+ KEY user_type (user_type),
+ KEY username (username)
);
# Table: 'phpbb_warnings'
@@ -958,10 +958,10 @@ CREATE TABLE phpbb_warnings (
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
- word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- word varchar(255) NOT NULL,
- replacement varchar(255) NOT NULL,
- PRIMARY KEY (word_id)
+ word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ word varchar(255) NOT NULL,
+ replacement varchar(255) NOT NULL,
+ PRIMARY KEY (word_id)
);
# Table: 'phpbb_zebra'
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index d143128ed7..2264bc8bbf 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -48,8 +48,8 @@ CREATE TABLE phpbb_attachments (
topic_id number(8) DEFAULT '0' NOT NULL,
in_message number(1) DEFAULT '0' NOT NULL,
poster_id number(8) DEFAULT '0' NOT NULL,
- physical_filename varchar2(255),
- real_filename varchar2(255),
+ physical_filename varchar2(255) NOT NULL,
+ real_filename varchar2(255) NOT NULL,
download_count number(8) DEFAULT '0' NOT NULL,
"COMMENT" clob,
extension varchar2(100),
@@ -98,7 +98,7 @@ CREATE TABLE phpbb_auth_groups (
forum_id number(8) DEFAULT '0' NOT NULL,
auth_option_id number(8) DEFAULT '0' NOT NULL,
auth_role_id number(8) DEFAULT '0' NOT NULL,
- auth_setting number(4) DEFAULT '0' NOT NULL
+ auth_setting number(2) DEFAULT '0' NOT NULL
)
/
@@ -113,7 +113,7 @@ CREATE INDEX phpbb_auth_groups_auth_opt_id on phpbb_auth_groups (auth_option_id)
*/
CREATE TABLE phpbb_auth_options (
auth_option_id number(8) NOT NULL,
- auth_option varchar2(20),
+ auth_option varchar2(20) NOT NULL,
is_global number(1) DEFAULT '0' NOT NULL,
is_local number(1) DEFAULT '0' NOT NULL,
founder_only number(1) DEFAULT '0' NOT NULL,
@@ -145,9 +145,9 @@ CREATE INDEX phpbb_auth_options_auth_option on phpbb_auth_options (auth_option)
*/
CREATE TABLE phpbb_auth_roles (
role_id number(8) NOT NULL,
- role_name varchar2(255) DEFAULT '',
+ role_name varchar2(255) DEFAULT '' NOT NULL,
role_description clob,
- role_type varchar2(10) DEFAULT '',
+ role_type varchar2(10) DEFAULT '' NOT NULL,
role_order number(4) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_auth_roles PRIMARY KEY (role_id)
)
@@ -180,7 +180,7 @@ CREATE INDEX phpbb_auth_roles_role_order on phpbb_auth_roles (role_order)
CREATE TABLE phpbb_auth_roles_data (
role_id number(8) DEFAULT '0' NOT NULL,
auth_option_id number(8) DEFAULT '0' NOT NULL,
- auth_setting number(4) DEFAULT '0' NOT NULL,
+ auth_setting number(2) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_auth_roles_data PRIMARY KEY (role_id, auth_option_id)
)
/
@@ -194,7 +194,7 @@ CREATE TABLE phpbb_auth_users (
forum_id number(8) DEFAULT '0' NOT NULL,
auth_option_id number(8) DEFAULT '0' NOT NULL,
auth_role_id number(8) DEFAULT '0' NOT NULL,
- auth_setting number(4) DEFAULT '0' NOT NULL
+ auth_setting number(2) DEFAULT '0' NOT NULL
)
/
@@ -210,8 +210,8 @@ CREATE INDEX phpbb_auth_users_auth_opt_id on phpbb_auth_users (auth_option_id)
CREATE TABLE phpbb_banlist (
ban_id number(8) NOT NULL,
ban_userid number(8) DEFAULT '0' NOT NULL,
- ban_ip varchar2(40) DEFAULT '',
- ban_email varchar2(100) DEFAULT '',
+ ban_ip varchar2(40) DEFAULT '' NOT NULL,
+ ban_email varchar2(100) DEFAULT '' NOT NULL,
ban_start number(11) DEFAULT '0' NOT NULL,
ban_end number(11) DEFAULT '0' NOT NULL,
ban_exclude number(1) DEFAULT '0' NOT NULL,
@@ -242,13 +242,13 @@ END;
*/
CREATE TABLE phpbb_bbcodes (
bbcode_id number(3) DEFAULT '0' NOT NULL,
- bbcode_tag varchar2(16) DEFAULT '',
+ bbcode_tag varchar2(16) DEFAULT '' NOT NULL,
display_on_posting number(1) DEFAULT '0' NOT NULL,
- bbcode_match varchar2(255) DEFAULT '',
+ bbcode_match varchar2(255) DEFAULT '' NOT NULL,
bbcode_tpl clob,
- first_pass_match varchar2(255) DEFAULT '',
- first_pass_replace varchar2(255) DEFAULT '',
- second_pass_match varchar2(255) DEFAULT '',
+ first_pass_match varchar2(255) DEFAULT '' NOT NULL,
+ first_pass_replace varchar2(255) DEFAULT '' NOT NULL,
+ second_pass_match varchar2(255) DEFAULT '' NOT NULL,
second_pass_replace clob,
CONSTRAINT pk_phpbb_bbcodes PRIMARY KEY (bbcode_id)
)
@@ -282,8 +282,8 @@ CREATE TABLE phpbb_bots (
bot_active number(1) DEFAULT '1' NOT NULL,
bot_name varchar2(1000),
user_id number(8) DEFAULT '0' NOT NULL,
- bot_agent varchar2(255) DEFAULT '',
- bot_ip varchar2(255) DEFAULT '',
+ bot_agent varchar2(255) DEFAULT '' NOT NULL,
+ bot_ip varchar2(255) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_bots PRIMARY KEY (bot_id)
)
/
@@ -311,7 +311,7 @@ CREATE INDEX phpbb_bots_bot_active on phpbb_bots (bot_active)
Table: phpbb_cache
*/
CREATE TABLE phpbb_cache (
- var_name varchar2(255) DEFAULT '',
+ var_name varchar2(255) DEFAULT '' NOT NULL,
var_expires number(10) DEFAULT '0' NOT NULL,
var_data clob,
CONSTRAINT pk_phpbb_cache PRIMARY KEY (var_name)
@@ -323,8 +323,8 @@ CREATE TABLE phpbb_cache (
Table: phpbb_config
*/
CREATE TABLE phpbb_config (
- config_name varchar2(255),
- config_value varchar2(255),
+ config_name varchar2(255) NOT NULL,
+ config_value varchar2(255) NOT NULL,
is_dynamic number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name)
)
@@ -338,10 +338,10 @@ CREATE INDEX phpbb_config_is_dynamic on phpbb_config (is_dynamic)
Table: phpbb_confirm
*/
CREATE TABLE phpbb_confirm (
- confirm_id varchar2(32) DEFAULT '',
- session_id varchar2(32) DEFAULT '',
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
confirm_type number(3) DEFAULT '0' NOT NULL,
- code varchar2(8) DEFAULT '',
+ code varchar2(8) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id)
)
/
@@ -352,7 +352,7 @@ CREATE TABLE phpbb_confirm (
*/
CREATE TABLE phpbb_disallow (
disallow_id number(8) NOT NULL,
- disallow_username varchar2(255) DEFAULT '',
+ disallow_username varchar2(255) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_disallow PRIMARY KEY (disallow_id)
)
/
@@ -413,7 +413,7 @@ CREATE INDEX phpbb_drafts_save_time on phpbb_drafts (save_time)
CREATE TABLE phpbb_extensions (
extension_id number(8) NOT NULL,
group_id number(8) DEFAULT '0' NOT NULL,
- extension varchar2(100) DEFAULT '',
+ extension varchar2(100) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_extensions PRIMARY KEY (extension_id)
)
/
@@ -439,11 +439,11 @@ END;
*/
CREATE TABLE phpbb_extension_groups (
group_id number(8) NOT NULL,
- group_name varchar2(255),
+ group_name varchar2(255) NOT NULL,
cat_id number(2) DEFAULT '0' NOT NULL,
allow_group number(1) DEFAULT '0' NOT NULL,
download_mode number(1) DEFAULT '1' NOT NULL,
- upload_icon varchar2(255) DEFAULT '',
+ upload_icon varchar2(255) DEFAULT '' NOT NULL,
max_filesize number(20) DEFAULT '0' NOT NULL,
allowed_forums clob,
allow_in_pm number(1) DEFAULT '0' NOT NULL,
@@ -479,15 +479,15 @@ CREATE TABLE phpbb_forums (
forum_name varchar2(1000),
forum_desc clob,
forum_desc_bitfield number(11) DEFAULT '0' NOT NULL,
- forum_desc_uid varchar2(5) DEFAULT '',
- forum_link varchar2(255) DEFAULT '',
- forum_password varchar2(40) DEFAULT '',
+ forum_desc_uid varchar2(5) DEFAULT '' NOT NULL,
+ forum_link varchar2(255) DEFAULT '' NOT NULL,
+ forum_password varchar2(40) DEFAULT '' NOT NULL,
forum_style number(4),
- forum_image varchar2(255) DEFAULT '',
+ forum_image varchar2(255) DEFAULT '' NOT NULL,
forum_rules clob,
- forum_rules_link varchar2(255) DEFAULT '',
+ forum_rules_link varchar2(255) DEFAULT '' NOT NULL,
forum_rules_bitfield number(11) DEFAULT '0' NOT NULL,
- forum_rules_uid varchar2(5) DEFAULT '',
+ forum_rules_uid varchar2(5) DEFAULT '' NOT NULL,
forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
forum_type number(4) DEFAULT '0' NOT NULL,
forum_status number(4) DEFAULT '0' NOT NULL,
@@ -538,7 +538,7 @@ CREATE INDEX phpbb_forums_forum_last_pst_id on phpbb_forums (forum_last_post_id)
CREATE TABLE phpbb_forum_access (
forum_id number(8) DEFAULT '0' NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
- session_id varchar2(32) DEFAULT '',
+ session_id varchar2(32) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_forum_access PRIMARY KEY (forum_id, user_id, session_id)
)
/
@@ -583,14 +583,14 @@ CREATE TABLE phpbb_groups (
group_name varchar2(255) DEFAULT '' NOT NULL,
group_desc clob,
group_desc_bitfield number(11) DEFAULT '0' NOT NULL,
- group_desc_uid varchar2(5) DEFAULT '',
+ group_desc_uid varchar2(5) DEFAULT '' NOT NULL,
group_display number(1) DEFAULT '0' NOT NULL,
- group_avatar varchar2(255) DEFAULT '',
+ group_avatar varchar2(255) DEFAULT '' NOT NULL,
group_avatar_type number(4) DEFAULT '0' NOT NULL,
group_avatar_width number(4) DEFAULT '0' NOT NULL,
group_avatar_height number(4) DEFAULT '0' NOT NULL,
- group_rank number(5) DEFAULT '1' NOT NULL,
- group_colour varchar2(6) DEFAULT '',
+ group_rank number(5) DEFAULT '-1' NOT NULL,
+ group_colour varchar2(6) DEFAULT '' NOT NULL,
group_sig_chars number(8) DEFAULT '0' NOT NULL,
group_receive_pm number(1) DEFAULT '0' NOT NULL,
group_message_limit number(8) DEFAULT '0' NOT NULL,
@@ -654,8 +654,8 @@ END;
*/
CREATE TABLE phpbb_lang (
lang_id number(4) NOT NULL,
- lang_iso varchar2(5),
- lang_dir varchar2(30),
+ lang_iso varchar2(5) NOT NULL,
+ lang_dir varchar2(30) NOT NULL,
lang_english_name varchar2(100),
lang_local_name varchar2(255),
lang_author varchar2(255),
@@ -689,7 +689,7 @@ CREATE TABLE phpbb_log (
forum_id number(8) DEFAULT '0' NOT NULL,
topic_id number(8) DEFAULT '0' NOT NULL,
reportee_id number(8) DEFAULT '0' NOT NULL,
- log_ip varchar2(40),
+ log_ip varchar2(40) NOT NULL,
log_time number(11) NOT NULL,
log_operation clob,
log_data clob,
@@ -730,9 +730,9 @@ CREATE INDEX phpbb_log_user_id on phpbb_log (user_id)
CREATE TABLE phpbb_moderator_cache (
forum_id number(8) NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
- username varchar2(255) DEFAULT '',
+ username varchar2(255) DEFAULT '' NOT NULL,
group_id number(8) DEFAULT '0' NOT NULL,
- group_name varchar2(255) DEFAULT '',
+ group_name varchar2(255) DEFAULT '' NOT NULL,
display_on_index number(1) DEFAULT '1' NOT NULL
)
/
@@ -750,14 +750,14 @@ CREATE TABLE phpbb_modules (
module_id number(8) NOT NULL,
module_enabled number(1) DEFAULT '1' NOT NULL,
module_display number(1) DEFAULT '1' NOT NULL,
- module_name varchar2(255) DEFAULT '',
- module_class varchar2(10) DEFAULT '',
+ module_name varchar2(255) DEFAULT '' NOT NULL,
+ module_class varchar2(10) DEFAULT '' NOT NULL,
parent_id number(8) DEFAULT '0' NOT NULL,
left_id number(8) DEFAULT '0' NOT NULL,
right_id number(8) DEFAULT '0' NOT NULL,
- module_langname varchar2(255) DEFAULT '',
- module_mode varchar2(255) DEFAULT '',
- module_auth varchar2(255) DEFAULT '',
+ module_langname varchar2(255) DEFAULT '' NOT NULL,
+ module_mode varchar2(255) DEFAULT '' NOT NULL,
+ module_auth varchar2(255) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_modules PRIMARY KEY (module_id)
)
/
@@ -807,7 +807,7 @@ CREATE TABLE phpbb_poll_voters (
topic_id number(8) DEFAULT '0' NOT NULL,
poll_option_id number(4) DEFAULT '0' NOT NULL,
vote_user_id number(8) DEFAULT '0' NOT NULL,
- vote_user_ip varchar2(40)
+ vote_user_ip varchar2(40) NOT NULL
)
/
@@ -943,7 +943,7 @@ CREATE INDEX phpbb_privmsgs_root_level on phpbb_privmsgs (root_level)
CREATE TABLE phpbb_privmsgs_folder (
folder_id number(8) NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
- folder_name varchar2(255) DEFAULT '',
+ folder_name varchar2(255) DEFAULT '' NOT NULL,
pm_count number(8) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_privmsgs_folder PRIMARY KEY (folder_id)
)
@@ -976,7 +976,7 @@ CREATE TABLE phpbb_privmsgs_rules (
user_id number(8) DEFAULT '0' NOT NULL,
rule_check number(4) DEFAULT '0' NOT NULL,
rule_connection number(4) DEFAULT '0' NOT NULL,
- rule_string varchar2(255) DEFAULT '',
+ rule_string varchar2(255) DEFAULT '' NOT NULL,
rule_user_id number(8) DEFAULT '0' NOT NULL,
rule_group_id number(8) DEFAULT '0' NOT NULL,
rule_action number(4) DEFAULT '0' NOT NULL,
@@ -1029,16 +1029,16 @@ CREATE INDEX phpbb_privmsgs_to_user_id on phpbb_privmsgs_to (user_id, folder_id)
*/
CREATE TABLE phpbb_profile_fields (
field_id number(8) NOT NULL,
- field_name varchar2(255) DEFAULT '',
+ field_name varchar2(255) DEFAULT '' NOT NULL,
field_desc clob,
field_type number(8) NOT NULL,
- field_ident varchar2(20) DEFAULT '',
- field_length varchar2(20) DEFAULT '',
- field_minlen varchar2(255) DEFAULT '',
- field_maxlen varchar2(255) DEFAULT '',
- field_novalue varchar2(255) DEFAULT '',
- field_default_value varchar2(255) DEFAULT '0',
- field_validation varchar2(20) DEFAULT '',
+ field_ident varchar2(20) DEFAULT '' NOT NULL,
+ field_length varchar2(20) DEFAULT '' NOT NULL,
+ field_minlen varchar2(255) DEFAULT '' NOT NULL,
+ field_maxlen varchar2(255) DEFAULT '' NOT NULL,
+ field_novalue varchar2(255) DEFAULT '' NOT NULL,
+ field_default_value varchar2(255) DEFAULT '0' NOT NULL,
+ field_validation varchar2(20) DEFAULT '' NOT NULL,
field_required number(1) DEFAULT '0' NOT NULL,
field_show_on_reg number(1) DEFAULT '0' NOT NULL,
field_hide number(1) DEFAULT '0' NOT NULL,
@@ -1088,7 +1088,7 @@ CREATE TABLE phpbb_profile_fields_lang (
lang_id number(8) DEFAULT '0' NOT NULL,
option_id number(8) DEFAULT '0' NOT NULL,
field_type number(4) DEFAULT '0' NOT NULL,
- value varchar2(255) DEFAULT '',
+ value varchar2(255) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_profile_fields_lang PRIMARY KEY (field_id, lang_id, option_id)
)
/
@@ -1100,9 +1100,9 @@ CREATE TABLE phpbb_profile_fields_lang (
CREATE TABLE phpbb_profile_lang (
field_id number(8) DEFAULT '0' NOT NULL,
lang_id number(4) DEFAULT '0' NOT NULL,
- lang_name varchar2(255) DEFAULT '',
+ lang_name varchar2(255) DEFAULT '' NOT NULL,
lang_explain clob,
- lang_default_value varchar2(255) DEFAULT '',
+ lang_default_value varchar2(255) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_profile_lang PRIMARY KEY (field_id, lang_id)
)
/
@@ -1113,7 +1113,7 @@ CREATE TABLE phpbb_profile_lang (
*/
CREATE TABLE phpbb_ranks (
rank_id number(5) NOT NULL,
- rank_title varchar2(255),
+ rank_title varchar2(255) NOT NULL,
rank_min number(8) DEFAULT '0' NOT NULL,
rank_special number(1) DEFAULT '0',
rank_image varchar2(255),
@@ -1138,34 +1138,6 @@ END;
/*
- Table: phpbb_reports_reasons
-*/
-CREATE TABLE phpbb_reports_reasons (
- reason_id number(6) NOT NULL,
- reason_title varchar2(255) DEFAULT '',
- reason_description clob,
- reason_order number(4) DEFAULT '0' NOT NULL,
- CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
-)
-/
-
-CREATE SEQUENCE phpbb_reports_reasons_seq
-/
-
-CREATE OR REPLACE TRIGGER ai_phpbb_reports_reasons_seq
-BEFORE INSERT ON phpbb_reports_reasons
-FOR EACH ROW WHEN (
- new.reason_id IS NULL OR new.reason_id = 0
-)
-BEGIN
- SELECT phpbb_reports_reasons_seq.nextval
- INTO :new.reason_id
- FROM dual;
-END;
-/
-
-
-/*
Table: phpbb_reports
*/
CREATE TABLE phpbb_reports (
@@ -1175,7 +1147,7 @@ CREATE TABLE phpbb_reports (
user_id number(8) DEFAULT '0' NOT NULL,
user_notify number(1) DEFAULT '0' NOT NULL,
report_closed number(1) DEFAULT '0' NOT NULL,
- report_time number(10) DEFAULT '0' NOT NULL,
+ report_time number(11) DEFAULT '0' NOT NULL,
report_text clob,
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
)
@@ -1198,6 +1170,34 @@ END;
/*
+ Table: phpbb_reports_reasons
+*/
+CREATE TABLE phpbb_reports_reasons (
+ reason_id number(6) NOT NULL,
+ reason_title varchar2(255) DEFAULT '' NOT NULL,
+ reason_description clob,
+ reason_order number(4) DEFAULT '0' NOT NULL,
+ CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id)
+)
+/
+
+CREATE SEQUENCE phpbb_reports_reasons_seq
+/
+
+CREATE OR REPLACE TRIGGER ai_phpbb_reports_reasons_seq
+BEFORE INSERT ON phpbb_reports_reasons
+FOR EACH ROW WHEN (
+ new.reason_id IS NULL OR new.reason_id = 0
+)
+BEGIN
+ SELECT phpbb_reports_reasons_seq.nextval
+ INTO :new.reason_id
+ FROM dual;
+END;
+/
+
+
+/*
Table: phpbb_search_results
*/
CREATE TABLE phpbb_search_results (
@@ -1214,7 +1214,7 @@ CREATE TABLE phpbb_search_results (
Table: phpbb_search_wordlist
*/
CREATE TABLE phpbb_search_wordlist (
- word_text varchar2(50) DEFAULT '',
+ word_text varchar2(50) DEFAULT '' NOT NULL,
word_id number(8) NOT NULL,
word_common number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_search_wordlist PRIMARY KEY (word_text)
@@ -1258,14 +1258,14 @@ CREATE INDEX phpbb_search_wordmatch_word_id on phpbb_search_wordmatch (word_id)
Table: phpbb_sessions
*/
CREATE TABLE phpbb_sessions (
- session_id varchar2(32) DEFAULT '',
+ session_id varchar2(32) DEFAULT '' NOT NULL,
session_user_id number(8) DEFAULT '0' NOT NULL,
session_last_visit number(11) DEFAULT '0' NOT NULL,
session_start number(11) DEFAULT '0' NOT NULL,
session_time number(11) DEFAULT '0' NOT NULL,
- session_ip varchar2(40) DEFAULT '0',
- session_browser varchar2(150) DEFAULT '',
- session_page varchar2(200) DEFAULT '',
+ session_ip varchar2(40) DEFAULT '0' NOT NULL,
+ session_browser varchar2(150) DEFAULT '' NOT NULL,
+ session_page varchar2(200) DEFAULT '' NOT NULL,
session_viewonline number(1) DEFAULT '1' NOT NULL,
session_autologin number(1) DEFAULT '0' NOT NULL,
session_admin number(1) DEFAULT '0' NOT NULL,
@@ -1283,9 +1283,9 @@ CREATE INDEX phpbb_sessions_session_user_id on phpbb_sessions (session_user_id)
Table: phpbb_sessions_keys
*/
CREATE TABLE phpbb_sessions_keys (
- key_id varchar2(32) DEFAULT '',
+ key_id varchar2(32) DEFAULT '' NOT NULL,
user_id number(8) DEFAULT '0' NOT NULL,
- last_ip varchar2(40) DEFAULT '0',
+ last_ip varchar2(40) DEFAULT '' NOT NULL,
last_login number(11) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_sessions_keys PRIMARY KEY (key_id,user_id)
)
@@ -1300,8 +1300,8 @@ CREATE INDEX phpbb_sessions_keys_last_login on phpbb_sessions_keys (last_login)
*/
CREATE TABLE phpbb_sitelist (
site_id number(8) NOT NULL,
- site_ip varchar2(40) DEFAULT '',
- site_hostname varchar2(255) DEFAULT '',
+ site_ip varchar2(40) DEFAULT '' NOT NULL,
+ site_hostname varchar2(255) DEFAULT '' NOT NULL,
ip_exclude number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_sitelist PRIMARY KEY (site_id)
)
@@ -1360,8 +1360,8 @@ END;
*/
CREATE TABLE phpbb_styles (
style_id number(4) NOT NULL,
- style_name varchar2(255) DEFAULT '',
- style_copyright varchar2(255) DEFAULT '',
+ style_name varchar2(255) DEFAULT '' NOT NULL,
+ style_copyright varchar2(255) DEFAULT '' NOT NULL,
style_active number(1) DEFAULT '1' NOT NULL,
template_id number(4) NOT NULL,
theme_id number(4) NOT NULL,
@@ -1399,9 +1399,9 @@ CREATE INDEX phpbb_styles_imageset_id on phpbb_styles (imageset_id)
*/
CREATE TABLE phpbb_styles_template (
template_id number(4) NOT NULL,
- template_name varchar2(255),
- template_copyright varchar2(255),
- template_path varchar2(100),
+ template_name varchar2(255) NOT NULL,
+ template_copyright varchar2(255) NOT NULL,
+ template_path varchar2(100) NOT NULL,
bbcode_bitfield number(11) DEFAULT '6921' NOT NULL,
template_storedb number(1) DEFAULT '0' NOT NULL,
CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id),
@@ -1430,7 +1430,7 @@ END;
*/
CREATE TABLE phpbb_styles_template_data (
template_id number(4) NOT NULL,
- template_filename varchar2(100) DEFAULT '',
+ template_filename varchar2(100) DEFAULT '' NOT NULL,
template_included clob,
template_mtime number(11) DEFAULT '0' NOT NULL,
template_data clob
@@ -1448,9 +1448,9 @@ CREATE INDEX phpbb_sty_tmplt_dt_tmplt_fname on phpbb_styles_template_data (templ
*/
CREATE TABLE phpbb_styles_theme (
theme_id number(4) NOT NULL,
- theme_name varchar2(255) DEFAULT '',
- theme_copyright varchar2(255) DEFAULT '',
- theme_path varchar2(100) DEFAULT '',
+ theme_name varchar2(255) DEFAULT '' NOT NULL,
+ theme_copyright varchar2(255) DEFAULT '' NOT NULL,
+ theme_path varchar2(100) DEFAULT '' NOT NULL,
theme_storedb number(1) DEFAULT '0' NOT NULL,
theme_mtime number(11) DEFAULT '0' NOT NULL,
theme_data clob,
@@ -1480,86 +1480,86 @@ END;
*/
CREATE TABLE phpbb_styles_imageset (
imageset_id number(4) NOT NULL,
- imageset_name varchar2(255) DEFAULT '',
- imageset_copyright varchar2(255) DEFAULT '',
- imageset_path varchar2(100) DEFAULT '',
- site_logo varchar2(200) DEFAULT '',
- btn_post varchar2(200) DEFAULT '',
- btn_post_pm varchar2(200) DEFAULT '',
- btn_reply varchar2(200) DEFAULT '',
- btn_reply_pm varchar2(200) DEFAULT '',
- btn_locked varchar2(200) DEFAULT '',
- btn_profile varchar2(200) DEFAULT '',
- btn_pm varchar2(200) DEFAULT '',
- btn_delete varchar2(200) DEFAULT '',
- btn_info varchar2(200) DEFAULT '',
- btn_quote varchar2(200) DEFAULT '',
- btn_search varchar2(200) DEFAULT '',
- btn_edit varchar2(200) DEFAULT '',
- btn_report varchar2(200) DEFAULT '',
- btn_email varchar2(200) DEFAULT '',
- btn_www varchar2(200) DEFAULT '',
- btn_icq varchar2(200) DEFAULT '',
- btn_aim varchar2(200) DEFAULT '',
- btn_yim varchar2(200) DEFAULT '',
- btn_msnm varchar2(200) DEFAULT '',
- btn_jabber varchar2(200) DEFAULT '',
- btn_online varchar2(200) DEFAULT '',
- btn_offline varchar2(200) DEFAULT '',
- btn_friend varchar2(200) DEFAULT '',
- btn_foe varchar2(200) DEFAULT '',
- icon_unapproved varchar2(200) DEFAULT '',
- icon_reported varchar2(200) DEFAULT '',
- icon_attach varchar2(200) DEFAULT '',
- icon_post varchar2(200) DEFAULT '',
- icon_post_new varchar2(200) DEFAULT '',
- icon_post_latest varchar2(200) DEFAULT '',
- icon_post_newest varchar2(200) DEFAULT '',
- forum varchar2(200) DEFAULT '',
- forum_new varchar2(200) DEFAULT '',
- forum_locked varchar2(200) DEFAULT '',
- forum_link varchar2(200) DEFAULT '',
- sub_forum varchar2(200) DEFAULT '',
- sub_forum_new varchar2(200) DEFAULT '',
- folder varchar2(200) DEFAULT '',
- folder_moved varchar2(200) DEFAULT '',
- folder_posted varchar2(200) DEFAULT '',
- folder_new varchar2(200) DEFAULT '',
- folder_new_posted varchar2(200) DEFAULT '',
- folder_hot varchar2(200) DEFAULT '',
- folder_hot_posted varchar2(200) DEFAULT '',
- folder_hot_new varchar2(200) DEFAULT '',
- folder_hot_new_posted varchar2(200) DEFAULT '',
- folder_locked varchar2(200) DEFAULT '',
- folder_locked_posted varchar2(200) DEFAULT '',
- folder_locked_new varchar2(200) DEFAULT '',
- folder_locked_new_posted varchar2(200) DEFAULT '',
- folder_sticky varchar2(200) DEFAULT '',
- folder_sticky_posted varchar2(200) DEFAULT '',
- folder_sticky_new varchar2(200) DEFAULT '',
- folder_sticky_new_posted varchar2(200) DEFAULT '',
- folder_announce varchar2(200) DEFAULT '',
- folder_announce_posted varchar2(200) DEFAULT '',
- folder_announce_new varchar2(200) DEFAULT '',
- folder_announce_new_posted varchar2(200) DEFAULT '',
- folder_global varchar2(200) DEFAULT '',
- folder_global_posted varchar2(200) DEFAULT '',
- folder_global_new varchar2(200) DEFAULT '',
- folder_global_new_posted varchar2(200) DEFAULT '',
- poll_left varchar2(200) DEFAULT '',
- poll_center varchar2(200) DEFAULT '',
- poll_right varchar2(200) DEFAULT '',
- attach_progress_bar varchar2(200) DEFAULT '',
- user_icon1 varchar2(200) DEFAULT '',
- user_icon2 varchar2(200) DEFAULT '',
- user_icon3 varchar2(200) DEFAULT '',
- user_icon4 varchar2(200) DEFAULT '',
- user_icon5 varchar2(200) DEFAULT '',
- user_icon6 varchar2(200) DEFAULT '',
- user_icon7 varchar2(200) DEFAULT '',
- user_icon8 varchar2(200) DEFAULT '',
- user_icon9 varchar2(200) DEFAULT '',
- user_icon10 varchar2(200) DEFAULT '',
+ imageset_name varchar2(255) DEFAULT '' NOT NULL,
+ imageset_copyright varchar2(255) DEFAULT '' NOT NULL,
+ imageset_path varchar2(100) DEFAULT '' NOT NULL,
+ site_logo varchar2(200) DEFAULT '' NOT NULL,
+ btn_post varchar2(200) DEFAULT '' NOT NULL,
+ btn_post_pm varchar2(200) DEFAULT '' NOT NULL,
+ btn_reply varchar2(200) DEFAULT '' NOT NULL,
+ btn_reply_pm varchar2(200) DEFAULT '' NOT NULL,
+ btn_locked varchar2(200) DEFAULT '' NOT NULL,
+ btn_profile varchar2(200) DEFAULT '' NOT NULL,
+ btn_pm varchar2(200) DEFAULT '' NOT NULL,
+ btn_delete varchar2(200) DEFAULT '' NOT NULL,
+ btn_info varchar2(200) DEFAULT '' NOT NULL,
+ btn_quote varchar2(200) DEFAULT '' NOT NULL,
+ btn_search varchar2(200) DEFAULT '' NOT NULL,
+ btn_edit varchar2(200) DEFAULT '' NOT NULL,
+ btn_report varchar2(200) DEFAULT '' NOT NULL,
+ btn_email varchar2(200) DEFAULT '' NOT NULL,
+ btn_www varchar2(200) DEFAULT '' NOT NULL,
+ btn_icq varchar2(200) DEFAULT '' NOT NULL,
+ btn_aim varchar2(200) DEFAULT '' NOT NULL,
+ btn_yim varchar2(200) DEFAULT '' NOT NULL,
+ btn_msnm varchar2(200) DEFAULT '' NOT NULL,
+ btn_jabber varchar2(200) DEFAULT '' NOT NULL,
+ btn_online varchar2(200) DEFAULT '' NOT NULL,
+ btn_offline varchar2(200) DEFAULT '' NOT NULL,
+ btn_friend varchar2(200) DEFAULT '' NOT NULL,
+ btn_foe varchar2(200) DEFAULT '' NOT NULL,
+ icon_unapproved varchar2(200) DEFAULT '' NOT NULL,
+ icon_reported varchar2(200) DEFAULT '' NOT NULL,
+ icon_attach varchar2(200) DEFAULT '' NOT NULL,
+ icon_post varchar2(200) DEFAULT '' NOT NULL,
+ icon_post_new varchar2(200) DEFAULT '' NOT NULL,
+ icon_post_latest varchar2(200) DEFAULT '' NOT NULL,
+ icon_post_newest varchar2(200) DEFAULT '' NOT NULL,
+ forum varchar2(200) DEFAULT '' NOT NULL,
+ forum_new varchar2(200) DEFAULT '' NOT NULL,
+ forum_locked varchar2(200) DEFAULT '' NOT NULL,
+ forum_link varchar2(200) DEFAULT '' NOT NULL,
+ sub_forum varchar2(200) DEFAULT '' NOT NULL,
+ sub_forum_new varchar2(200) DEFAULT '' NOT NULL,
+ folder varchar2(200) DEFAULT '' NOT NULL,
+ folder_moved varchar2(200) DEFAULT '' NOT NULL,
+ folder_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_new varchar2(200) DEFAULT '' NOT NULL,
+ folder_new_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_hot varchar2(200) DEFAULT '' NOT NULL,
+ folder_hot_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_hot_new varchar2(200) DEFAULT '' NOT NULL,
+ folder_hot_new_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_locked varchar2(200) DEFAULT '' NOT NULL,
+ folder_locked_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_locked_new varchar2(200) DEFAULT '' NOT NULL,
+ folder_locked_new_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_sticky varchar2(200) DEFAULT '' NOT NULL,
+ folder_sticky_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_sticky_new varchar2(200) DEFAULT '' NOT NULL,
+ folder_sticky_new_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_announce varchar2(200) DEFAULT '' NOT NULL,
+ folder_announce_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_announce_new varchar2(200) DEFAULT '' NOT NULL,
+ folder_announce_new_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_global varchar2(200) DEFAULT '' NOT NULL,
+ folder_global_posted varchar2(200) DEFAULT '' NOT NULL,
+ folder_global_new varchar2(200) DEFAULT '' NOT NULL,
+ folder_global_new_posted varchar2(200) DEFAULT '' NOT NULL,
+ poll_left varchar2(200) DEFAULT '' NOT NULL,
+ poll_center varchar2(200) DEFAULT '' NOT NULL,
+ poll_right varchar2(200) DEFAULT '' NOT NULL,
+ attach_progress_bar varchar2(200) DEFAULT '' NOT NULL,
+ user_icon1 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon2 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon3 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon4 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon5 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon6 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon7 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon8 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon9 varchar2(200) DEFAULT '' NOT NULL,
+ user_icon10 varchar2(200) DEFAULT '' NOT NULL,
CONSTRAINT pk_phpbb_styles_imageset PRIMARY KEY (imageset_id),
CONSTRAINT u_imageset_name UNIQUE (imageset_name)
)
@@ -1586,7 +1586,7 @@ END;
*/
CREATE TABLE phpbb_topics (
topic_id number(8) NOT NULL,
- forum_id number(8) DEFAULT '0' NOT NULL,
+ forum_id number(5) DEFAULT '0' NOT NULL,
icon_id number(4) DEFAULT '1' NOT NULL,
topic_attachment number(1) DEFAULT '0' NOT NULL,
topic_approved number(1) DEFAULT '1' NOT NULL,
@@ -1716,7 +1716,7 @@ CREATE TABLE phpbb_users (
user_type number(1) DEFAULT '0' NOT NULL,
group_id number(8) DEFAULT '3' NOT NULL,
user_permissions clob NULL,
- user_perm_from number(8) DEFAULT '0' NULL,
+ user_perm_from number(8) DEFAULT '0' NOT NULL,
user_ip varchar2(40) DEFAULT '' NOT NULL,
user_regdate number(11) DEFAULT '0' NOT NULL,
username varchar2(255) DEFAULT '' NOT NULL,
@@ -1728,14 +1728,14 @@ CREATE TABLE phpbb_users (
user_lastvisit number(11) DEFAULT '0' NOT NULL,
user_lastmark number(11) DEFAULT '0' NOT NULL,
user_lastpost_time number(11) DEFAULT '0' NOT NULL,
- user_lastpage varchar2(200) DEFAULT '',
+ user_lastpage varchar2(200) DEFAULT '' NOT NULL,
user_last_confirm_key varchar2(10) DEFAULT '' NULL,
user_warnings number(4) DEFAULT '0' NULL,
user_last_warning number(11) DEFAULT '0' NULL,
user_login_attempts number(4) DEFAULT '0' NULL,
user_posts number(8) DEFAULT '0' NOT NULL,
user_lang varchar2(30) DEFAULT '' NOT NULL,
- user_timezone number(5, 2) DEFAULT '1' NOT NULL,
+ user_timezone number(5, 2) DEFAULT '0' NOT NULL,
user_dst number(1) DEFAULT '0' NOT NULL,
user_dateformat varchar2(30) DEFAULT 'd M Y H:i' NOT NULL,
user_style number(4) DEFAULT '0' NOT NULL,
@@ -1767,7 +1767,7 @@ CREATE TABLE phpbb_users (
user_avatar_width number(4) DEFAULT '0' NOT NULL,
user_avatar_height number(4) DEFAULT '0' NOT NULL,
user_sig clob NULL,
- user_sig_bbcode_uid varchar2(5) DEFAULT '' NULLL,
+ user_sig_bbcode_uid varchar2(5) DEFAULT '' NULL,
user_sig_bbcode_bitfield number(11) DEFAULT '0' NULL,
user_from varchar2(100) DEFAULT '' NULL,
user_icq varchar2(15) DEFAULT '' NULL,
@@ -1841,8 +1841,8 @@ END;
*/
CREATE TABLE phpbb_words (
word_id number(8) NOT NULL,
- word varchar2(100),
- replacement varchar2(100),
+ word varchar2(255) NOT NULL,
+ replacement varchar2(255) NOT NULL,
CONSTRAINT pk_phpbb_words PRIMARY KEY (word_id)
)
/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index f3d1edd432..08cb5886b4 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -83,7 +83,7 @@ CREATE TABLE phpbb_auth_roles (
role_name varchar(255) DEFAULT '' NOT NULL,
role_description TEXT,
role_type varchar(10) DEFAULT '' NOT NULL,
- role_order INT4 DEFAULT '0' NOT NULL,
+ role_order INT2 DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id)
);
@@ -120,7 +120,7 @@ CREATE SEQUENCE phpbb_banlist_seq;
CREATE TABLE phpbb_banlist (
ban_id INT4 DEFAULT nextval('phpbb_banlist_seq'),
- ban_userid INT4 DEFAULT 0 NOT NULL,
+ ban_userid INT4 DEFAULT '0' NOT NULL,
ban_ip varchar(40) DEFAULT '' NOT NULL,
ban_email varchar(100) DEFAULT '' NOT NULL,
ban_start INT4 DEFAULT '0' NOT NULL,
@@ -206,8 +206,8 @@ CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
/* Table: phpbb_confirm */
CREATE TABLE phpbb_confirm (
- confirm_id varchar(32) DEFAULT '' NOT NULL,
- session_id varchar(32) DEFAULT '' NOT NULL,
+ confirm_id char(32) DEFAULT '' NOT NULL,
+ session_id char(32) DEFAULT '' NOT NULL,
confirm_type INT2 DEFAULT '0' NOT NULL,
code varchar(8) DEFAULT '' NOT NULL,
PRIMARY KEY (session_id,confirm_id)
@@ -387,7 +387,7 @@ CREATE SEQUENCE phpbb_groups_seq;
CREATE TABLE phpbb_groups (
group_id INT4 DEFAULT nextval('phpbb_groups_seq'),
group_type INT2 DEFAULT '1' NOT NULL,
- group_name varchar(255) NOT NULL,
+ group_name varchar(255) DEFAULT '' NOT NULL,
group_desc TEXT,
group_desc_bitfield INT4 DEFAULT '0' NOT NULL,
group_desc_uid varchar(5) DEFAULT '' NOT NULL,
@@ -717,7 +717,7 @@ CREATE TABLE phpbb_profile_fields (
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 '0' NOT NULL,
+ field_default_value varchar(255) DEFAULT '0' NOT NULL,
field_validation varchar(20) DEFAULT '' NOT NULL,
field_required INT2 DEFAULT '0' NOT NULL,
field_show_on_reg INT2 DEFAULT '0' NOT NULL,
@@ -791,17 +791,6 @@ CREATE TABLE phpbb_ranks (
-/* Table: phpbb_reports_reasons */
-CREATE SEQUENCE phpbb_reports_reasons_seq;
-
-CREATE TABLE phpbb_reports_reasons (
- reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'),
- reason_title varchar(255) DEFAULT '' NOT NULL,
- reason_description TEXT,
- reason_order INT2 DEFAULT '0' NOT NULL,
- PRIMARY KEY (reason_id)
-);
-
@@ -826,6 +815,18 @@ CREATE TABLE phpbb_reports (
+/* Table: phpbb_reports_reasons */
+CREATE SEQUENCE phpbb_reports_reasons_seq;
+
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_seq'),
+ reason_title varchar(255) DEFAULT '' NOT NULL,
+ reason_description TEXT,
+ reason_order INT2 DEFAULT '0' NOT NULL,
+ PRIMARY KEY (reason_id)
+);
+
+
/* Table: phpbb_search_results */
CREATE TABLE phpbb_search_results (
@@ -871,7 +872,7 @@ CREATE TABLE phpbb_sessions (
session_start INT4 DEFAULT '0' NOT NULL,
session_time INT4 DEFAULT '0' NOT NULL,
session_ip varchar(40) DEFAULT '0' NOT NULL,
- session_browser varchar(150) DEFAULT '' NULL,
+ session_browser varchar(150) DEFAULT '' NOT NULL,
session_page varchar(200) DEFAULT '' NOT NULL,
session_viewonline INT2 DEFAULT '1' NOT NULL,
session_autologin INT2 DEFAULT '0' NOT NULL,
@@ -888,7 +889,7 @@ CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
CREATE TABLE phpbb_sessions_keys (
key_id varchar(32) DEFAULT '' NOT NULL,
user_id INT4 DEFAULT '0' NOT NULL,
- last_ip varchar(40) DEFAULT '0' NOT NULL,
+ last_ip varchar(40) DEFAULT '' NOT NULL,
last_login INT4 DEFAULT '0' NOT NULL,
PRIMARY KEY (key_id,user_id)
);
@@ -1218,7 +1219,7 @@ CREATE TABLE phpbb_users (
user_type INT2 DEFAULT '0' NOT NULL,
group_id INT4 DEFAULT '3' NOT NULL,
user_permissions TEXT NULL,
- user_perm_from INT4 DEFAULT '0' NULL,
+ user_perm_from INT4 DEFAULT '0' NOT NULL,
user_ip varchar(40) DEFAULT '' NOT NULL,
user_regdate INT4 DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '' NOT NULL,
@@ -1234,7 +1235,7 @@ CREATE TABLE phpbb_users (
user_last_confirm_key varchar(10) DEFAULT '' NULL,
user_warnings INT2 DEFAULT '0' NULL,
user_last_warning INT4 DEFAULT '0' NULL,
- user_login_attempts INT4 DEFAULT '0' NULL,
+ user_login_attempts INT2 DEFAULT '0' NULL,
user_posts INT4 DEFAULT '0' NOT NULL,
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL,
@@ -1249,10 +1250,10 @@ CREATE TABLE phpbb_users (
user_message_rules INT2 DEFAULT '0' NOT NULL,
user_full_folder INT4 DEFAULT '-3' NOT NULL,
user_emailtime INT4 DEFAULT '0' NOT NULL,
- user_topic_show_days INT4 DEFAULT '0' NOT NULL,
+ user_topic_show_days INT2 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 INT4 DEFAULT '0' NOT NULL,
+ user_post_show_days INT2 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 INT2 DEFAULT '0' NOT NULL,
@@ -1318,8 +1319,8 @@ CREATE SEQUENCE phpbb_words_seq;
CREATE TABLE phpbb_words (
word_id INT4 DEFAULT nextval('phpbb_words_seq'),
- word varchar(100) NOT NULL,
- replacement varchar(100) NOT NULL,
+ word varchar(255) NOT NULL,
+ replacement varchar(255) NOT NULL,
PRIMARY KEY (word_id)
);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index fdd5b41791..8731470548 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -161,12 +161,15 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('pass_complex', '.*
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_edit_time', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_boxes', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_occlude', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_occlude', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_occlude_noise_pixel', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_occlude_noise_line', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_entropy', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_entropy_noise_pixel', '2');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_entropy_noise_line', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_entropy', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_entropy_noise_pixel', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_entropy_noise_line', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('policy_3dbitmap', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 2496cf8e84..97f4926aa6 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -38,7 +38,7 @@ CREATE TABLE phpbb_auth_groups (
forum_id mediumint(8) NOT NULL DEFAULT '0',
auth_option_id mediumint(8) NOT NULL DEFAULT '0',
auth_role_id mediumint(8) NOT NULL DEFAULT '0',
- auth_setting tinyint(4) NOT NULL DEFAULT '0'
+ auth_setting tinyint(2) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_auth_groups_group_id on phpbb_auth_groups (group_id);
@@ -60,10 +60,10 @@ CREATE INDEX phpbb_auth_options_auth_option on phpbb_auth_options (auth_option);
# Table: phpbb_auth_roles
CREATE TABLE phpbb_auth_roles (
role_id INTEGER PRIMARY KEY NOT NULL,
- role_name varchar(50) NOT NULL DEFAULT '',
+ role_name varchar(255) NOT NULL DEFAULT '',
role_description text(65535),
role_type varchar(10) NOT NULL DEFAULT '',
- role_order mediumint(8) NOT NULL DEFAULT '0'
+ role_order smallint(4) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_auth_roles_role_type on phpbb_auth_roles (role_type);
@@ -85,7 +85,7 @@ CREATE TABLE phpbb_auth_users (
forum_id mediumint(8) NOT NULL DEFAULT '0',
auth_option_id mediumint(8) NOT NULL DEFAULT '0',
auth_role_id mediumint(8) NOT NULL DEFAULT '0',
- auth_setting tinyint(4) NOT NULL DEFAULT '0'
+ auth_setting tinyint(2) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_auth_users_user_id on phpbb_auth_users (user_id);
@@ -170,7 +170,7 @@ CREATE INDEX phpbb_config_is_dynamic on phpbb_config (is_dynamic);
CREATE TABLE phpbb_confirm (
confirm_id char(32) NOT NULL DEFAULT '',
session_id char(32) NOT NULL DEFAULT '',
- confirm_type INTEGER NOT NULL DEFAULT '0',
+ confirm_type tinyint(3) NOT NULL DEFAULT '0',
code varchar(8) NOT NULL DEFAULT '',
PRIMARY KEY (session_id, confirm_id)
);
@@ -297,7 +297,7 @@ CREATE INDEX phpbb_forums_watch_notify_status on phpbb_forums_watch (notify_stat
CREATE TABLE phpbb_groups (
group_id INTEGER PRIMARY KEY NOT NULL,
group_type tinyint(4) NOT NULL DEFAULT '1',
- group_name varchar(255) NOT NULL,
+ group_name varchar(255) NOT NULL DEFAULT '',
group_desc text(65535),
group_desc_bitfield int(11) NOT NULL DEFAULT '0',
group_desc_uid varchar(5) NOT NULL DEFAULT '',
@@ -595,15 +595,6 @@ CREATE TABLE phpbb_ranks (
);
-# Table: phpbb_reports_reasons
-CREATE TABLE phpbb_reports_reasons (
- reason_id INTEGER PRIMARY KEY NOT NULL,
- reason_title varchar(255) NOT NULL DEFAULT '',
- reason_description text(65535),
- reason_order tinyint(4) NOT NULL DEFAULT '0'
-);
-
-
# Table: phpbb_reports
CREATE TABLE phpbb_reports (
report_id INTEGER PRIMARY KEY NOT NULL,
@@ -612,11 +603,20 @@ CREATE TABLE phpbb_reports (
user_id mediumint(8) NOT NULL DEFAULT '0',
user_notify tinyint(1) NOT NULL DEFAULT '0',
report_closed tinyint(1) NOT NULL DEFAULT '0',
- report_time int(10) NOT NULL DEFAULT '0',
+ report_time int(11) NOT NULL DEFAULT '0',
report_text mediumtext(16777215)
);
+# Table: phpbb_reports_reasons
+CREATE TABLE phpbb_reports_reasons (
+ reason_id INTEGER PRIMARY KEY NOT NULL,
+ reason_title varchar(255) NOT NULL DEFAULT '',
+ reason_description text(65535),
+ reason_order tinyint(4) NOT NULL DEFAULT '0'
+);
+
+
# Table: phpbb_search_results
CREATE TABLE phpbb_search_results (
search_key varchar(32) NOT NULL DEFAULT '',
@@ -630,7 +630,7 @@ CREATE TABLE phpbb_search_results (
# Table: phpbb_search_wordlist
CREATE TABLE phpbb_search_wordlist (
word_text varchar(50) NOT NULL DEFAULT '',
- word_id mediumint NOT NULL,
+ word_id mediumint(8) NOT NULL,
word_common tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (word_text)
);
@@ -674,7 +674,7 @@ CREATE TABLE phpbb_sessions_keys (
user_id mediumint(8) NOT NULL DEFAULT '0',
last_ip varchar(40) NOT NULL DEFAULT '',
last_login int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (key_id,user_id)
+ PRIMARY KEY (key_id, user_id)
);
CREATE INDEX phpbb_sessions_keys_last_login on phpbb_sessions_keys (last_login);
@@ -1021,8 +1021,8 @@ CREATE TABLE phpbb_warnings (
# Table: phpbb_words
CREATE TABLE phpbb_words (
word_id INTEGER PRIMARY KEY NOT NULL,
- word char(100) NOT NULL,
- replacement char(100) NOT NULL
+ word varchar(255) NOT NULL,
+ replacement varchar(255) NOT NULL
);
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 186b531dca..673e057a6e 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -90,9 +90,12 @@ $lang = array_merge($lang, array(
'CAPTCHA_OPTIONS' => 'Captcha Options',
'CAPTCHA_OCCLUDE' => 'Occlude',
'CAPTCHA_ENTROPY' => 'Entropy',
+ 'CAPTCHA_SHAPE' => 'Shape',
'CAPTCHA_3DBITMAP' => '3D Bitmap',
'ENTROPY_NOISE_PIXEL' => 'Entropy pixel noise',
'ENTROPY_NOISE_LINE' => 'Entropy line noise',
+ 'SHAPE_NOISE_PIXEL' => 'Shape pixel noise',
+ 'SHAPE_NOISE_LINE' => 'Shape line noise',
'OCCLUDE_NOISE_PIXEL' => 'Occlude pixel noise',
'OCCLUDE_NOISE_LINE' => 'Occlude line noise',
'HEAVY' => 'Heavy',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index c002421e78..e4f34aefb3 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -49,6 +49,13 @@ $lang = array_merge($lang, array(
',
));
+$lang = array_merge($lang, array(
+ 'CAPTCHA_LINE_1' => 'Enter the code on',
+ 'CAPTCHA_LINE_2' => ' the right which ',
+ 'CAPTCHA_LINE_3' => 'matches the image',
+ 'CAPTCHA_LINE_4' => ' on the left ',
+));
+
// Common language entries
$lang = array_merge($lang, array(
'ACCOUNT_ACTIVE' => 'Your account has now been activated. Thank you for registering',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 5363c9a7fa..a4975f8d6e 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -131,7 +131,7 @@ switch ($mode)
'WHERE' => 'u.user_id IN (' . implode(', ', array_unique(array_merge($admin_id_ary, $mod_id_ary))) . ')
AND u.group_id = g.group_id',
- 'GROUP_BY' => 'g.group_name ASC, u.username ASC'
+ 'ORDER_BY' => 'g.group_name ASC, u.username ASC'
));
$result = $db->sql_query($sql);
diff --git a/phpBB/posting.php b/phpBB/posting.php
index df1d8caf62..e498c1b989 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -628,7 +628,7 @@ if ($submit || $preview || $refresh)
$confirm_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if (strcasecmp($confirm_row['code'], $confirm_code) == 0)
+ if (strcasecmp($confirm_row['code'], $confirm_code) !== 0)
{
$error[] = $user->lang['CONFIRM_CODE_WRONG'];
}