aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db/schemas/mysql_schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/db/schemas/mysql_schema.sql')
-rw-r--r--phpBB/db/schemas/mysql_schema.sql244
1 files changed, 196 insertions, 48 deletions
diff --git a/phpBB/db/schemas/mysql_schema.sql b/phpBB/db/schemas/mysql_schema.sql
index 3bf963785a..2b78fd993d 100644
--- a/phpBB/db/schemas/mysql_schema.sql
+++ b/phpBB/db/schemas/mysql_schema.sql
@@ -6,9 +6,24 @@
# --------------------------------------------------------
#
+# Table structure for table 'phpbb_attach_desc'
+#
+CREATE TABLE phpbb_attach_desc (
+ attach_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ attach_filename varchar(255) NOT NULL,
+ download_count mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ filename varchar(255) NOT NULL,
+ comment varchar(60),
+ mimetype varchar(60),
+ filesize int(20) NOT NULL,
+ filetime int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (attach_id)
+);
+
+# --------------------------------------------------------
+#
# Table structure for table `phpbb_auth_groups`
#
-DROP TABLE IF EXISTS phpbb_auth_groups;
CREATE TABLE phpbb_auth_groups (
group_id mediumint(8) unsigned NOT NULL default '0',
forum_id mediumint(8) unsigned NOT NULL default '0',
@@ -58,8 +73,10 @@ CREATE TABLE phpbb_auth_users (
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ban_userid mediumint(8) NOT NULL,
- ban_ip char(40) NOT NULL,
- ban_email char(50),
+ ban_ip varchar(40) NOT NULL,
+ ban_email varchar(50),
+ ban_start int(11),
+ ban_length int(11),
PRIMARY KEY (ban_id),
KEY ban_ip_user_id (ban_ip, ban_userid)
);
@@ -71,7 +88,7 @@ CREATE TABLE phpbb_banlist (
#
CREATE TABLE phpbb_categories (
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- cat_title char(60),
+ cat_title varchar(60),
cat_order mediumint(8) UNSIGNED NOT NULL,
PRIMARY KEY (cat_id),
KEY cat_order (cat_order)
@@ -91,11 +108,21 @@ CREATE TABLE phpbb_config (
# --------------------------------------------------------
#
+# Table structure for table 'phpbb_config_defaults'
+#
+CREATE TABLE phpbb_config_defaults (
+ config_name varchar(255) NOT NULL,
+ config_value varchar(255) NOT NULL,
+ PRIMARY KEY (config_name)
+);
+
+# --------------------------------------------------------
+#
# Table structure for table 'phpbb_disallow' <- combine with banlist
#
CREATE TABLE phpbb_disallow (
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- disallow_username char(30),
+ disallow_username varchar(30),
PRIMARY KEY (disallow_id)
);
@@ -178,7 +205,7 @@ CREATE TABLE phpbb_groups_moderator (
#
CREATE TABLE phpbb_icons (
icons_id tinyint(4) UNSIGNED NOT NULL auto_increment,
- icons_url char(50),
+ icons_url varchar(50),
icons_width tinyint(4) UNSIGNED NOT NULL,
icons_height tinyint(4) UNSIGNED NOT NULL,
PRIMARY KEY (icons_id)
@@ -195,7 +222,8 @@ CREATE TABLE phpbb_log_moderator (
forum_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
log_ip varchar(40) NOT NULL,
log_time int(11) NOT NULL,
- log_operation varchar(255),
+ log_operation text,
+ log_data text,
PRIMARY KEY (log_id),
KEY forum_id (forum_id),
KEY user_id (user_id)
@@ -204,6 +232,22 @@ CREATE TABLE phpbb_log_moderator (
# --------------------------------------------------------
#
+# Table structure for table 'phpbb_log_admin'
+#
+CREATE TABLE phpbb_log_admin (
+ log_id mediumint(5) UNSIGNED NOT NULL DEFAULT '0',
+ user_id mediumint(8) NOT NULL DEFAULT '0',
+ log_ip varchar(40) NOT NULL,
+ log_time int(11) NOT NULL,
+ log_operation text,
+ log_data text,
+ PRIMARY KEY (log_id),
+ KEY user_id (user_id)
+);
+
+
+# --------------------------------------------------------
+#
# Table structure for table 'phpbb_vote_results'
#
CREATE TABLE phpbb_poll_results (
@@ -223,7 +267,7 @@ CREATE TABLE phpbb_poll_voters (
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
poll_option_id tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
vote_user_id mediumint(8) NOT NULL DEFAULT '0',
- vote_user_ip char(40) NOT NULL,
+ vote_user_ip varchar(40) NOT NULL,
KEY vote_id (vote_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
@@ -239,13 +283,14 @@ CREATE TABLE phpbb_posts (
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) DEFAULT '0' NOT NULL,
- poster_ip char(40) NOT NULL,
+ attach_id mediumint(8) 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_username char(30),
- enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
- enable_html tinyint(1) DEFAULT '0' NOT NULL,
- enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
+ post_username varchar(30),
+ enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
+ enable_html tinyint(1) DEFAULT '0' 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_edit_time int(11),
@@ -264,8 +309,8 @@ CREATE TABLE phpbb_posts (
#
CREATE TABLE phpbb_posts_text (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- bbcode_uid char(10) NOT NULL,
- post_subject char(60),
+ bbcode_uid varchar(10) NOT NULL,
+ post_subject varchar(60),
post_text text,
PRIMARY KEY (post_id)
);
@@ -277,12 +322,13 @@ CREATE TABLE phpbb_posts_text (
#
CREATE TABLE phpbb_privmsgs (
privmsgs_id mediumint(8) UNSIGNED NOT NULL auto_increment,
+ attach_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
privmsgs_type tinyint(4) DEFAULT '0' NOT NULL,
- privmsgs_subject char(60) DEFAULT '0' NOT NULL,
+ privmsgs_subject varchar(60) DEFAULT '0' NOT NULL,
privmsgs_from_userid mediumint(8) DEFAULT '0' NOT NULL,
privmsgs_to_userid mediumint(8) DEFAULT '0' NOT NULL,
privmsgs_date int(11) DEFAULT '0' NOT NULL,
- privmsgs_ip char(40) NOT NULL,
+ privmsgs_ip varchar(40) NOT NULL,
privmsgs_enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_enable_html tinyint(1) DEFAULT '0' NOT NULL,
privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
@@ -299,7 +345,7 @@ CREATE TABLE phpbb_privmsgs (
#
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
+ privmsgs_bbcode_uid varchar(10) DEFAULT '0' NOT NULL,
privmsgs_text text,
PRIMARY KEY (privmsgs_text_id)
);
@@ -370,9 +416,7 @@ CREATE TABLE phpbb_sessions (
session_ip varchar(40) DEFAULT '0' NOT NULL,
session_browser varchar(100) DEFAULT '' NULL,
session_page varchar(50) DEFAULT '0' NOT NULL,
- PRIMARY KEY (session_id),
- KEY session_user_id (session_user_id),
- KEY session_id_user_id (session_id, session_user_id)
+ PRIMARY KEY (session_id)
);
@@ -397,27 +441,105 @@ CREATE TABLE phpbb_smilies (
#
CREATE TABLE phpbb_styles (
style_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ template_id char(50) NOT NULL,
theme_id tinyint(4) UNSIGNED NOT NULL,
- template_name char(50) NOT NULL,
+ imageset_id tinyint(4) UNSIGNED NOT NULL,
style_name char(30) NOT NULL,
- style_default tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (style_id),
- KEY (theme_id)
-);
-
-
-# --------------------------------------------------------
-#
-# Table structure for table 'phpbb_styles_css'
-#
-CREATE TABLE phpbb_styles_css (
- theme_id mediumint(8) UNSIGNED NOT NULL auto_increment,
- css_data text NOT NULL,
- css_extra_data text NOT NULL,
- KEY (theme_id)
-);
-
-
+ KEY (template_id),
+ KEY (theme_id),
+ KEY (imageset_id)
+);
+
+
+# --------------------------------------------------------
+#
+# Table structure for table 'phpbb_styles_template'
+#
+CREATE TABLE phpbb_styles_template (
+ template_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ template_name varchar(30) NOT NULL,
+ template_path varchar(50) NOT NULL,
+ poll_length smallint(5) UNSIGNED NOT NULL,
+ pm_box_length smallint(5) UNSIGNED NOT NULL,
+ compile_crc text,
+ PRIMARY KEY (template_id)
+);
+
+
+# --------------------------------------------------------
+#
+# Table structure for table 'phpbb_styles_theme'
+#
+CREATE TABLE phpbb_styles_theme (
+ theme_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ theme_name varchar(60),
+ css_external varchar(100),
+ css_data text,
+ PRIMARY KEY (theme_id)
+);
+
+
+# --------------------------------------------------------
+#
+# Table structure for table 'phpbb_styles_imageset'
+#
+CREATE TABLE phpbb_styles_imageset (
+ imageset_id tinyint(4) UNSIGNED NOT NULL auto_increment,
+ imageset_name varchar(100),
+ imageset_path varchar(30),
+ post_new varchar(200),
+ post_locked varchar(200),
+ post_pm varchar(200),
+ reply_new varchar(200),
+ reply_pm varchar(200),
+ reply_locked varchar(200),
+ icon_profile varchar(200),
+ icon_pm varchar(200),
+ icon_delete varchar(200),
+ icon_ip varchar(200),
+ icon_quote varchar(200),
+ icon_search varchar(200),
+ icon_edit varchar(200),
+ icon_email varchar(200),
+ icon_www varchar(200),
+ icon_icq varchar(200),
+ icon_aim varchar(200),
+ icon_yim varchar(200),
+ icon_msnm varchar(200),
+ icon_no_email varchar(200) DEFAULT '',
+ icon_no_www varchar(200) DEFAULT '',
+ icon_no_icq varchar(200) DEFAULT '',
+ icon_no_aim varchar(200) DEFAULT '',
+ icon_no_yim varchar(200) DEFAULT '',
+ icon_no_msnm varchar(200) DEFAULT '',
+ goto_post varchar(200),
+ goto_post_new varchar(200),
+ goto_post_latest varchar(200),
+ goto_post_newest varchar(200),
+ forum varchar(200),
+ forum_new varchar(200),
+ forum_locked varchar(200),
+ folder varchar(200),
+ folder_new varchar(200),
+ folder_hot varchar(200),
+ folder_hot_new varchar(200),
+ folder_locked varchar(200),
+ folder_locked_new varchar(200),
+ folder_sticky varchar(200),
+ folder_sticky_new varchar(200),
+ folder_announce varchar(200),
+ folder_announce_new varchar(200),
+ topic_watch varchar(200),
+ topic_unwatch varchar(200),
+ poll_left varchar(200),
+ poll_center varchar(200),
+ poll_right varchar(200),
+ rating varchar(200),
+ PRIMARY KEY (imageset_id)
+);
+
+
# --------------------------------------------------------
#
# Table structure for table 'phpbb_topics'
@@ -428,7 +550,8 @@ CREATE TABLE phpbb_topics (
topic_title varchar(60) NOT NULL,
topic_poster mediumint(8) DEFAULT '0' NOT NULL,
topic_time int(11) DEFAULT '0' NOT NULL,
- topic_icon tinyint(4) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_icon tinyint(4) UNSIGNED DEFAULT '1' NOT NULL,
+ topic_rating tinyint(4) DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
@@ -444,13 +567,25 @@ CREATE TABLE phpbb_topics (
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY topic_moved_id (topic_moved_id),
- KEY topic_status (topic_status),
KEY topic_type (topic_type)
);
# --------------------------------------------------------
#
+# Table structure for table 'phpbb_topics_rating'
+#
+CREATE TABLE phpbb_topics_rating (
+ topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
+ user_id tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
+ rating tinyint(4) NOT NULL,
+ KEY topic_id (topic_id),
+ KEY user_id (user_id)
+);
+
+
+# --------------------------------------------------------
+#
# Table structure for table 'phpbb_topics_watch'
#
CREATE TABLE phpbb_topics_watch (
@@ -482,29 +617,39 @@ CREATE TABLE phpbb_user_group (
#
CREATE TABLE phpbb_users (
user_id mediumint(8) NOT NULL auto_increment,
+
user_active tinyint(1) DEFAULT '1',
+ user_ip varchar(40),
+ user_regdate int(11) DEFAULT '0' NOT NULL,
username varchar(30) NOT NULL,
user_password varchar(32) NOT NULL,
user_email varchar(60),
+
user_session_time int(11) DEFAULT '0' NOT NULL,
user_session_page smallint(5) DEFAULT '0' NOT NULL,
user_lastvisit int(11) DEFAULT '0' NOT NULL,
- user_regdate int(11) DEFAULT '0' NOT NULL,
- user_level tinyint(4) DEFAULT '0',
- user_colourise varchar(6) DEFAULT '' NOT NULL,
+
+ user_colour varchar(6) DEFAULT '' NOT NULL,
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_lang varchar(50),
user_timezone decimal(4,2) DEFAULT '0' NOT NULL,
+ user_dst tinyint(1) DEFAULT '0' NOT NULL,
user_dateformat varchar(15) DEFAULT 'd M Y H:i' NOT NULL,
user_style tinyint(4),
+
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
user_emailtime int(11),
+
+ user_sortby_type varchar(1) DEFAULT 'l' NOT NULL,
+ user_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
+ user_show_days tinyint(1) DEFAULT '0' NOT NULL,
user_viewemail tinyint(1) DEFAULT '1' NOT NULL,
user_viewsigs tinyint(1) DEFAULT '1' NOT NULL,
user_viewavatars tinyint(1) DEFAULT '1' NOT NULL,
user_viewimg tinyint(1) DEFAULT '1' NOT NULL,
+
user_attachsig tinyint(1),
user_allowhtml tinyint(1) DEFAULT '1',
user_allowbbcode tinyint(1) DEFAULT '1',
@@ -516,27 +661,30 @@ CREATE TABLE phpbb_users (
user_notify tinyint(1) DEFAULT '1' NOT NULL,
user_notify_pm tinyint(1) DEFAULT '1' NOT NULL,
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
+
user_rank int(11) DEFAULT '0',
user_avatar char(100),
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
user_avatar_width tinyint(4) UNSIGNED,
user_avatar_height tinyint(4) UNSIGNED,
+
user_sig text,
user_sig_bbcode_uid varchar(10),
+
user_from varchar(100),
user_icq varchar(15),
user_aim varchar(255),
user_yim varchar(255),
user_msnm varchar(255),
user_website varchar(100),
- user_actkey varchar(32),
- user_newpasswd varchar(32),
user_occ varchar(100),
user_interests varchar(255),
- PRIMARY KEY (user_id),
- KEY user_session_time (user_session_time)
+ user_actkey varchar(32),
+ user_newpasswd varchar(32),
+
+ PRIMARY KEY (user_id)
);