PhpBB3 Database Structure Overview phpbb posts

From PHPBB用户手册

Jump to: navigation, search
# Table: 'phpbb_posts'
CREATE TABLE phpbb_posts (
	post_id mediumint(8) UNSIGNED NOT NULL auto_increment, 文章ID
	topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 文章隶属的主题ID
	forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 文章隶属的版面ID
	poster_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 文章作者的用户ID
	icon_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 文章的主题图标ID
	poster_ip varchar(40) DEFAULT '' NOT NULL, 作者发表此文章时使用的ip
	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, 是否允许使用BBCode
	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(5) DEFAULT '' NOT NULL, bbcode的区分码
	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, 文章的最后修改者ID
	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`;