we enter a brave new world...

- fix schema data so that it can now be used
- replace the current system of packaging schemas with phpBB with a new system that dynamically generates the schemas on the fly
- give the db tools package the power to create databases


git-svn-id: file:///svn/phpbb/trunk@8318 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2008-01-10 21:46:46 +00:00
parent b9b46a8b45
commit 35f59ceb9a
10 changed files with 216 additions and 9368 deletions

View file

@ -621,38 +621,7 @@ class phpbb_db_tools
{ {
$column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'], $column_length); $column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'], $column_length);
} }
else
{
if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule']))
{
switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][0])
{
case 'div':
$column_length /= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['rule'][1];
$column_length = ceil($column_length);
$column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
break;
}
}
if (isset($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit']))
{
switch ($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][0])
{
case 'mult':
$column_length *= $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][1];
if ($column_length > $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][2])
{
$column_type = $this->dbms_type_map[$this->sql_layer][$orig_column_type . ':']['limit'][3];
}
else
{
$column_type = sprintf($this->dbms_type_map[$this->sql_layer][$orig_column_type . ':'][0], $column_length);
}
break;
}
}
}
$orig_column_type .= ':'; $orig_column_type .= ':';
} }
else else
@ -689,6 +658,12 @@ class phpbb_db_tools
$sql .= ' COLLATE UNICODE'; $sql .= ' COLLATE UNICODE';
} }
$return_array['auto_increment'] = false;
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{
$return_array['auto_increment'] = true;
}
break; break;
case 'mssql': case 'mssql':
@ -709,6 +684,8 @@ class phpbb_db_tools
} }
} }
$return_array['textimage'] = $column_type === '[text]';
$sql .= 'NOT NULL'; $sql .= 'NOT NULL';
$sql_default .= 'NOT NULL'; $sql_default .= 'NOT NULL';
@ -750,6 +727,12 @@ class phpbb_db_tools
{ {
$sql .= ($column_data[1] === '') ? '' : 'NOT NULL'; $sql .= ($column_data[1] === '') ? '' : 'NOT NULL';
} }
$return_array['auto_increment'] = false;
if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{
$return_array['auto_increment'] = true;
}
break; break;
case 'postgres': case 'postgres':
@ -757,9 +740,11 @@ class phpbb_db_tools
$sql .= " {$column_type} "; $sql .= " {$column_type} ";
$return_array['auto_increment'] = false;
if (isset($column_data[2]) && $column_data[2] == 'auto_increment') if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{ {
$default_val = "nextval('{$table_name}_seq')"; $default_val = "nextval('{$table_name}_seq')";
$return_array['auto_increment'] = true;
} }
else if (!is_null($column_data[1])) else if (!is_null($column_data[1]))
{ {
@ -781,9 +766,11 @@ class phpbb_db_tools
break; break;
case 'sqlite': case 'sqlite':
$return_array['primary_key_set'] = false;
if (isset($column_data[2]) && $column_data[2] == 'auto_increment') if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{ {
$sql .= ' INTEGER PRIMARY KEY'; $sql .= ' INTEGER PRIMARY KEY';
$return_array['primary_key_set'] = true;
} }
else else
{ {
@ -795,7 +782,7 @@ class phpbb_db_tools
break; break;
case 'db2': case 'db2':
$sql .= "\t{$column_name} {$column_type} NOT NULL"; $sql .= " {$column_type} NOT NULL";
if (isset($column_data[2]) && $column_data[2] == 'auto_increment') if (isset($column_data[2]) && $column_data[2] == 'auto_increment')
{ {
@ -812,7 +799,6 @@ class phpbb_db_tools
$sql .= " DEFAULT '{$column_data[1]}'"; $sql .= " DEFAULT '{$column_data[1]}'";
} }
} }
$sql .= ",\n";
break; break;
} }
@ -821,6 +807,185 @@ class phpbb_db_tools
return $return_array; return $return_array;
} }
function sql_create_table($table_name, $table_data)
{
// holds the DDL for a column
$columns = array();
$table_sql = 'CREATE TABLE ' . $table_name . ' (' . "\n";
// Determine if we have created a PRIMARY KEY in the earliest
$primary_key_gen = false;
// Determine if the table must be created with TEXTIMAGE
$create_textimage = false;
// Determine if the table requires a sequence
$create_sequence = false;
foreach ($table_data['COLUMNS'] as $column_name => $column_data)
{
// here lies an array, filled with information compiled on the column's data
$prepared_column = $this->sql_prepare_column_data($table_name, $column_name, $column_data);
// here we add the definition of the new column to the list of columns
$columns[] = "\t {$column_name} " . $prepared_column['column_type_sql'];
// see if we have found a primary key set due to a column definition,
// if we have found it, we can stop looking
if (!$primary_key_gen)
{
$primary_key_gen = isset($prepared_column['primary_key_set']) && $prepared_column['primary_key_set'];
}
// create textimage DDL based off of the existance of certain column types
if (!$create_textimage)
{
$create_textimage = isset($prepared_column['textimage']) && $prepared_column['textimage'];
}
// create sequence DDL based off of the existance of auto incrementing columns
if (!$create_sequence && isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'])
{
$create_sequence = $column_name;
}
}
// this makes up all the columns in the create table statement
$table_sql .= implode(",\n", $columns);
switch ($this->sql_layer)
{
case 'firebird':
$table_sql .= "\n);";
$statements[] = $table_sql;
break;
case 'mssql':
$table_sql .= "\n) ON [PRIMARY]" . (($create_textimage) ? ' TEXTIMAGE_ON [PRIMARY]' : '');
$statements[] = $table_sql;
break;
}
// we have yet to create a primary key for this table,
// this means that we can add the one we really wanted instead
if (!$primary_key_gen)
{
// Write primary key
if (isset($table_data['PRIMARY_KEY']))
{
if (!is_array($table_data['PRIMARY_KEY']))
{
$table_data['PRIMARY_KEY'] = array($table_data['PRIMARY_KEY']);
}
switch ($this->sql_layer)
{
case 'mysql':
case 'postgres':
case 'db2':
case 'sqlite':
$table_sql .= ",\n\t PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ')';
break;
case 'firebird':
case 'mssql':
$primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
foreach ($primary_key_stmts as $pk_stmt)
{
$statements[] = $pk_stmt;
}
break;
case 'oracle':
$table_sql .= ",\n\t CONSTRAINT pk_{$table_name} PRIMARY KEY (" . implode(', ', $table_data['PRIMARY_KEY']) . ')';
break;
}
}
}
// close the table
switch ($this->sql_layer)
{
case 'mysql':
// make sure the table is in UTF-8 mode
$table_sql .= "\n) CHARACTER SET `utf8` COLLATE `utf8_bin`;";
$statements[] = $table_sql;
break;
case 'postgres':
// do we need to add a sequence for auto incrementing columns?
if ($create_sequence)
{
$statements[] = "CREATE SEQUENCE {$table_name}_seq;";
}
$table_sql .= "\n);";
$statements[] = $table_sql;
break;
case 'db2':
case 'sqlite':
$table_sql .= "\n);";
$statements[] = $table_sql;
break;
case 'oracle':
$table_sql .= "\n);";
$statements[] = $table_sql;
// do we need to add a sequence and a tigger for auto incrementing columns?
if ($create_sequence)
{
// create the actual sequence
$statements[] = "CREATE SEQUENCE {$table_name}_seq";
// the trigger is the mechanism by which we increment the counter
$trigger = "CREATE OR REPLACE TRIGGER t_{$table_name}\n";
$trigger .= "BEFORE INSERT ON {$table_name}\n";
$trigger .= "FOR EACH ROW WHEN (\n";
$trigger .= "\tnew.{$create_sequence} IS NULL OR new.{$create_sequence} = 0\n";
$trigger .= ")\n";
$trigger .= "BEGIN\n";
$trigger .= "\tSELECT {$table_name}_seq.nextval\n";
$trigger .= "\tINTO :new.{$create_sequence}\n";
$trigger .= "\tFROM dual\n";
$trigger .= "END;";
$statements[] = $trigger;
}
break;
case 'firebird':
if ($create_sequence)
{
$statements[] = "CREATE SEQUENCE {$table_name}_seq;";
}
break;
}
// Write Keys
if (isset($table_data['KEYS']))
{
foreach ($table_data['KEYS'] as $key_name => $key_data)
{
if (!is_array($key_data[1]))
{
$key_data[1] = array($key_data[1]);
}
$key_stmts = ($key_data[0] == 'UNIQUE') ? $this->sql_create_unique_index($table_name, $key_name, $key_data[1]) : $this->sql_create_index($table_name, $key_name, $key_data[1]);
foreach ($key_stmts as $key_stmt)
{
$statements[] = $key_stmt;
}
}
}
return $this->_sql_run_sql($statements);
}
/** /**
* Add new column * Add new column
*/ */

View file

@ -1166,24 +1166,31 @@ class install_install extends module
$remove_remarks = $available_dbms[$data['dbms']]['COMMENTS']; $remove_remarks = $available_dbms[$data['dbms']]['COMMENTS'];
$delimiter = $available_dbms[$data['dbms']]['DELIM']; $delimiter = $available_dbms[$data['dbms']]['DELIM'];
$sql_query = @file_get_contents($dbms_schema);
$sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); include($phpbb_root_path . 'includes/db/db_tools.php');
include($phpbb_root_path . 'install/schemas/schema_data.php');
$remove_remarks($sql_query); $tools = new phpbb_db_tools($db);
$sql_query = split_sql_file($sql_query, $delimiter); // we must do this so that we can handle the errors
$tools->return_statements = true;
foreach ($sql_query as $sql) foreach ($schema_data as $table_name => $table_data)
{ {
//$sql = trim(str_replace('|', ';', $sql)); // Change prefix
if (!$db->sql_query($sql)) $table_name = preg_replace('#phpbb_#i', $data['table_prefix'], $table_name);
$statements = $tools->sql_create_table($table_name, $table_data);
foreach ($statements as $sql)
{ {
$error = $db->sql_error(); if (!$db->sql_query($sql))
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); {
$error = $db->sql_error();
$this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__);
}
} }
} }
unset($sql_query);
// Ok tables have been built, let's fill in the basic information // Ok tables have been built, let's fill in the basic information
$sql_query = file_get_contents('schemas/schema_data.sql'); $sql_query = file_get_contents('schemas/schema_data.sql');

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,999 +0,0 @@
#
# $Id$
#
# Table: 'phpbb_attachments'
CREATE TABLE phpbb_attachments (
attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
post_msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
in_message tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
is_orphan tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
physical_filename varchar(255) DEFAULT '' NOT NULL,
real_filename varchar(255) DEFAULT '' NOT NULL,
download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
attach_comment text NOT NULL,
extension varchar(100) DEFAULT '' NOT NULL,
mimetype varchar(100) DEFAULT '' NOT NULL,
filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
filetime int(11) UNSIGNED DEFAULT '0' NOT NULL,
thumbnail tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (attach_id),
KEY filetime (filetime),
KEY post_msg_id (post_msg_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id),
KEY is_orphan (is_orphan)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_groups'
CREATE TABLE phpbb_acl_groups (
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
KEY group_id (group_id),
KEY auth_opt_id (auth_option_id),
KEY auth_role_id (auth_role_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_options'
CREATE TABLE phpbb_acl_options (
auth_option_id mediumint(8) UNSIGNED NOT NULL auto_increment,
auth_option varchar(50) DEFAULT '' NOT NULL,
is_global tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
is_local tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
founder_only tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (auth_option_id),
KEY auth_option (auth_option)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_roles'
CREATE TABLE phpbb_acl_roles (
role_id mediumint(8) UNSIGNED NOT NULL auto_increment,
role_name varchar(255) DEFAULT '' NOT NULL,
role_description text NOT NULL,
role_type varchar(10) DEFAULT '' NOT NULL,
role_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id),
KEY role_type (role_type),
KEY role_order (role_order)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_roles_data'
CREATE TABLE phpbb_acl_roles_data (
role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (role_id, auth_option_id),
KEY ath_op_id (auth_option_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_acl_users'
CREATE TABLE phpbb_acl_users (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_role_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
auth_setting tinyint(2) DEFAULT '0' NOT NULL,
KEY user_id (user_id),
KEY auth_option_id (auth_option_id),
KEY auth_role_id (auth_role_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ban_userid mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ban_ip varchar(40) DEFAULT '' NOT NULL,
ban_email varchar(100) DEFAULT '' NOT NULL,
ban_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
ban_end int(11) UNSIGNED DEFAULT '0' NOT NULL,
ban_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
ban_reason varchar(255) DEFAULT '' NOT NULL,
ban_give_reason varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (ban_id),
KEY ban_end (ban_end),
KEY ban_user (ban_userid, ban_exclude),
KEY ban_email (ban_email, ban_exclude),
KEY ban_ip (ban_ip, ban_exclude)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes (
bbcode_id tinyint(3) DEFAULT '0' NOT NULL,
bbcode_tag varchar(16) DEFAULT '' NOT NULL,
bbcode_helpline varchar(255) DEFAULT '' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_match text NOT NULL,
bbcode_tpl mediumtext NOT NULL,
first_pass_match mediumtext NOT NULL,
first_pass_replace mediumtext NOT NULL,
second_pass_match mediumtext NOT NULL,
second_pass_replace mediumtext NOT NULL,
PRIMARY KEY (bbcode_id),
KEY display_on_post (display_on_posting)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# 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,
PRIMARY KEY (topic_id, user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_bots'
CREATE TABLE phpbb_bots (
bot_id mediumint(8) UNSIGNED NOT NULL auto_increment,
bot_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
bot_name varchar(255) DEFAULT '' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
bot_agent varchar(255) DEFAULT '' NOT NULL,
bot_ip varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (bot_id),
KEY bot_active (bot_active)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_config'
CREATE TABLE phpbb_config (
config_name varchar(255) DEFAULT '' NOT NULL,
config_value varchar(255) DEFAULT '' NOT NULL,
is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (config_name),
KEY is_dynamic (is_dynamic),
KEY config_name (config_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_confirm'
CREATE TABLE phpbb_confirm (
confirm_id char(32) DEFAULT '' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
confirm_type tinyint(3) DEFAULT '0' NOT NULL,
code varchar(8) DEFAULT '' NOT NULL,
seed int(10) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id, confirm_id),
KEY confirm_type (confirm_type)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# 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)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_drafts'
CREATE TABLE phpbb_drafts (
draft_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
save_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
draft_subject varchar(100) DEFAULT '' NOT NULL,
draft_message mediumtext NOT NULL,
PRIMARY KEY (draft_id),
KEY save_time (save_time)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_extensions'
CREATE TABLE phpbb_extensions (
extension_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
extension varchar(100) DEFAULT '' NOT NULL,
PRIMARY KEY (extension_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_extension_groups'
CREATE TABLE phpbb_extension_groups (
group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_name varchar(255) DEFAULT '' NOT NULL,
cat_id tinyint(2) DEFAULT '0' NOT NULL,
allow_group tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
download_mode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
upload_icon varchar(255) DEFAULT '' NOT NULL,
max_filesize int(20) UNSIGNED DEFAULT '0' NOT NULL,
allowed_forums text NOT NULL,
allow_in_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (group_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums'
CREATE TABLE phpbb_forums (
forum_id mediumint(8) UNSIGNED NOT NULL auto_increment,
parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_parents mediumtext NOT NULL,
forum_name varchar(255) DEFAULT '' NOT NULL,
forum_desc text NOT NULL,
forum_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
forum_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_desc_uid varchar(8) DEFAULT '' NOT NULL,
forum_link varchar(255) DEFAULT '' NOT NULL,
forum_password varchar(40) DEFAULT '' NOT NULL,
forum_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
forum_image varchar(255) DEFAULT '' NOT NULL,
forum_rules text NOT NULL,
forum_rules_link varchar(255) DEFAULT '' NOT NULL,
forum_rules_bitfield varchar(255) DEFAULT '' NOT NULL,
forum_rules_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
forum_rules_uid varchar(8) DEFAULT '' NOT NULL,
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
forum_type tinyint(4) DEFAULT '0' NOT NULL,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_subject varchar(100) DEFAULT '' NOT NULL,
forum_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_poster_name varchar(255) DEFAULT '' NOT NULL,
forum_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
forum_flags tinyint(4) DEFAULT '32' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_indexing tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_icons tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_prune tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
prune_next int(11) UNSIGNED DEFAULT '0' NOT NULL,
prune_days mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
prune_viewed mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
prune_freq mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (forum_id),
KEY left_right_id (left_id, right_id),
KEY forum_lastpost_id (forum_last_post_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums_access'
CREATE TABLE phpbb_forums_access (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
PRIMARY KEY (forum_id, user_id, session_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums_track'
CREATE TABLE phpbb_forums_track (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_forums_watch'
CREATE TABLE phpbb_forums_watch (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
KEY forum_id (forum_id),
KEY user_id (user_id),
KEY notify_stat (notify_status)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_groups'
CREATE TABLE phpbb_groups (
group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_name varchar(255) DEFAULT '' NOT NULL,
group_name_clean varchar(255) DEFAULT '' NOT NULL,
group_desc text NOT NULL,
group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
group_desc_uid varchar(8) DEFAULT '' NOT NULL,
group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_avatar varchar(255) DEFAULT '' NOT NULL,
group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_colour varchar(6) DEFAULT '' NOT NULL,
group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (group_id),
KEY group_legend (group_legend)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_icons'
CREATE TABLE phpbb_icons (
icons_id mediumint(8) UNSIGNED NOT NULL auto_increment,
icons_url varchar(255) DEFAULT '' NOT NULL,
icons_width tinyint(4) DEFAULT '0' NOT NULL,
icons_height tinyint(4) DEFAULT '0' NOT NULL,
icons_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (icons_id),
KEY display_on_posting (display_on_posting)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_lang'
CREATE TABLE phpbb_lang (
lang_id tinyint(4) NOT NULL auto_increment,
lang_iso varchar(30) DEFAULT '' NOT NULL,
lang_dir varchar(30) DEFAULT '' NOT NULL,
lang_english_name varchar(100) DEFAULT '' NOT NULL,
lang_local_name varchar(255) DEFAULT '' NOT NULL,
lang_author varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (lang_id),
KEY lang_iso (lang_iso)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_log'
CREATE TABLE phpbb_log (
log_id mediumint(8) UNSIGNED NOT NULL auto_increment,
log_type tinyint(4) DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
reportee_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
log_ip varchar(40) DEFAULT '' NOT NULL,
log_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
log_operation text NOT NULL,
log_data mediumtext NOT NULL,
PRIMARY KEY (log_id),
KEY log_type (log_type),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY reportee_id (reportee_id),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_moderator_cache'
CREATE TABLE phpbb_moderator_cache (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_name varchar(255) DEFAULT '' NOT NULL,
display_on_index tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
KEY disp_idx (display_on_index),
KEY forum_id (forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id mediumint(8) UNSIGNED NOT NULL auto_increment,
module_enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
module_display tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
module_basename varchar(255) DEFAULT '' NOT NULL,
module_class varchar(10) DEFAULT '' NOT NULL,
parent_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
left_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
right_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
module_langname varchar(255) DEFAULT '' NOT NULL,
module_mode varchar(255) DEFAULT '' NOT NULL,
module_auth varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (module_id),
KEY left_right_id (left_id, right_id),
KEY module_enabled (module_enabled),
KEY class_left_id (module_class, left_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_text text NOT NULL,
poll_option_total mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
KEY poll_opt_id (poll_option_id),
KEY topic_id (topic_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_poll_votes'
CREATE TABLE phpbb_poll_votes (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,
vote_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
vote_user_ip varchar(40) DEFAULT '' NOT NULL,
KEY topic_id (topic_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_posts'
CREATE TABLE phpbb_posts (
post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poster_ip varchar(40) DEFAULT '' NOT NULL,
post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_username varchar(255) DEFAULT '' NOT NULL,
post_subject varchar(100) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
post_text mediumtext NOT NULL,
post_checksum varchar(32) DEFAULT '' NOT NULL,
post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
bbcode_uid varchar(8) DEFAULT '' NOT NULL,
post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_reason varchar(255) DEFAULT '' NOT NULL,
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_ip (poster_ip),
KEY poster_id (poster_id),
KEY post_approved (post_approved),
KEY tid_post_time (topic_id, post_time)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs'
CREATE TABLE phpbb_privmsgs (
msg_id mediumint(8) UNSIGNED NOT NULL auto_increment,
root_level mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
author_ip varchar(40) DEFAULT '' NOT NULL,
message_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
enable_bbcode tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_smilies tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_magic_url tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
enable_sig tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
message_subject varchar(100) DEFAULT '' NOT NULL,
message_text mediumtext NOT NULL,
message_edit_reason varchar(255) DEFAULT '' NOT NULL,
message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
message_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
bbcode_uid varchar(8) DEFAULT '' NOT NULL,
message_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
message_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
to_address text 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)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs_folder'
CREATE TABLE phpbb_privmsgs_folder (
folder_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
folder_name varchar(255) DEFAULT '' NOT NULL,
pm_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (folder_id),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs_rules'
CREATE TABLE phpbb_privmsgs_rules (
rule_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_check mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_connection mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_string varchar(255) DEFAULT '' NOT NULL,
rule_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_action mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rule_folder_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (rule_id),
KEY user_id (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_privmsgs_to'
CREATE TABLE phpbb_privmsgs_to (
msg_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
author_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
pm_deleted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
pm_new tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
pm_unread tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
pm_replied tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
pm_marked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
pm_forwarded tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
folder_id int(11) DEFAULT '0' NOT NULL,
KEY msg_id (msg_id),
KEY author_id (author_id),
KEY usr_flder_id (user_id, folder_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_fields'
CREATE TABLE phpbb_profile_fields (
field_id mediumint(8) UNSIGNED NOT NULL auto_increment,
field_name varchar(255) DEFAULT '' NOT NULL,
field_type tinyint(4) DEFAULT '0' NOT NULL,
field_ident varchar(20) DEFAULT '' NOT NULL,
field_length varchar(20) DEFAULT '' NOT NULL,
field_minlen varchar(255) DEFAULT '' NOT NULL,
field_maxlen varchar(255) DEFAULT '' NOT NULL,
field_novalue varchar(255) DEFAULT '' NOT NULL,
field_default_value varchar(255) DEFAULT '' NOT NULL,
field_validation varchar(20) DEFAULT '' NOT NULL,
field_required tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_show_on_reg tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_hide tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_no_view tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_active tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
field_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (field_id),
KEY fld_type (field_type),
KEY fld_ordr (field_order)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_fields_lang'
CREATE TABLE phpbb_profile_fields_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
option_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
field_type tinyint(4) DEFAULT '0' NOT NULL,
lang_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id, option_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_profile_lang'
CREATE TABLE phpbb_profile_lang (
field_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
lang_name varchar(255) DEFAULT '' NOT NULL,
lang_explain text NOT NULL,
lang_default_value varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (field_id, lang_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
rank_id mediumint(8) UNSIGNED NOT NULL auto_increment,
rank_title varchar(255) DEFAULT '' NOT NULL,
rank_min mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
rank_special tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
rank_image varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (rank_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_reports'
CREATE TABLE phpbb_reports (
report_id mediumint(8) UNSIGNED NOT NULL auto_increment,
reason_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
report_text mediumtext NOT NULL,
PRIMARY KEY (report_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_reports_reasons'
CREATE TABLE phpbb_reports_reasons (
reason_id smallint(4) UNSIGNED NOT NULL auto_increment,
reason_title varchar(255) DEFAULT '' NOT NULL,
reason_description mediumtext NOT NULL,
reason_order smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (reason_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_search_results'
CREATE TABLE phpbb_search_results (
search_key varchar(32) DEFAULT '' NOT NULL,
search_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
search_keywords mediumtext NOT NULL,
search_authors mediumtext NOT NULL,
PRIMARY KEY (search_key)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_search_wordlist'
CREATE TABLE phpbb_search_wordlist (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word_text varchar(255) DEFAULT '' NOT NULL,
word_common tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
word_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (word_id),
UNIQUE wrd_txt (word_text),
KEY wrd_cnt (word_count)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_search_wordmatch'
CREATE TABLE phpbb_search_wordmatch (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
UNIQUE unq_mtch (word_id, post_id, title_match),
KEY word_id (word_id),
KEY post_id (post_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_sessions'
CREATE TABLE phpbb_sessions (
session_id char(32) DEFAULT '' NOT NULL,
session_user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_last_visit int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
session_ip varchar(40) DEFAULT '' NOT NULL,
session_browser varchar(150) DEFAULT '' NOT NULL,
session_forwarded_for varchar(255) DEFAULT '' NOT NULL,
session_page varchar(255) DEFAULT '' NOT NULL,
session_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
session_autologin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
session_admin tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id),
KEY session_time (session_time),
KEY session_user_id (session_user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_sessions_keys'
CREATE TABLE phpbb_sessions_keys (
key_id char(32) DEFAULT '' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
last_ip varchar(40) DEFAULT '' NOT NULL,
last_login int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (key_id, user_id),
KEY last_login (last_login)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_sitelist'
CREATE TABLE phpbb_sitelist (
site_id mediumint(8) UNSIGNED NOT NULL auto_increment,
site_ip varchar(40) DEFAULT '' NOT NULL,
site_hostname varchar(255) DEFAULT '' NOT NULL,
ip_exclude tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (site_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
smiley_id mediumint(8) UNSIGNED NOT NULL auto_increment,
code varchar(50) DEFAULT '' NOT NULL,
emotion varchar(50) DEFAULT '' NOT NULL,
smiley_url varchar(50) DEFAULT '' NOT NULL,
smiley_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
smiley_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
smiley_order mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
display_on_posting tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
PRIMARY KEY (smiley_id),
KEY display_on_post (display_on_posting)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
style_id smallint(4) UNSIGNED NOT NULL auto_increment,
style_name varchar(255) DEFAULT '' NOT NULL,
style_copyright varchar(255) DEFAULT '' NOT NULL,
style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
theme_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (style_id),
UNIQUE style_name (style_name),
KEY template_id (template_id),
KEY theme_id (theme_id),
KEY imageset_id (imageset_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
template_id smallint(4) UNSIGNED NOT NULL auto_increment,
template_name varchar(255) DEFAULT '' NOT NULL,
template_copyright varchar(255) DEFAULT '' NOT NULL,
template_path varchar(100) DEFAULT '' NOT NULL,
bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL,
template_storedb tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (template_id),
UNIQUE tmplte_nm (template_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
template_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
template_filename varchar(100) DEFAULT '' NOT NULL,
template_included text NOT NULL,
template_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
template_data mediumtext NOT NULL,
KEY tid (template_id),
KEY tfn (template_filename)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
theme_id smallint(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) UNSIGNED DEFAULT '0' NOT NULL,
theme_mtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
theme_data mediumtext NOT NULL,
PRIMARY KEY (theme_id),
UNIQUE theme_name (theme_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
imageset_id smallint(4) UNSIGNED NOT NULL auto_increment,
imageset_name varchar(255) DEFAULT '' NOT NULL,
imageset_copyright varchar(255) DEFAULT '' NOT NULL,
imageset_path varchar(100) DEFAULT '' NOT NULL,
PRIMARY KEY (imageset_id),
UNIQUE imgset_nm (imageset_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_styles_imageset_data'
CREATE TABLE phpbb_styles_imageset_data (
image_id smallint(4) UNSIGNED NOT NULL auto_increment,
image_name varchar(200) DEFAULT '' NOT NULL,
image_filename varchar(200) DEFAULT '' NOT NULL,
image_lang varchar(30) DEFAULT '' NOT NULL,
image_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
image_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
imageset_id smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (image_id),
KEY i_d (imageset_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics'
CREATE TABLE phpbb_topics (
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_approved tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
topic_reported tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_title varchar(100) DEFAULT '' NOT NULL COLLATE utf8_unicode_ci,
topic_poster mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_replies_real mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
topic_type tinyint(3) DEFAULT '0' NOT NULL,
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_first_poster_name varchar(255) DEFAULT '' NOT NULL,
topic_first_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_poster_name varchar(255) DEFAULT '' NOT NULL,
topic_last_poster_colour varchar(6) DEFAULT '' NOT NULL,
topic_last_post_subject varchar(100) DEFAULT '' NOT NULL,
topic_last_post_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_view_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
poll_title varchar(255) DEFAULT '' NOT NULL,
poll_start int(11) UNSIGNED DEFAULT '0' NOT NULL,
poll_length int(11) UNSIGNED DEFAULT '0' NOT NULL,
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY forum_id_type (forum_id, topic_type),
KEY last_post_time (topic_last_post_time),
KEY topic_approved (topic_approved),
KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id),
KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics_track'
CREATE TABLE phpbb_topics_track (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id),
KEY forum_id (forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics_posted'
CREATE TABLE phpbb_topics_posted (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posted tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_topics_watch'
CREATE TABLE phpbb_topics_watch (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
notify_status tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
KEY topic_id (topic_id),
KEY user_id (user_id),
KEY notify_stat (notify_status)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
group_leader tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_pending tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
KEY group_id (group_id),
KEY user_id (user_id),
KEY group_leader (group_leader)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_users'
CREATE TABLE phpbb_users (
user_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_type tinyint(2) DEFAULT '0' NOT NULL,
group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL,
user_permissions mediumtext NOT NULL,
user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_ip varchar(40) DEFAULT '' NOT NULL,
user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL,
username varchar(255) DEFAULT '' NOT NULL,
username_clean varchar(255) DEFAULT '' NOT NULL,
user_password varchar(40) DEFAULT '' NOT NULL,
user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_email varchar(100) DEFAULT '' NOT NULL,
user_email_hash bigint(20) DEFAULT '0' NOT NULL,
user_birthday varchar(10) DEFAULT '' NOT NULL,
user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_lastpage varchar(200) DEFAULT '' NOT NULL,
user_last_confirm_key varchar(10) DEFAULT '' NOT NULL,
user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_warnings tinyint(4) DEFAULT '0' NOT NULL,
user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_login_attempts tinyint(4) DEFAULT '0' NOT NULL,
user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL,
user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_lang varchar(30) DEFAULT '' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL,
user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_colour varchar(6) DEFAULT '' NOT NULL,
user_new_privmsg int(4) DEFAULT '0' NOT NULL,
user_unread_privmsg int(4) DEFAULT '0' NOT NULL,
user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_full_folder int(11) DEFAULT '-3' NOT NULL,
user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL,
user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
user_options int(11) UNSIGNED DEFAULT '895' NOT NULL,
user_avatar varchar(255) DEFAULT '' NOT NULL,
user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
user_sig mediumtext NOT NULL,
user_sig_bbcode_uid varchar(8) DEFAULT '' NOT NULL,
user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
user_from varchar(100) DEFAULT '' NOT NULL,
user_icq varchar(15) DEFAULT '' NOT NULL,
user_aim varchar(255) DEFAULT '' NOT NULL,
user_yim varchar(255) DEFAULT '' NOT NULL,
user_msnm varchar(255) DEFAULT '' NOT NULL,
user_jabber varchar(255) DEFAULT '' NOT NULL,
user_website varchar(200) DEFAULT '' NOT NULL,
user_occ text NOT NULL,
user_interests text NOT NULL,
user_actkey varchar(32) DEFAULT '' NOT NULL,
user_newpasswd varchar(40) DEFAULT '' NOT NULL,
user_form_salt varchar(32) DEFAULT '' NOT NULL,
PRIMARY KEY (user_id),
KEY user_birthday (user_birthday),
KEY user_email_hash (user_email_hash),
KEY user_type (user_type),
UNIQUE username_clean (username_clean)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_warnings'
CREATE TABLE phpbb_warnings (
warning_id mediumint(8) UNSIGNED NOT NULL auto_increment,
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
log_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
warning_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (warning_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word varchar(255) DEFAULT '' NOT NULL,
replacement varchar(255) DEFAULT '' NOT NULL,
PRIMARY KEY (word_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_zebra'
CREATE TABLE phpbb_zebra (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
zebra_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
friend tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
foe tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, zebra_id),
KEY zebra_user (zebra_id, user_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -486,7 +486,7 @@ INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_reg
INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 'guests', 3, 0, '', 0, '', '', ''); INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 'guests', 3, 0, '', 0, '', '', '');
INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 'registered', 3, 0, '', 0, '', '', ''); INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 'registered', 3, 0, '', 0, '', '', '');
INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 'registered_coppa', 3, 0, '', 0, '', '', ''); INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 'registered_coppa', 3, 0, '', 0, '', '', '');
INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GLOBAL_MODERATORS', 'global_moderators' 3, 0, '00AA00', 1, '', '', ''); INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GLOBAL_MODERATORS', 'global_moderators', 3, 0, '00AA00', 1, '', '', '');
INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 'administrators', 3, 1, 'AA0000', 1, '', '', ''); INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 'administrators', 3, 1, 'AA0000', 1, '', '', '');
INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 'bots', 3, 0, '9E8DA7', 0, '', '', ''); INSERT INTO phpbb_groups (group_name, group_name_clean, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 'bots', 3, 0, '9E8DA7', 0, '', '', '');

View file

@ -1,968 +0,0 @@
#
# $Id$
#
BEGIN TRANSACTION;
# Table: 'phpbb_attachments'
CREATE TABLE phpbb_attachments (
attach_id INTEGER PRIMARY KEY NOT NULL ,
post_msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
in_message INTEGER UNSIGNED NOT NULL DEFAULT '0',
poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
is_orphan INTEGER UNSIGNED NOT NULL DEFAULT '1',
physical_filename varchar(255) NOT NULL DEFAULT '',
real_filename varchar(255) NOT NULL DEFAULT '',
download_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
attach_comment text(65535) NOT NULL DEFAULT '',
extension varchar(100) NOT NULL DEFAULT '',
mimetype varchar(100) NOT NULL DEFAULT '',
filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
filetime INTEGER UNSIGNED NOT NULL DEFAULT '0',
thumbnail INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_attachments_filetime ON phpbb_attachments (filetime);
CREATE INDEX phpbb_attachments_post_msg_id ON phpbb_attachments (post_msg_id);
CREATE INDEX phpbb_attachments_topic_id ON phpbb_attachments (topic_id);
CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
CREATE INDEX phpbb_attachments_is_orphan ON phpbb_attachments (is_orphan);
# Table: 'phpbb_acl_groups'
CREATE TABLE phpbb_acl_groups (
group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_setting tinyint(2) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_acl_groups_group_id ON phpbb_acl_groups (group_id);
CREATE INDEX phpbb_acl_groups_auth_opt_id ON phpbb_acl_groups (auth_option_id);
CREATE INDEX phpbb_acl_groups_auth_role_id ON phpbb_acl_groups (auth_role_id);
# Table: 'phpbb_acl_options'
CREATE TABLE phpbb_acl_options (
auth_option_id INTEGER PRIMARY KEY NOT NULL ,
auth_option varchar(50) NOT NULL DEFAULT '',
is_global INTEGER UNSIGNED NOT NULL DEFAULT '0',
is_local INTEGER UNSIGNED NOT NULL DEFAULT '0',
founder_only INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_acl_options_auth_option ON phpbb_acl_options (auth_option);
# Table: 'phpbb_acl_roles'
CREATE TABLE phpbb_acl_roles (
role_id INTEGER PRIMARY KEY NOT NULL ,
role_name varchar(255) NOT NULL DEFAULT '',
role_description text(65535) NOT NULL DEFAULT '',
role_type varchar(10) NOT NULL DEFAULT '',
role_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_acl_roles_role_type ON phpbb_acl_roles (role_type);
CREATE INDEX phpbb_acl_roles_role_order ON phpbb_acl_roles (role_order);
# Table: 'phpbb_acl_roles_data'
CREATE TABLE phpbb_acl_roles_data (
role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_setting tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (role_id, auth_option_id)
);
CREATE INDEX phpbb_acl_roles_data_ath_op_id ON phpbb_acl_roles_data (auth_option_id);
# Table: 'phpbb_acl_users'
CREATE TABLE phpbb_acl_users (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_role_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
auth_setting tinyint(2) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id INTEGER PRIMARY KEY NOT NULL ,
ban_userid INTEGER UNSIGNED NOT NULL DEFAULT '0',
ban_ip varchar(40) NOT NULL DEFAULT '',
ban_email varchar(100) NOT NULL DEFAULT '',
ban_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
ban_end INTEGER UNSIGNED NOT NULL DEFAULT '0',
ban_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0',
ban_reason varchar(255) NOT NULL DEFAULT '',
ban_give_reason varchar(255) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_banlist_ban_end ON phpbb_banlist (ban_end);
CREATE INDEX phpbb_banlist_ban_user ON phpbb_banlist (ban_userid, ban_exclude);
CREATE INDEX phpbb_banlist_ban_email ON phpbb_banlist (ban_email, ban_exclude);
CREATE INDEX phpbb_banlist_ban_ip ON phpbb_banlist (ban_ip, ban_exclude);
# Table: 'phpbb_bbcodes'
CREATE TABLE phpbb_bbcodes (
bbcode_id tinyint(3) NOT NULL DEFAULT '0',
bbcode_tag varchar(16) NOT NULL DEFAULT '',
bbcode_helpline varchar(255) NOT NULL DEFAULT '',
display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_match text(65535) NOT NULL DEFAULT '',
bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '',
first_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
first_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
second_pass_match mediumtext(16777215) NOT NULL DEFAULT '',
second_pass_replace mediumtext(16777215) NOT NULL DEFAULT '',
PRIMARY KEY (bbcode_id)
);
CREATE INDEX phpbb_bbcodes_display_on_post ON phpbb_bbcodes (display_on_posting);
# Table: 'phpbb_bookmarks'
CREATE TABLE phpbb_bookmarks (
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (topic_id, user_id)
);
# Table: 'phpbb_bots'
CREATE TABLE phpbb_bots (
bot_id INTEGER PRIMARY KEY NOT NULL ,
bot_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
bot_name text(65535) NOT NULL DEFAULT '',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
bot_agent varchar(255) NOT NULL DEFAULT '',
bot_ip varchar(255) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
# Table: 'phpbb_config'
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL DEFAULT '',
config_value varchar(255) NOT NULL DEFAULT '',
is_dynamic INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (config_name)
);
CREATE INDEX phpbb_config_is_dynamic ON phpbb_config (is_dynamic);
CREATE INDEX phpbb_config_config_name ON phpbb_config (config_name);
# Table: 'phpbb_confirm'
CREATE TABLE phpbb_confirm (
confirm_id char(32) NOT NULL DEFAULT '',
session_id char(32) NOT NULL DEFAULT '',
confirm_type tinyint(3) NOT NULL DEFAULT '0',
code varchar(8) NOT NULL DEFAULT '',
seed INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (session_id, confirm_id)
);
CREATE INDEX phpbb_confirm_confirm_type ON phpbb_confirm (confirm_type);
# Table: 'phpbb_disallow'
CREATE TABLE phpbb_disallow (
disallow_id INTEGER PRIMARY KEY NOT NULL ,
disallow_username varchar(255) NOT NULL DEFAULT ''
);
# Table: 'phpbb_drafts'
CREATE TABLE phpbb_drafts (
draft_id INTEGER PRIMARY KEY NOT NULL ,
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
save_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
draft_subject text(65535) NOT NULL DEFAULT '',
draft_message mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
# Table: 'phpbb_extensions'
CREATE TABLE phpbb_extensions (
extension_id INTEGER PRIMARY KEY NOT NULL ,
group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
extension varchar(100) NOT NULL DEFAULT ''
);
# Table: 'phpbb_extension_groups'
CREATE TABLE phpbb_extension_groups (
group_id INTEGER PRIMARY KEY NOT NULL ,
group_name varchar(255) NOT NULL DEFAULT '',
cat_id tinyint(2) NOT NULL DEFAULT '0',
allow_group INTEGER UNSIGNED NOT NULL DEFAULT '0',
download_mode INTEGER UNSIGNED NOT NULL DEFAULT '1',
upload_icon varchar(255) NOT NULL DEFAULT '',
max_filesize INTEGER UNSIGNED NOT NULL DEFAULT '0',
allowed_forums text(65535) NOT NULL DEFAULT '',
allow_in_pm INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
# Table: 'phpbb_forums'
CREATE TABLE phpbb_forums (
forum_id INTEGER PRIMARY KEY NOT NULL ,
parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
right_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_parents mediumtext(16777215) NOT NULL DEFAULT '',
forum_name text(65535) NOT NULL DEFAULT '',
forum_desc text(65535) NOT NULL DEFAULT '',
forum_desc_bitfield varchar(255) NOT NULL DEFAULT '',
forum_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
forum_desc_uid varchar(8) NOT NULL DEFAULT '',
forum_link varchar(255) NOT NULL DEFAULT '',
forum_password varchar(40) NOT NULL DEFAULT '',
forum_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_image varchar(255) NOT NULL DEFAULT '',
forum_rules text(65535) NOT NULL DEFAULT '',
forum_rules_link varchar(255) NOT NULL DEFAULT '',
forum_rules_bitfield varchar(255) NOT NULL DEFAULT '',
forum_rules_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
forum_rules_uid varchar(8) NOT NULL DEFAULT '',
forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
forum_type tinyint(4) NOT NULL DEFAULT '0',
forum_status tinyint(4) NOT NULL DEFAULT '0',
forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_topics_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_post_subject text(65535) NOT NULL DEFAULT '',
forum_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_poster_name varchar(255) NOT NULL DEFAULT '',
forum_last_poster_colour varchar(6) NOT NULL DEFAULT '',
forum_flags tinyint(4) NOT NULL DEFAULT '32',
display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_indexing INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_icons INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_prune INTEGER UNSIGNED NOT NULL DEFAULT '0',
prune_next INTEGER UNSIGNED NOT NULL DEFAULT '0',
prune_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
prune_viewed INTEGER UNSIGNED NOT NULL DEFAULT '0',
prune_freq INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
CREATE INDEX phpbb_forums_forum_lastpost_id ON phpbb_forums (forum_last_post_id);
# Table: 'phpbb_forums_access'
CREATE TABLE phpbb_forums_access (
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_id char(32) NOT NULL DEFAULT '',
PRIMARY KEY (forum_id, user_id, session_id)
);
# Table: 'phpbb_forums_track'
CREATE TABLE phpbb_forums_track (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (user_id, forum_id)
);
# Table: 'phpbb_forums_watch'
CREATE TABLE phpbb_forums_watch (
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_forums_watch_forum_id ON phpbb_forums_watch (forum_id);
CREATE INDEX phpbb_forums_watch_user_id ON phpbb_forums_watch (user_id);
CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status);
# Table: 'phpbb_groups'
CREATE TABLE phpbb_groups (
group_id INTEGER PRIMARY KEY NOT NULL ,
group_type tinyint(4) NOT NULL DEFAULT '1',
group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_name varchar(255) NOT NULL DEFAULT '',
group_name_clean varchar(255) NOT NULL DEFAULT '',
group_desc text(65535) NOT NULL DEFAULT '',
group_desc_bitfield varchar(255) NOT NULL DEFAULT '',
group_desc_options INTEGER UNSIGNED NOT NULL DEFAULT '7',
group_desc_uid varchar(8) NOT NULL DEFAULT '',
group_display INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_avatar varchar(255) NOT NULL DEFAULT '',
group_avatar_type tinyint(2) NOT NULL DEFAULT '0',
group_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_colour varchar(6) NOT NULL DEFAULT '',
group_sig_chars INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_receive_pm INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_message_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_legend INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
CREATE INDEX phpbb_groups_group_legend ON phpbb_groups (group_legend);
# Table: 'phpbb_icons'
CREATE TABLE phpbb_icons (
icons_id INTEGER PRIMARY KEY NOT NULL ,
icons_url varchar(255) NOT NULL DEFAULT '',
icons_width tinyint(4) NOT NULL DEFAULT '0',
icons_height tinyint(4) NOT NULL DEFAULT '0',
icons_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
CREATE INDEX phpbb_icons_display_on_posting ON phpbb_icons (display_on_posting);
# Table: 'phpbb_lang'
CREATE TABLE phpbb_lang (
lang_id INTEGER PRIMARY KEY NOT NULL ,
lang_iso varchar(30) NOT NULL DEFAULT '',
lang_dir varchar(30) NOT NULL DEFAULT '',
lang_english_name varchar(100) NOT NULL DEFAULT '',
lang_local_name varchar(255) NOT NULL DEFAULT '',
lang_author varchar(255) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_lang_lang_iso ON phpbb_lang (lang_iso);
# Table: 'phpbb_log'
CREATE TABLE phpbb_log (
log_id INTEGER PRIMARY KEY NOT NULL ,
log_type tinyint(4) NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
reportee_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
log_ip varchar(40) NOT NULL DEFAULT '',
log_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
log_operation text(65535) NOT NULL DEFAULT '',
log_data mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
# Table: 'phpbb_moderator_cache'
CREATE TABLE phpbb_moderator_cache (
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
username varchar(255) NOT NULL DEFAULT '',
group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_name varchar(255) NOT NULL DEFAULT '',
display_on_index INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
CREATE INDEX phpbb_moderator_cache_disp_idx ON phpbb_moderator_cache (display_on_index);
CREATE INDEX phpbb_moderator_cache_forum_id ON phpbb_moderator_cache (forum_id);
# Table: 'phpbb_modules'
CREATE TABLE phpbb_modules (
module_id INTEGER PRIMARY KEY NOT NULL ,
module_enabled INTEGER UNSIGNED NOT NULL DEFAULT '1',
module_display INTEGER UNSIGNED NOT NULL DEFAULT '1',
module_basename varchar(255) NOT NULL DEFAULT '',
module_class varchar(10) NOT NULL DEFAULT '',
parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
left_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
right_id INTEGER 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 ''
);
CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
CREATE INDEX phpbb_modules_class_left_id ON phpbb_modules (module_class, left_id);
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) NOT NULL DEFAULT '0',
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_option_text text(65535) NOT NULL DEFAULT '',
poll_option_total INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_poll_options_poll_opt_id ON phpbb_poll_options (poll_option_id);
CREATE INDEX phpbb_poll_options_topic_id ON phpbb_poll_options (topic_id);
# Table: 'phpbb_poll_votes'
CREATE TABLE phpbb_poll_votes (
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_option_id tinyint(4) NOT NULL DEFAULT '0',
vote_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
vote_user_ip varchar(40) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_poll_votes_topic_id ON phpbb_poll_votes (topic_id);
CREATE INDEX phpbb_poll_votes_vote_user_id ON phpbb_poll_votes (vote_user_id);
CREATE INDEX phpbb_poll_votes_vote_user_ip ON phpbb_poll_votes (vote_user_ip);
# Table: 'phpbb_posts'
CREATE TABLE phpbb_posts (
post_id INTEGER PRIMARY KEY NOT NULL ,
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
poster_ip varchar(40) NOT NULL DEFAULT '',
post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
post_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
post_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
post_username varchar(255) NOT NULL DEFAULT '',
post_subject text(65535) NOT NULL DEFAULT '',
post_text mediumtext(16777215) NOT NULL DEFAULT '',
post_checksum varchar(32) NOT NULL DEFAULT '',
post_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
bbcode_uid varchar(8) NOT NULL DEFAULT '',
post_postcount INTEGER UNSIGNED NOT NULL DEFAULT '1',
post_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
post_edit_reason text(65535) NOT NULL DEFAULT '',
post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);
CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);
CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
CREATE INDEX phpbb_posts_tid_post_time ON phpbb_posts (topic_id, post_time);
# Table: 'phpbb_privmsgs'
CREATE TABLE phpbb_privmsgs (
msg_id INTEGER PRIMARY KEY NOT NULL ,
root_level INTEGER UNSIGNED NOT NULL DEFAULT '0',
author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
author_ip varchar(40) NOT NULL DEFAULT '',
message_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
enable_bbcode INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_smilies INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_magic_url INTEGER UNSIGNED NOT NULL DEFAULT '1',
enable_sig INTEGER UNSIGNED NOT NULL DEFAULT '1',
message_subject text(65535) NOT NULL DEFAULT '',
message_text mediumtext(16777215) NOT NULL DEFAULT '',
message_edit_reason text(65535) NOT NULL DEFAULT '',
message_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
message_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
bbcode_uid varchar(8) NOT NULL DEFAULT '',
message_edit_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
message_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
to_address text(65535) NOT NULL DEFAULT '',
bcc_address text(65535) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_privmsgs_author_ip ON phpbb_privmsgs (author_ip);
CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
# Table: 'phpbb_privmsgs_folder'
CREATE TABLE phpbb_privmsgs_folder (
folder_id INTEGER PRIMARY KEY NOT NULL ,
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
folder_name varchar(255) NOT NULL DEFAULT '',
pm_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
# Table: 'phpbb_privmsgs_rules'
CREATE TABLE phpbb_privmsgs_rules (
rule_id INTEGER PRIMARY KEY NOT NULL ,
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
rule_check INTEGER UNSIGNED NOT NULL DEFAULT '0',
rule_connection INTEGER UNSIGNED NOT NULL DEFAULT '0',
rule_string varchar(255) NOT NULL DEFAULT '',
rule_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
rule_group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
rule_action INTEGER UNSIGNED NOT NULL DEFAULT '0',
rule_folder_id int(11) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_privmsgs_rules_user_id ON phpbb_privmsgs_rules (user_id);
# Table: 'phpbb_privmsgs_to'
CREATE TABLE phpbb_privmsgs_to (
msg_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
author_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
pm_deleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
pm_new INTEGER UNSIGNED NOT NULL DEFAULT '1',
pm_unread INTEGER UNSIGNED NOT NULL DEFAULT '1',
pm_replied INTEGER UNSIGNED NOT NULL DEFAULT '0',
pm_marked INTEGER UNSIGNED NOT NULL DEFAULT '0',
pm_forwarded INTEGER UNSIGNED NOT NULL DEFAULT '0',
folder_id int(11) NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_privmsgs_to_msg_id ON phpbb_privmsgs_to (msg_id);
CREATE INDEX phpbb_privmsgs_to_author_id ON phpbb_privmsgs_to (author_id);
CREATE INDEX phpbb_privmsgs_to_usr_flder_id ON phpbb_privmsgs_to (user_id, folder_id);
# Table: 'phpbb_profile_fields'
CREATE TABLE phpbb_profile_fields (
field_id INTEGER PRIMARY KEY NOT NULL ,
field_name varchar(255) NOT NULL DEFAULT '',
field_type tinyint(4) NOT NULL DEFAULT '0',
field_ident varchar(20) NOT NULL DEFAULT '',
field_length varchar(20) NOT NULL DEFAULT '',
field_minlen varchar(255) NOT NULL DEFAULT '',
field_maxlen varchar(255) NOT NULL DEFAULT '',
field_novalue varchar(255) NOT NULL DEFAULT '',
field_default_value varchar(255) NOT NULL DEFAULT '',
field_validation varchar(20) NOT NULL DEFAULT '',
field_required INTEGER UNSIGNED NOT NULL DEFAULT '0',
field_show_on_reg INTEGER UNSIGNED NOT NULL DEFAULT '0',
field_hide INTEGER UNSIGNED NOT NULL DEFAULT '0',
field_no_view INTEGER UNSIGNED NOT NULL DEFAULT '0',
field_active INTEGER UNSIGNED NOT NULL DEFAULT '0',
field_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_profile_fields_fld_type ON phpbb_profile_fields (field_type);
CREATE INDEX phpbb_profile_fields_fld_ordr ON phpbb_profile_fields (field_order);
# Table: 'phpbb_profile_fields_data'
CREATE TABLE phpbb_profile_fields_data (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (user_id)
);
# Table: 'phpbb_profile_fields_lang'
CREATE TABLE phpbb_profile_fields_lang (
field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
option_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
field_type tinyint(4) NOT NULL DEFAULT '0',
lang_value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (field_id, lang_id, option_id)
);
# Table: 'phpbb_profile_lang'
CREATE TABLE phpbb_profile_lang (
field_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
lang_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
lang_name varchar(255) NOT NULL DEFAULT '',
lang_explain text(65535) NOT NULL DEFAULT '',
lang_default_value varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (field_id, lang_id)
);
# Table: 'phpbb_ranks'
CREATE TABLE phpbb_ranks (
rank_id INTEGER PRIMARY KEY NOT NULL ,
rank_title varchar(255) NOT NULL DEFAULT '',
rank_min INTEGER UNSIGNED NOT NULL DEFAULT '0',
rank_special INTEGER UNSIGNED NOT NULL DEFAULT '0',
rank_image varchar(255) NOT NULL DEFAULT ''
);
# Table: 'phpbb_reports'
CREATE TABLE phpbb_reports (
report_id INTEGER PRIMARY KEY NOT NULL ,
reason_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0',
report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
report_text mediumtext(16777215) NOT NULL DEFAULT ''
);
# 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 mediumtext(16777215) NOT NULL DEFAULT '',
reason_order INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
# Table: 'phpbb_search_results'
CREATE TABLE phpbb_search_results (
search_key varchar(32) NOT NULL DEFAULT '',
search_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
search_keywords mediumtext(16777215) NOT NULL DEFAULT '',
search_authors mediumtext(16777215) NOT NULL DEFAULT '',
PRIMARY KEY (search_key)
);
# Table: 'phpbb_search_wordlist'
CREATE TABLE phpbb_search_wordlist (
word_id INTEGER PRIMARY KEY NOT NULL ,
word_text varchar(255) NOT NULL DEFAULT '',
word_common INTEGER UNSIGNED NOT NULL DEFAULT '0',
word_count INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE UNIQUE INDEX phpbb_search_wordlist_wrd_txt ON phpbb_search_wordlist (word_text);
CREATE INDEX phpbb_search_wordlist_wrd_cnt ON phpbb_search_wordlist (word_count);
# Table: 'phpbb_search_wordmatch'
CREATE TABLE phpbb_search_wordmatch (
post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
word_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
title_match INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE UNIQUE INDEX phpbb_search_wordmatch_unq_mtch ON phpbb_search_wordmatch (word_id, post_id, title_match);
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
# Table: 'phpbb_sessions'
CREATE TABLE phpbb_sessions (
session_id char(32) NOT NULL DEFAULT '',
session_user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_last_visit INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_ip varchar(40) NOT NULL DEFAULT '',
session_browser varchar(150) NOT NULL DEFAULT '',
session_forwarded_for varchar(255) NOT NULL DEFAULT '',
session_page varchar(255) NOT NULL DEFAULT '',
session_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
session_autologin INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_admin INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (session_id)
);
CREATE INDEX phpbb_sessions_session_time ON phpbb_sessions (session_time);
CREATE INDEX phpbb_sessions_session_user_id ON phpbb_sessions (session_user_id);
# Table: 'phpbb_sessions_keys'
CREATE TABLE phpbb_sessions_keys (
key_id char(32) NOT NULL DEFAULT '',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
last_ip varchar(40) NOT NULL DEFAULT '',
last_login INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (key_id, user_id)
);
CREATE INDEX phpbb_sessions_keys_last_login ON phpbb_sessions_keys (last_login);
# Table: 'phpbb_sitelist'
CREATE TABLE phpbb_sitelist (
site_id INTEGER PRIMARY KEY NOT NULL ,
site_ip varchar(40) NOT NULL DEFAULT '',
site_hostname varchar(255) NOT NULL DEFAULT '',
ip_exclude INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
# Table: 'phpbb_smilies'
CREATE TABLE phpbb_smilies (
smiley_id INTEGER PRIMARY KEY NOT NULL ,
code varchar(50) NOT NULL DEFAULT '',
emotion varchar(50) NOT NULL DEFAULT '',
smiley_url varchar(50) NOT NULL DEFAULT '',
smiley_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
smiley_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
smiley_order INTEGER UNSIGNED NOT NULL DEFAULT '0',
display_on_posting INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
CREATE INDEX phpbb_smilies_display_on_post ON phpbb_smilies (display_on_posting);
# Table: 'phpbb_styles'
CREATE TABLE phpbb_styles (
style_id INTEGER PRIMARY KEY NOT NULL ,
style_name varchar(255) NOT NULL DEFAULT '',
style_copyright varchar(255) NOT NULL DEFAULT '',
style_active INTEGER UNSIGNED NOT NULL DEFAULT '1',
template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id);
CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id);
CREATE INDEX phpbb_styles_imageset_id ON phpbb_styles (imageset_id);
# Table: 'phpbb_styles_template'
CREATE TABLE phpbb_styles_template (
template_id INTEGER PRIMARY KEY NOT NULL ,
template_name varchar(255) NOT NULL DEFAULT '',
template_copyright varchar(255) NOT NULL DEFAULT '',
template_path varchar(100) NOT NULL DEFAULT '',
bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=',
template_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name);
# Table: 'phpbb_styles_template_data'
CREATE TABLE phpbb_styles_template_data (
template_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
template_filename varchar(100) NOT NULL DEFAULT '',
template_included text(65535) NOT NULL DEFAULT '',
template_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
template_data mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_styles_template_data_tid ON phpbb_styles_template_data (template_id);
CREATE INDEX phpbb_styles_template_data_tfn ON phpbb_styles_template_data (template_filename);
# Table: 'phpbb_styles_theme'
CREATE TABLE phpbb_styles_theme (
theme_id INTEGER PRIMARY KEY NOT NULL ,
theme_name varchar(255) NOT NULL DEFAULT '',
theme_copyright varchar(255) NOT NULL DEFAULT '',
theme_path varchar(100) NOT NULL DEFAULT '',
theme_storedb INTEGER UNSIGNED NOT NULL DEFAULT '0',
theme_mtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
theme_data mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
# Table: 'phpbb_styles_imageset'
CREATE TABLE phpbb_styles_imageset (
imageset_id INTEGER PRIMARY KEY NOT NULL ,
imageset_name varchar(255) NOT NULL DEFAULT '',
imageset_copyright varchar(255) NOT NULL DEFAULT '',
imageset_path varchar(100) NOT NULL DEFAULT ''
);
CREATE UNIQUE INDEX phpbb_styles_imageset_imgset_nm ON phpbb_styles_imageset (imageset_name);
# Table: 'phpbb_styles_imageset_data'
CREATE TABLE phpbb_styles_imageset_data (
image_id INTEGER PRIMARY KEY NOT NULL ,
image_name varchar(200) NOT NULL DEFAULT '',
image_filename varchar(200) NOT NULL DEFAULT '',
image_lang varchar(30) NOT NULL DEFAULT '',
image_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
image_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
imageset_id INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_styles_imageset_data_i_d ON phpbb_styles_imageset_data (imageset_id);
# Table: 'phpbb_topics'
CREATE TABLE phpbb_topics (
topic_id INTEGER PRIMARY KEY NOT NULL ,
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
icon_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_attachment INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_approved INTEGER UNSIGNED NOT NULL DEFAULT '1',
topic_reported INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_title text(65535) NOT NULL DEFAULT '',
topic_poster INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_replies INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_replies_real INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_status tinyint(3) NOT NULL DEFAULT '0',
topic_type tinyint(3) NOT NULL DEFAULT '0',
topic_first_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_first_poster_name varchar(255) NOT NULL DEFAULT '',
topic_first_poster_colour varchar(6) NOT NULL DEFAULT '',
topic_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_last_poster_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_last_poster_name varchar(255) NOT NULL DEFAULT '',
topic_last_poster_colour varchar(6) NOT NULL DEFAULT '',
topic_last_post_subject text(65535) NOT NULL DEFAULT '',
topic_last_post_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_last_view_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_moved_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_bumped INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_bumper INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_title text(65535) NOT NULL DEFAULT '',
poll_start INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_max_options tinyint(4) NOT NULL DEFAULT '1',
poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time);
CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved);
CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id);
CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id);
# Table: 'phpbb_topics_track'
CREATE TABLE phpbb_topics_track (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
mark_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (user_id, topic_id)
);
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
# Table: 'phpbb_topics_posted'
CREATE TABLE phpbb_topics_posted (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_posted INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (user_id, topic_id)
);
# Table: 'phpbb_topics_watch'
CREATE TABLE phpbb_topics_watch (
topic_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
notify_status INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
CREATE INDEX phpbb_topics_watch_topic_id ON phpbb_topics_watch (topic_id);
CREATE INDEX phpbb_topics_watch_user_id ON phpbb_topics_watch (user_id);
CREATE INDEX phpbb_topics_watch_notify_stat ON phpbb_topics_watch (notify_status);
# Table: 'phpbb_user_group'
CREATE TABLE phpbb_user_group (
group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
group_leader INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_pending INTEGER UNSIGNED NOT NULL DEFAULT '1'
);
CREATE INDEX phpbb_user_group_group_id ON phpbb_user_group (group_id);
CREATE INDEX phpbb_user_group_user_id ON phpbb_user_group (user_id);
CREATE INDEX phpbb_user_group_group_leader ON phpbb_user_group (group_leader);
# Table: 'phpbb_users'
CREATE TABLE phpbb_users (
user_id INTEGER PRIMARY KEY NOT NULL ,
user_type tinyint(2) NOT NULL DEFAULT '0',
group_id INTEGER UNSIGNED NOT NULL DEFAULT '3',
user_permissions mediumtext(16777215) NOT NULL DEFAULT '',
user_perm_from INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_ip varchar(40) NOT NULL DEFAULT '',
user_regdate INTEGER UNSIGNED NOT NULL DEFAULT '0',
username varchar(255) NOT NULL DEFAULT '',
username_clean varchar(255) NOT NULL DEFAULT '',
user_password varchar(40) NOT NULL DEFAULT '',
user_passchg INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_pass_convert INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_email varchar(100) NOT NULL DEFAULT '',
user_email_hash bigint(20) NOT NULL DEFAULT '0',
user_birthday varchar(10) NOT NULL DEFAULT '',
user_lastvisit INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_lastmark INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_lastpost_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_lastpage varchar(200) NOT NULL DEFAULT '',
user_last_confirm_key varchar(10) NOT NULL DEFAULT '',
user_last_search INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_warnings tinyint(4) NOT NULL DEFAULT '0',
user_last_warning INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_login_attempts tinyint(4) NOT NULL DEFAULT '0',
user_inactive_reason tinyint(2) NOT NULL DEFAULT '0',
user_inactive_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_lang varchar(30) NOT NULL DEFAULT '',
user_timezone decimal(5,2) NOT NULL DEFAULT '0',
user_dst INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i',
user_style INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_rank INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_colour varchar(6) NOT NULL DEFAULT '',
user_new_privmsg int(4) NOT NULL DEFAULT '0',
user_unread_privmsg int(4) NOT NULL DEFAULT '0',
user_last_privmsg INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_message_rules INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_full_folder int(11) NOT NULL DEFAULT '-3',
user_emailtime INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_topic_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_topic_sortby_type varchar(1) NOT NULL DEFAULT 't',
user_topic_sortby_dir varchar(1) NOT NULL DEFAULT 'd',
user_post_show_days INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_post_sortby_type varchar(1) NOT NULL DEFAULT 't',
user_post_sortby_dir varchar(1) NOT NULL DEFAULT 'a',
user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_notify_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
user_notify_type tinyint(4) NOT NULL DEFAULT '0',
user_allow_pm INTEGER UNSIGNED NOT NULL DEFAULT '1',
user_allow_viewonline INTEGER UNSIGNED NOT NULL DEFAULT '1',
user_allow_viewemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
user_allow_massemail INTEGER UNSIGNED NOT NULL DEFAULT '1',
user_options INTEGER UNSIGNED NOT NULL DEFAULT '895',
user_avatar varchar(255) NOT NULL DEFAULT '',
user_avatar_type tinyint(2) NOT NULL DEFAULT '0',
user_avatar_width INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_avatar_height INTEGER UNSIGNED NOT NULL DEFAULT '0',
user_sig mediumtext(16777215) NOT NULL DEFAULT '',
user_sig_bbcode_uid varchar(8) NOT NULL DEFAULT '',
user_sig_bbcode_bitfield varchar(255) NOT NULL DEFAULT '',
user_from varchar(100) NOT NULL DEFAULT '',
user_icq varchar(15) NOT NULL DEFAULT '',
user_aim varchar(255) NOT NULL DEFAULT '',
user_yim varchar(255) NOT NULL DEFAULT '',
user_msnm varchar(255) NOT NULL DEFAULT '',
user_jabber varchar(255) NOT NULL DEFAULT '',
user_website varchar(200) NOT NULL DEFAULT '',
user_occ text(65535) NOT NULL DEFAULT '',
user_interests text(65535) NOT NULL DEFAULT '',
user_actkey varchar(32) NOT NULL DEFAULT '',
user_newpasswd varchar(40) NOT NULL DEFAULT '',
user_form_salt varchar(32) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
CREATE INDEX phpbb_users_user_type ON phpbb_users (user_type);
CREATE UNIQUE INDEX phpbb_users_username_clean ON phpbb_users (username_clean);
# Table: 'phpbb_warnings'
CREATE TABLE phpbb_warnings (
warning_id INTEGER PRIMARY KEY NOT NULL ,
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
log_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
warning_time INTEGER UNSIGNED NOT NULL DEFAULT '0'
);
# Table: 'phpbb_words'
CREATE TABLE phpbb_words (
word_id INTEGER PRIMARY KEY NOT NULL ,
word varchar(255) NOT NULL DEFAULT '',
replacement varchar(255) NOT NULL DEFAULT ''
);
# Table: 'phpbb_zebra'
CREATE TABLE phpbb_zebra (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
zebra_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
friend INTEGER UNSIGNED NOT NULL DEFAULT '0',
foe INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (user_id, zebra_id)
);
CREATE INDEX phpbb_zebra_zebra_user ON phpbb_zebra (zebra_id, user_id);
COMMIT;