DROP TABLE IF EXISTS pre_common_stylevar;
CREATE TABLE pre_common_stylevar (
stylevarid smallint(6) unsigned NOT NULL auto_increment COMMENT '风格变量id',
styleid smallint(6) unsigned NOT NULL default '0' COMMENT '风格id',
variable text NOT NULL COMMENT '变量名',
substitute text NOT NULL COMMENT '变量赋值',
PRIMARY KEY (stylevarid),
KEY styleid (styleid)
) ENGINE=MyISAM COMMENT='风格变量表';
DROP TABLE IF EXISTS pre_common_syscache;
CREATE TABLE pre_common_syscache (
cname varchar(32) NOT NULL COMMENT '缓存名称',
`ctype` tinyint(3) unsigned NOT NULL COMMENT '缓存类型 0=value, serialize=1',
dateline int(10) unsigned NOT NULL COMMENT '缓存生成时间',
`data` mediumblob NOT NULL COMMENT '缓存数据',
PRIMARY KEY (cname)
) ENGINE=MyISAM COMMENT='缓存数据表';
DROP TABLE IF EXISTS pre_common_template;
CREATE TABLE pre_common_template (
templateid smallint(6) unsigned NOT NULL auto_increment COMMENT '模板id',
`name` varchar(30) NOT NULL default COMMENT '名称',
`directory` varchar(100) NOT NULL default COMMENT '目录',
copyright varchar(100) NOT NULL default COMMENT '版权',
PRIMARY KEY (templateid)
) ENGINE=MyISAM COMMENT='模板表';
DROP TABLE IF EXISTS pre_common_usergroup;
CREATE TABLE pre_common_usergroup (
groupid smallint(6) unsigned NOT NULL auto_increment COMMENT '会员组id',
radminid tinyint(3) NOT NULL default '0' COMMENT '关联关管理组',
`type` enum('system','special','member') NOT NULL default 'member' COMMENT '类型',
system varchar(255) NOT NULL default 'private' COMMENT '会员是否可以自由进出',
grouptitle varchar(255) NOT NULL default COMMENT '组头衔',
creditshigher int(10) NOT NULL default '0' COMMENT '该组的积分上限',
creditslower int(10) NOT NULL default '0' COMMENT '该组的积分下限',
stars tinyint(3) NOT NULL default '0' COMMENT '星星数量',
color varchar(255) NOT NULL default COMMENT '组头衔颜色',
icon varchar(255) NOT NULL default ,
allowvisit tinyint(1) NOT NULL default '0' COMMENT '允许访问',
allowsendpm tinyint(1) NOT NULL default '1' COMMENT '是否允许发送短信息',
allowinvite tinyint(1) NOT NULL default '0' COMMENT '允许使用邀请注册',
allowmailinvite tinyint(1) NOT NULL default '0' COMMENT '允许通过论坛邮件系统发送邀请码',
maxinvitenum tinyint(3) unsigned NOT NULL default '0' COMMENT '最大邀请码拥有数量',
inviteprice smallint(6) unsigned NOT NULL default '0' COMMENT '邀请码购买价格',
maxinviteday smallint(6) unsigned NOT NULL default '0' COMMENT '邀请码有效期',
PRIMARY KEY (groupid),
KEY creditsrange (creditshigher,creditslower)
) ENGINE=MyISAM COMMENT='用户组表';
DROP TABLE IF EXISTS pre_common_usergroup_field;
CREATE TABLE pre_common_usergroup_field (
groupid smallint(6) unsigned NOT NULL COMMENT '会员组id',
readaccess tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
allowpost tinyint(1) NOT NULL default '0' COMMENT '允许发帖',
allowreply tinyint(1) NOT NULL default '0' COMMENT '允许回复',
allowpostpoll tinyint(1) NOT NULL default '0' COMMENT '允许发表投票',
allowpostreward tinyint(1) NOT NULL default '0' COMMENT '允许发表悬赏',
allowposttrade tinyint(1) NOT NULL default '0' COMMENT '允许发表交易',
allowpostactivity tinyint(1) NOT NULL default '0' COMMENT '允许发表活动',
allowdirectpost tinyint(1) NOT NULL default '0' COMMENT '是否需要审核',
allowgetattach tinyint(1) NOT NULL default '0' COMMENT '允许下载附件',
allowgetimage tinyint(1) NOT NULL default '0' COMMENT '允许查看图片',
allowpostattach tinyint(1) NOT NULL default '0' COMMENT '允许上传附件',
allowpostimage tinyint(1) NOT NULL default '0' COMMENT '允许上传图片',
allowvote tinyint(1) NOT NULL default '0' COMMENT '允许参与投票',
allowsearch tinyint(1) NOT NULL default '0' COMMENT '允许搜索',
allowcstatus tinyint(1) NOT NULL default '0' COMMENT '允许自定义头衔',
allowinvisible tinyint(1) NOT NULL default '0' COMMENT '允许隐身登录',
allowtransfer tinyint(1) NOT NULL default '0' COMMENT '允许积分转帐',
allowsetreadperm tinyint(1) NOT NULL default '0' COMMENT '允许设置阅读权限',
allowsetattachperm tinyint(1) NOT NULL default '0' COMMENT '允许设置附件权限',
allowposttag tinyint(1) NOT NULL default '0' COMMENT '允许使用标签',
allowhidecode tinyint(1) NOT NULL default '0' COMMENT '允许使用hide代码',
allowhtml tinyint(1) NOT NULL default '0' COMMENT '允许使用html',
allowanonymous tinyint(1) NOT NULL default '0' COMMENT '允许匿名发帖',
allowsigbbcode tinyint(1) NOT NULL default '0' COMMENT '允许签名使用bbcode',
allowsigimgcode tinyint(1) NOT NULL default '0' COMMENT '允许使用img',
allowmagics tinyint(1) unsigned NOT NULL COMMENT '允许使用道具',
disableperiodctrl tinyint(1) NOT NULL default '0' COMMENT '不受时间段限制',
reasonpm tinyint(1) NOT NULL default '0' COMMENT '操作理由短信通知作者',
maxprice smallint(6) unsigned NOT NULL default '0' COMMENT '主题最大售价',
maxsigsize smallint(6) unsigned NOT NULL default '0' COMMENT '最大签名尺寸',
maxattachsize int(10) unsigned NOT NULL default '0' COMMENT '最大附件尺寸',
maxsizeperday int(10) unsigned NOT NULL default '0' COMMENT '每天最大附件总尺寸',
maxthreadsperhour tinyint(3) unsigned NOT NULL default '0' COMMENT '每小时发主题数限制',
maxpostsperhour tinyint(3) unsigned NOT NULL default '0' COMMENT '每小时发回帖数限制',
attachextensions char(100) NOT NULL default COMMENT '允许发表的附件类型',
raterange char(150) NOT NULL default COMMENT '评分范围',
mintradeprice smallint(6) unsigned NOT NULL default '1' COMMENT '交易最小积分',
maxtradeprice smallint(6) unsigned NOT NULL default '0' COMMENT '交易最大积分',
minrewardprice smallint(6) unsigned NOT NULL default '1' COMMENT '悬赏最小积分',
maxrewardprice smallint(6) unsigned NOT NULL default '0' COMMENT '悬赏最大积分',
magicsdiscount tinyint(1) NOT NULL COMMENT '道具折扣',
maxmagicsweight smallint(6) unsigned NOT NULL COMMENT '道具负载最大值',
allowpostdebate tinyint(1) NOT NULL default '0' COMMENT '允许发表辩论',
tradestick tinyint(1) unsigned NOT NULL COMMENT '可商品推荐数',
exempt tinyint(1) unsigned NOT NULL COMMENT '用户组表达式',
maxattachnum smallint(6) NOT NULL default '0' COMMENT '最大每天附件数量',
allowposturl tinyint(1) NOT NULL default '3' COMMENT '是否允许发送含 url 内容',
allowrecommend tinyint(1) unsigned NOT NULL default '1' COMMENT '是否允许评价主题',
allowpostrushreply TINYINT(1) NOT NULL DEFAULT '0' COMMENT '允许发表抢楼帖',
maxfriendnum smallint(6) unsigned NOT NULL default '0' COMMENT '最多好友数',
maxspacesize int(10) unsigned NOT NULL default '0' COMMENT '空间大小',
allowcomment tinyint(1) NOT NULL default '0' COMMENT '发表留言/评论',
allowcommentarticle smallint(6) NOT NULL default '0' COMMENT '发表文章的评论',
searchinterval smallint(6) unsigned NOT NULL default '0' COMMENT '两次搜索操作间隔',
searchignore tinyint(1) NOT NULL default '0' COMMENT '是否免费搜索',
allowblog tinyint(1) NOT NULL default '0' COMMENT '发表日志',
allowdoing tinyint(1) NOT NULL default '0' COMMENT '发表记录',
allowupload tinyint(1) NOT NULL default '0' COMMENT '上传图片',
allowshare tinyint(1) NOT NULL default '0' COMMENT '发布分享',
allowblogmod tinyint(1) unsigned NOT NULL default '0' COMMENT '发表日志需要审核',
allowdoingmod tinyint(1) unsigned NOT NULL default '0' COMMENT '发表记录需要审核',
allowuploadmod tinyint(1) unsigned NOT NULL default '0' COMMENT '上传图片需要审核',
allowsharemod tinyint(1) unsigned NOT NULL default '0' COMMENT '发布分享需要审核',
allowcss tinyint(1) NOT NULL default '0' COMMENT '允许自定义CSS',
allowpoke tinyint(1) NOT NULL default '0' COMMENT '允许打招呼',
allowfriend tinyint(1) NOT NULL default '0' COMMENT '允许加好友',
allowclick tinyint(1) NOT NULL default '0' COMMENT '允许表态',
allowmagic tinyint(1) NOT NULL default '0' COMMENT '允许使用道具',
allowstat tinyint(1) NOT NULL default '0' COMMENT '允许查看趋势统计',
allowstatdata tinyint(1) NOT NULL default '0' COMMENT '允许查看统计数据报表',
videophotoignore tinyint(1) NOT NULL default '0' COMMENT '视频认证限制',
allowviewvideophoto tinyint(1) NOT NULL default '0' COMMENT '允许查看视频认证',
allowmyop tinyint(1) NOT NULL default '0' COMMENT '允许使用应用',
magicdiscount tinyint(1) NOT NULL default '0' COMMENT '购买道具折扣',
domainlength smallint(6) unsigned NOT NULL default '0' COMMENT '二级域名最短长度',
seccode tinyint(1) NOT NULL default '1' COMMENT '发布操作需填验证码',
disablepostctrl tinyint(1) NOT NULL DEFAULT '0' COMMENT '发表是否受防灌水限制',
allowbuildgroup tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许建立群组,0为不允许',
allowgroupdirectpost tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许直接在群组中发帖',
allowgroupposturl tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否允许在群组中发站外URL',
edittimelimit smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '编辑帖子时间限制',
allowpostarticle tinyint(1) NOT NULL default '0' COMMENT '允许发布文章',
allowdownlocalimg tinyint(1) NOT NULL default '0' COMMENT '允许下载本地图片',
allowdownremoteimg tinyint(1) NOT NULL default '0' COMMENT '允许下载远程图片',
allowpostarticlemod tinyint(1) unsigned NOT NULL default '0' COMMENT '发布文章是否需要审核',
allowspacediyhtml tinyint(1) NOT NULL default '0' COMMENT '允许自定义模块使用HTML',
allowspacediybbcode tinyint(1) NOT NULL default '0' COMMENT '允许自定义模块使用BBCODE',
allowspacediyimgcode tinyint(1) NOT NULL default '0' COMMENT '允许自定义模块使用[img]',
allowcommentpost tinyint(1) NOT NULL default '2' COMMENT '允许帖子点评 0:禁止 1:楼主 2:回复 3:All',
allowcommentitem tinyint(1) NOT NULL default '0' COMMENT '允许发表点评观点',
allowcommentreply tinyint(1) NOT NULL default '0' COMMENT '允许发表回复点评',
allowreplycredit tinyint(1) NOT NULL default '0' COMMENT '允许设置回帖奖励',
ignorecensor tinyint(1) unsigned NOT NULL default '0' COMMENT '是否忽略要审核的关键字',
allowsendallpm tinyint(1) unsigned NOT NULL default '0' COMMENT '是否不受“只接收好友短消息”设置的限制',
allowsendpmmaxnum smallint(6) unsigned NOT NULL default '0' COMMENT '24小时内允许发短消息的数量',
maximagesize mediumint(8) unsigned NOT NULL default '0' COMMENT '相册中允许最大图片大小',
allowmediacode tinyint(1) NOT NULL default '0' COMMENT '允许使用多媒体代码',
allowat smallint(6) unsigned NOT NULL default '0' COMMENT '允许@用户 0:禁止 n:发帖时@的数量',
allowsetpublishdate tinyint(1) unsigned NOT NULL default '0' COMMENT '允许定时发布主题',
allowfollowcollection tinyint(1) unsigned NOT NULL default '0' COMMENT '允许关注淘专辑数',
allowcommentcollection tinyint(1) unsigned NOT NULL default '0' COMMENT '允许评论淘专辑',
allowcreatecollection smallint(6) unsigned NOT NULL default '0' COMMENT '允许创建淘专辑数',
PRIMARY KEY (groupid)
) ENGINE=MyISAM COMMENT='会员用户组权限表';
DROP TABLE IF EXISTS pre_common_word;
CREATE TABLE pre_common_word (
id smallint(6) unsigned NOT NULL auto_increment COMMENT '词汇id',
admin varchar(15) NOT NULL default COMMENT '管理员名',
type smallint(6) NOT NULL default '1' COMMENT '关键词分类',
find varchar(255) NOT NULL default COMMENT '不良词语',
replacement varchar(255) NOT NULL default COMMENT '替换内容',
extra varchar(255) NOT NULL default ,
PRIMARY KEY (id)
) ENGINE=MyISAM COMMENT='词语过滤表';
DROP TABLE IF EXISTS pre_common_word_type;
CREATE TABLE pre_common_word_type (
id smallint(6) unsigned NOT NULL auto_increment COMMENT '词语过滤分类id',
typename varchar(15) NOT NULL default COMMENT '分类名称',
PRIMARY KEY (id)
) ENGINE=MyISAM COMMENT='词语过滤分类';
DROP TABLE IF EXISTS pre_common_tag;
CREATE TABLE pre_common_tag (
tagid smallint(6) unsigned NOT NULL auto_increment COMMENT '标签id',
tagname char(20) NOT NULL default COMMENT '标签名',
status tinyint(1) NOT NULL default '0' COMMENT '显示状态\n(0:正常 1:关闭 2:推荐 3:用户标签)',
PRIMARY KEY (tagid),
KEY tagname (tagname),
KEY status (status, tagid)
) ENGINE=MyISAM COMMENT='标签表';
DROP TABLE IF EXISTS pre_common_tagitem;
CREATE TABLE pre_common_tagitem (
tagid smallint(6) unsigned NOT NULL default '0' COMMENT '标签id',
itemid mediumint(8) unsigned NOT NULL default '0' COMMENT 'itemid',
idtype char(10) NOT NULL default COMMENT '内容类型',
UNIQUE KEY item (tagid, itemid, idtype),
KEY idtype (idtype, itemid)
) ENGINE=MyISAM COMMENT='标签内容表';
DROP TABLE IF EXISTS pre_forum_access;
CREATE TABLE pre_forum_access (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
allowview tinyint(1) NOT NULL default '0' COMMENT '允许浏览',
allowpost tinyint(1) NOT NULL default '0' COMMENT '允许发表',
allowreply tinyint(1) NOT NULL default '0' COMMENT '允许回复',
allowgetattach tinyint(1) NOT NULL default '0' COMMENT '允许下载附件',
allowgetimage tinyint(1) NOT NULL default '0' COMMENT '允许查看图片',
allowpostattach tinyint(1) NOT NULL default '0' COMMENT '允许上传附件',
allowpostimage tinyint(1) NOT NULL default '0' COMMENT '允许上传图片',
adminuser mediumint(8) unsigned NOT NULL default '0' COMMENT '管理员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '时间',
PRIMARY KEY (uid,fid),
KEY listorder (fid,dateline)
) ENGINE=MyISAM COMMENT='访问权限表';
DROP TABLE IF EXISTS pre_forum_activity;
CREATE TABLE pre_forum_activity (
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
aid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题图片id',
cost mediumint(8) unsigned NOT NULL default '0' COMMENT '每人花销',
starttimefrom int(10) unsigned NOT NULL default '0' COMMENT '开始时间',
starttimeto int(10) unsigned NOT NULL default '0' COMMENT '结束时间',
place varchar(255) NOT NULL default COMMENT '地点',
class varchar(255) NOT NULL default COMMENT '类别',
gender tinyint(1) NOT NULL default '0' COMMENT '性别',
number smallint(5) unsigned NOT NULL default '0' COMMENT '人数',
applynumber smallint(5) unsigned NOT NULL default '0' COMMENT '已参加人数',
expiration int(10) unsigned NOT NULL default '0' COMMENT '报名截止日期',
ufield TEXT NOT NULL COMMENT '用户定制项目',
credit smallint(6) unsigned NOT NULL default '0' COMMENT '需消耗的积分',
PRIMARY KEY (tid),
KEY uid (uid,starttimefrom),
KEY starttimefrom (starttimefrom),
KEY expiration (expiration),
KEY applynumber (applynumber)
) ENGINE=MyISAM COMMENT='活动表';
DROP TABLE IF EXISTS pre_forum_activityapply;
CREATE TABLE pre_forum_activityapply (
applyid int(10) unsigned NOT NULL auto_increment COMMENT '申请id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
username varchar(255) NOT NULL default COMMENT '用户名',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
message varchar(255) NOT NULL default COMMENT '消息',
verified tinyint(1) NOT NULL default '0' COMMENT '是否审核通过\n(0:N 1:Y 2:需完善资料)',
dateline int(10) unsigned NOT NULL default '0' COMMENT '申请时间',
payment mediumint(8) NOT NULL default '0' COMMENT '每人花销',
ufielddata TEXT NOT NULL COMMENT '用户定制项目数据',
PRIMARY KEY (applyid),
KEY uid (uid),
KEY tid (tid),
KEY dateline (tid,dateline)
) ENGINE=MyISAM COMMENT='活动申请表';
DROP TABLE IF EXISTS pre_forum_announcement;
CREATE TABLE pre_forum_announcement (
id smallint(6) unsigned NOT NULL auto_increment COMMENT '公告id',
author varchar(15) NOT NULL default COMMENT '作者姓名',
`subject` varchar(255) NOT NULL default COMMENT '公告标题',
`type` tinyint(1) NOT NULL default '0' COMMENT '公告类型\n(0:文字公告 1:网址链接)',
displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
starttime int(10) unsigned NOT NULL default '0' COMMENT '开始时间',
endtime int(10) unsigned NOT NULL default '0' COMMENT '结束时间',
message text NOT NULL COMMENT '消息',
groups text NOT NULL COMMENT '接受用户组',
PRIMARY KEY (id),
KEY timespan (starttime,endtime)
) ENGINE=MyISAM COMMENT='公告表';
DROP TABLE IF EXISTS pre_forum_threadimage;
CREATE TABLE pre_forum_threadimage (
`tid` mediumint(8) unsigned NOT NULL DEFAULT '0',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
KEY tid (tid)
) ENGINE=MyISAM COMMENT='主题图片表';
DROP TABLE IF EXISTS pre_forum_attachment;
CREATE TABLE pre_forum_attachment (
aid mediumint(8) unsigned NOT NULL auto_increment COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
tableid tinyint(1) unsigned NOT NULL default '0' COMMENT '附件表id',
downloads mediumint(8) NOT NULL default '0' COMMENT '下载次数',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件索引表';
DROP TABLE IF EXISTS pre_forum_attachment_exif;
CREATE TABLE pre_forum_attachment_exif (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
exif text NOT NULL COMMENT 'exif信息',
PRIMARY KEY (aid)
) ENGINE=MyISAM COMMENT='Exif缓存表';
DROP TABLE IF EXISTS pre_forum_attachment_unused;
CREATE TABLE pre_forum_attachment_unused (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
PRIMARY KEY (aid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='未使用附件表';
DROP TABLE IF EXISTS pre_forum_attachment_0;
CREATE TABLE pre_forum_attachment_0 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_1;
CREATE TABLE pre_forum_attachment_1 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_2;
CREATE TABLE pre_forum_attachment_2 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_3;
CREATE TABLE pre_forum_attachment_3 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_4;
CREATE TABLE pre_forum_attachment_4 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_5;
CREATE TABLE pre_forum_attachment_5 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_6;
CREATE TABLE pre_forum_attachment_6 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_7;
CREATE TABLE pre_forum_attachment_7 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_8;
CREATE TABLE pre_forum_attachment_8 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachment_9;
CREATE TABLE pre_forum_attachment_9 (
aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
filename varchar(255) NOT NULL default COMMENT '原文件名',
filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
attachment varchar(255) NOT NULL default COMMENT '服务器路径',
remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
description varchar(255) NOT NULL COMMENT '说明',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid),
KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';
DROP TABLE IF EXISTS pre_forum_attachtype;
CREATE TABLE pre_forum_attachtype (
id smallint(6) unsigned NOT NULL auto_increment COMMENT '类型id',
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
extension char(12) NOT NULL default COMMENT '扩展名',
maxsize int(10) unsigned NOT NULL default '0' COMMENT '允许上传最大值',
PRIMARY KEY (id),
KEY fid (fid)
) ENGINE=MyISAM COMMENT='附件类型表';
DROP TABLE IF EXISTS pre_forum_bbcode;
CREATE TABLE pre_forum_bbcode (
id mediumint(8) unsigned NOT NULL auto_increment COMMENT '代码id',
available tinyint(1) NOT NULL default '0' COMMENT '是否启用\n(0:不启用 1:启用但不显示 2:启用并显示)',
tag varchar(100) NOT NULL default COMMENT '标签',
icon varchar(255) NOT NULL COMMENT '图标',
replacement text NOT NULL COMMENT '替换内容',
example varchar(255) NOT NULL default COMMENT '例子',
explanation text NOT NULL COMMENT '解释说明',
params tinyint(1) unsigned NOT NULL default '1' COMMENT '参数个数',
prompt text NOT NULL COMMENT '标签描述',
nest tinyint(3) unsigned NOT NULL default '1' COMMENT '嵌套层次',
displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
perm text NOT NULL COMMENT '有权使用的用户组',
PRIMARY KEY (id)
) ENGINE=MyISAM COMMENT='Discuz! 代码表';
DROP TABLE IF EXISTS pre_forum_creditslog;
CREATE TABLE pre_forum_creditslog (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
fromto char(15) NOT NULL default COMMENT '来自/到',
sendcredits tinyint(1) NOT NULL default '0' COMMENT '转出积分字段',
receivecredits tinyint(1) NOT NULL default '0' COMMENT '接受积分字段',
send int(10) unsigned NOT NULL default '0' COMMENT '转出积分',
receive int(10) unsigned NOT NULL default '0' COMMENT '接受积分',
dateline int(10) unsigned NOT NULL default '0' COMMENT '转帐日期',
operation char(3) NOT NULL default COMMENT '操作',
KEY uid (uid,dateline)
) ENGINE=MyISAM COMMENT='转帐记录表';
DROP TABLE IF EXISTS pre_forum_debate;
CREATE TABLE pre_forum_debate (
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '发起人id',
starttime int(10) unsigned NOT NULL default '0' COMMENT '开始时间',
endtime int(10) unsigned NOT NULL default '0' COMMENT '结束时间',
affirmdebaters mediumint(8) unsigned NOT NULL default '0' COMMENT '正方辩论人数',
negadebaters mediumint(8) unsigned NOT NULL default '0' COMMENT '反方辩论人数',
affirmvotes mediumint(8) unsigned NOT NULL default '0' COMMENT '正方得票数',
negavotes mediumint(8) unsigned NOT NULL default '0' COMMENT '反方得票数',
umpire varchar(15) NOT NULL default COMMENT '裁判用户名',
winner tinyint(1) NOT NULL default '0' COMMENT '获胜方\n(0:平局 1:为正方 2:为反方)\n裁判评判结果',
bestdebater varchar(50) NOT NULL default COMMENT '最佳辩手用户名',
affirmpoint text NOT NULL COMMENT '正方观点',
negapoint text NOT NULL COMMENT '反方观点',
umpirepoint text NOT NULL COMMENT '裁判观点,裁判结束辩论时填写',
affirmvoterids text NOT NULL COMMENT '正方投票人的 id 集合',
negavoterids text NOT NULL COMMENT '反方投票人的 id 集合',
affirmreplies mediumint(8) unsigned NOT NULL COMMENT '正方回复次数,用来翻页',
negareplies mediumint(8) unsigned NOT NULL COMMENT '反方回复次数,用来翻页',
PRIMARY KEY (tid),
KEY uid (uid,starttime)
) ENGINE=MyISAM COMMENT='辩论主题表';
DROP TABLE IF EXISTS pre_forum_debatepost;
CREATE TABLE pre_forum_debatepost (
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
stand tinyint(1) NOT NULL default '0' COMMENT '立场\n(0:中立 1:正方 2:为反方)',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '发起人id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '发表的时间',
voters mediumint(10) unsigned NOT NULL default '0' COMMENT '投票人数',
voterids text NOT NULL COMMENT '投票人的 id 集合',
PRIMARY KEY (pid),
KEY pid (pid,stand),
KEY tid (tid,uid)
) ENGINE=MyISAM COMMENT='辩论帖子表';
DROP TABLE IF EXISTS pre_forum_faq;
CREATE TABLE pre_forum_faq (
id smallint(6) NOT NULL auto_increment COMMENT '帮助id',
fpid smallint(6) unsigned NOT NULL default '0' COMMENT '帮助父id',
displayorder tinyint(3) NOT NULL default '0' COMMENT '排序',
identifier varchar(20) NOT NULL COMMENT '帮助标识',
keyword varchar(50) NOT NULL COMMENT '帮助关键词',
title varchar(50) NOT NULL COMMENT '帮助标题',
message text NOT NULL COMMENT '帮助内容',
PRIMARY KEY (id),
KEY displayplay (displayorder)
) ENGINE=MyISAM COMMENT='论坛帮助表';
DROP TABLE IF EXISTS pre_forum_postcache;
CREATE TABLE pre_forum_postcache (
pid int(10) unsigned NOT NULL,
comment text NOT NULL COMMENT '点评内容缓存',
rate text NOT NULL COMMENT '评分情况缓存',
dateline int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (pid),
KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='论坛帖子缓存表';
DROP TABLE IF EXISTS pre_home_favorite;
CREATE TABLE pre_home_favorite (
favid mediumint(8) unsigned NOT NULL auto_increment COMMENT '收藏id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
id mediumint(8) unsigned NOT NULL default '0',
idtype varchar(255) NOT NULL default ,
spaceuid mediumint(8) unsigned NOT NULL default '0' COMMENT '空间会员id',
title varchar(255) NOT NULL default COMMENT '标题',
description text NOT NULL COMMENT '简介',
dateline int(10) unsigned NOT NULL default '0',
PRIMARY KEY (favid),
KEY idtype (id,idtype),
KEY uid (uid,idtype,dateline)
) ENGINE=MyISAM COMMENT='收藏表';
DROP TABLE IF EXISTS pre_forum_forum;
CREATE TABLE pre_forum_forum (
fid mediumint(8) unsigned NOT NULL auto_increment COMMENT '论坛id',
fup mediumint(8) unsigned NOT NULL default '0' COMMENT '上级论坛id',
`type` enum('group','forum','sub') NOT NULL default 'forum' COMMENT '类型\n(group:分类 forum:普通论坛 sub:子论坛)',
`name` char(50) NOT NULL default COMMENT '名称',
`status` tinyint(1) NOT NULL default '0' COMMENT '显示状态\n(0:隐藏 1:正常 3:群组)',
displayorder smallint(6) NOT NULL default '0' COMMENT '显示顺序',
styleid smallint(6) unsigned NOT NULL default '0' COMMENT '风格id',
threads mediumint(8) unsigned NOT NULL default '0' COMMENT '主题数量',
posts mediumint(8) unsigned NOT NULL default '0' COMMENT '帖子数量',
todayposts mediumint(8) unsigned NOT NULL default '0' COMMENT '今日发帖数量',
lastpost char(110) NOT NULL default COMMENT '最后发表',
domain char(15) NOT NULL default COMMENT '绑定的二级域名',
allowsmilies tinyint(1) NOT NULL default '0' COMMENT '允许使用表情',
allowhtml tinyint(1) NOT NULL default '0' COMMENT '允许使用html',
allowbbcode tinyint(1) NOT NULL default '0' COMMENT '允许bbcode',
allowimgcode tinyint(1) NOT NULL default '0' COMMENT '允许img',
allowmediacode tinyint(1) NOT NULL default '0' COMMENT '允许使用多媒体代码',
allowanonymous tinyint(1) NOT NULL default '0' COMMENT '允许匿名',
allowpostspecial smallint(6) unsigned NOT NULL default '0' COMMENT '允许发表特殊主题',
allowspecialonly tinyint(1) unsigned NOT NULL default '0' COMMENT '只允许发表特殊主题',
allowappend tinyint(1) unsigned NOT NULL default '0' COMMENT '是否开启帖子补充',
alloweditrules tinyint(1) NOT NULL default '0' COMMENT '允许版主修改论坛规则',
allowfeed tinyint(1) NOT NULL default '1' COMMENT '允许推送动态,默认推送广播',
allowside tinyint(1) NOT NULL default '0' COMMENT '显示边栏',
recyclebin tinyint(1) NOT NULL default '0' COMMENT '是否启用回收站',
modnewposts tinyint(1) NOT NULL default '0' COMMENT '是否审核发帖',
jammer tinyint(1) NOT NULL default '0' COMMENT '是否启用干扰码',
disablewatermark tinyint(1) NOT NULL default '0' COMMENT '是否图片附件增加水印',
inheritedmod tinyint(1) NOT NULL default '0' COMMENT '本论坛或分类版主的权力继承到下级论坛',
autoclose smallint(6) NOT NULL default '0' COMMENT '自动关闭主题',
forumcolumns tinyint(3) unsigned NOT NULL default '0' COMMENT '增加论坛水平横排设置',
catforumcolumns tinyint(3) unsigned NOT NULL default '0' COMMENT '增加分区版块水平横排设置',
threadcaches tinyint(1) NOT NULL default '0' COMMENT '主题缓存功能设置',
alloweditpost tinyint(1) unsigned NOT NULL default '1' COMMENT '允许编辑帖子',
`simple` tinyint(1) unsigned NOT NULL default '0' COMMENT '只显示子版块',
modworks tinyint(1) unsigned NOT NULL default '0' COMMENT '本版有待处理的管理事项',
allowglobalstick tinyint(1) NOT NULL default '1' COMMENT '是否显示全局置顶',
level smallint(6) NOT NULL default '0' COMMENT '群组等级',
commoncredits int(10) unsigned NOT NULL default '0' COMMENT '群组公共积分',
`archive` tinyint(1) NOT NULL default '0' COMMENT '是否有存档表',
recommend smallint(6) unsigned NOT NULL default '0' COMMENT '推荐到的版块',
favtimes mediumint(8) unsigned NOT NULL default '0' COMMENT '版块或群组的收藏次数',
sharetimes mediumint(8) unsigned NOT NULL default '0' COMMENT '版块或群组的分享次数',
disablethumb tinyint(1) NOT NULL default '0' COMMENT '是否添加缩略图',
disablecollect tinyint(1) NOT NULL default '0' COMMENT '禁止淘帖',
PRIMARY KEY (fid),
KEY forum (`status`,`type`,displayorder),
KEY fup_type (`fup`,`type`,displayorder),
KEY fup (fup)
) ENGINE=MyISAM COMMENT='版块表';
DROP TABLE IF EXISTS pre_forum_forumfield;
CREATE TABLE pre_forum_forumfield (
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '版块id',
description text NOT NULL COMMENT '解释说明',
`password` varchar(12) NOT NULL default COMMENT '私密论坛密码',
icon varchar(255) NOT NULL default COMMENT '图标',
redirect varchar(255) NOT NULL default COMMENT 'URL转发',
attachextensions varchar(255) NOT NULL default COMMENT '允许上传附件类型',
creditspolicy mediumtext NOT NULL COMMENT '版块积分策略',
formulaperm text NOT NULL COMMENT '版块权限表达式',
moderators text NOT NULL COMMENT '版主列表,格式:admin',
rules text NOT NULL COMMENT '版块规则',
threadtypes text NOT NULL COMMENT '主题分类,序列化存放的设置,格式为一个数组',
threadsorts text NOT NULL COMMENT '分类信息,序列化存放的设置,格式为一个数组',
viewperm text NOT NULL COMMENT '阅读权限, 格式: 1 4 5',
postperm text NOT NULL COMMENT '发表权限, 格式: 1 4 5',
replyperm text NOT NULL COMMENT '回复权限, 格式: 1 4 5',
getattachperm text NOT NULL COMMENT '下载附件权限, 格式: 1 4 5',
postattachperm text NOT NULL COMMENT '上传附件权限, 格式: 1 4 5',
postimageperm text NOT NULL COMMENT '上传图片权限, 格式: 1 4 5',
spviewperm text NOT NULL COMMENT '不受限于版权权限表达式, 格式: 1 4 5',
seotitle text NOT NULL COMMENT '版块seo标题',
keywords text NOT NULL COMMENT '版块seo关键词',
seodescription text NOT NULL COMMENT '版块seo描述',
supe_pushsetting text NOT NULL COMMENT 'supe推送设置,序列化存放设置数据,格式为一个数组。',
modrecommend text NOT NULL COMMENT '版主推荐规则',
threadplugin text NOT NULL COMMENT '特殊主题插件数据',
extra TEXT NOT NULL,
jointype tinyint(1) NOT NULL default '0' COMMENT '加入群组方式 -1为关闭,0为公开, 2邀请',
gviewperm tinyint(1) unsigned NOT NULL default '0' COMMENT '群组浏览权限 0:仅成员 1:所有用户',
membernum smallint(6) unsigned NOT NULL default '0' COMMENT '群组成员数',
dateline int(10) unsigned NOT NULL default '0' COMMENT '群组创建时间',
lastupdate int(10) unsigned NOT NULL default '0' COMMENT '群组最后更新时间',
activity int(10) unsigned NOT NULL default '0' COMMENT '群组活跃度',
founderuid mediumint(8) unsigned NOT NULL default '0' COMMENT '群组创始人UID',
foundername varchar(255) NOT NULL default COMMENT '群组创始人名称',
banner varchar(255) NOT NULL default COMMENT '群组头图片',
groupnum smallint(6) unsigned NOT NULL default '0' COMMENT '分类下的群组数量',
commentitem TEXT NOT NULL,
relatedgroup TEXT NOT NULL,
picstyle tinyint(1) NOT NULL default '0' COMMENT '帖子列表是否以图片形式显示 0:否 1:是',
widthauto tinyint(1) NOT NULL default '0' COMMENT '默认是否宽屏 0:全局 -1:宽屏 1:窄屏',
PRIMARY KEY (fid),
KEY membernum (membernum),
KEY dateline (dateline),
KEY lastupdate (lastupdate),
KEY activity (activity)
) ENGINE=MyISAM COMMENT='版块扩展表';
DROP TABLE IF EXISTS pre_forum_forum_threadtable;
CREATE TABLE pre_forum_forum_threadtable (
`fid` smallint(6) unsigned NOT NULL COMMENT '版块id',
`threadtableid` smallint(6) unsigned NOT NULL COMMENT 'thread分区id',
`threads` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '主题数',
`posts` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '帖子数',
PRIMARY KEY (`fid`,`threadtableid`)
) ENGINE=MyISAM COMMENT='版块存档信息';
DROP TABLE IF EXISTS pre_forum_forumrecommend;
CREATE TABLE pre_forum_forumrecommend (
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '版块id',
tid mediumint(8) unsigned NOT NULL COMMENT '帖子id',
typeid smallint(6) NOT NULL COMMENT '是否含有附件图片',
displayorder tinyint(1) NOT NULL COMMENT '推荐顺序',
`subject` char(80) NOT NULL COMMENT '推荐主题标题',
author char(15) NOT NULL COMMENT '推荐主题作者',
authorid mediumint(8) NOT NULL COMMENT '推荐主题作者id',
moderatorid mediumint(8) NOT NULL COMMENT '推荐管理人员id',
expiration int(10) unsigned NOT NULL COMMENT '推荐主题有效期',
position tinyint(1) NOT NULL default '0' COMMENT '显示位置',
highlight tinyint(1) NOT NULL default '0' COMMENT '高亮颜色',
aid mediumint(8) unsigned NOT NULL default '0' COMMENT '附件ID',
filename char(100) NOT NULL default COMMENT '附件文件',
PRIMARY KEY (tid),
KEY displayorder (fid,displayorder),
KEY position (position)
) ENGINE=MyISAM COMMENT='版主推荐表';
DROP TABLE IF EXISTS pre_forum_imagetype;
CREATE TABLE pre_forum_imagetype (
typeid smallint(6) unsigned NOT NULL auto_increment COMMENT '分类id',
available tinyint(1) NOT NULL default '0' COMMENT '是否启用',
`name` char(20) NOT NULL COMMENT '分类名称',
`type` enum('smiley','icon','avatar') NOT NULL default 'smiley' COMMENT '分类类型\n(smiley:表情 icon:图标 avatar:头像)',
displayorder tinyint(3) NOT NULL default '0' COMMENT '分类顺序',
`directory` char(100) NOT NULL COMMENT '图片目录',
PRIMARY KEY (typeid)
) ENGINE=MyISAM COMMENT='图片 表情 头像等 分类';
DROP TABLE IF EXISTS pre_forum_medal;
CREATE TABLE pre_forum_medal (
medalid smallint(6) unsigned NOT NULL auto_increment COMMENT '勋章id',
`name` varchar(50) NOT NULL default COMMENT '勋章名称',
available tinyint(1) NOT NULL default '0' COMMENT '是否启用',
image varchar(255) NOT NULL default COMMENT '勋章图片',
`type` tinyint(1) NOT NULL default '0' COMMENT '勋章类型',
displayorder tinyint(3) NOT NULL default '0' COMMENT '勋章显示顺序',
description varchar(255) NOT NULL COMMENT '勋章描述',
expiration smallint(6) unsigned NOT NULL default '0' COMMENT '勋章有效期',
permission mediumtext NOT NULL COMMENT '勋章获得条件表达式',
`credit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '勋章购买使用积分',
`price` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '勋章价格',
PRIMARY KEY (medalid),
KEY displayorder (displayorder),
KEY `available` (`available`,`displayorder`)
) ENGINE=MyISAM COMMENT='勋章表';
DROP TABLE IF EXISTS pre_forum_medallog;
CREATE TABLE pre_forum_medallog (
id mediumint(8) unsigned NOT NULL auto_increment COMMENT '记录id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '勋章拥有着用户id',
medalid smallint(6) unsigned NOT NULL default '0' COMMENT '勋章id',
`type` tinyint(1) NOT NULL default '0' COMMENT '勋章类型id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '颁发时间id',
expiration int(10) unsigned NOT NULL default '0' COMMENT '有效期id',
`status` tinyint(1) NOT NULL default '0' COMMENT '勋章状态id',
PRIMARY KEY (id),
KEY `type` (`type`),
KEY `status` (`status`,expiration),
KEY uid (uid,medalid,`type`),
KEY `dateline` (`dateline`)
) ENGINE=MyISAM COMMENT='勋章日志表';
DROP TABLE IF EXISTS pre_common_member_magic;
CREATE TABLE pre_common_member_magic (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户uid',
magicid smallint(6) unsigned NOT NULL default '0' COMMENT '道具id',
num smallint(6) unsigned NOT NULL default '0' COMMENT '拥有数量',
PRIMARY KEY (uid,magicid)
) ENGINE=MyISAM COMMENT='用户道具数据表';
DROP TABLE IF EXISTS pre_common_member_medal;
CREATE TABLE pre_common_member_medal (
uid mediumint(8) unsigned NOT NULL,
medalid smallint(6) unsigned NOT NULL,
PRIMARY KEY (uid,medalid)
) ENGINE=MyISAM COMMENT='用户勋章数据表';
DROP TABLE IF EXISTS pre_forum_memberrecommend;
CREATE TABLE pre_forum_memberrecommend (
tid mediumint(8) unsigned NOT NULL COMMENT '主题ID',
recommenduid mediumint(8) unsigned NOT NULL COMMENT '推荐会员ID',
dateline int(10) unsigned NOT NULL COMMENT '推荐时间',
KEY tid (tid),
KEY uid (recommenduid)
) ENGINE=MyISAM COMMENT='用户推荐表';
DROP TABLE IF EXISTS pre_forum_moderator;
CREATE TABLE pre_forum_moderator (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
inherited tinyint(1) NOT NULL default '0' COMMENT '是否继承',
PRIMARY KEY (uid,fid)
) ENGINE=MyISAM COMMENT='版主表';
DROP TABLE IF EXISTS pre_forum_modwork;
CREATE TABLE pre_forum_modwork (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
modaction char(3) NOT NULL default COMMENT '动作',
dateline date NOT NULL default '2006-01-01' COMMENT '时间段',
count smallint(6) unsigned NOT NULL default '0' COMMENT '登录次数',
posts smallint(6) unsigned NOT NULL default '0' COMMENT '发表数',
KEY uid (uid,dateline)
) ENGINE=MyISAM COMMENT='论坛管理统计表';
DROP TABLE IF EXISTS pre_common_mytask;
CREATE TABLE pre_common_mytask (
uid mediumint(8) unsigned NOT NULL COMMENT '用户Uid',
username char(15) NOT NULL default COMMENT '用户名',
taskid smallint(6) unsigned NOT NULL COMMENT '任务id',
`status` tinyint(1) NOT NULL default '0' COMMENT '任务状态\n(-1:失败 0:进行中 1:已完成)',
csc char(255) NOT NULL default COMMENT '任务进度',
dateline int(10) unsigned NOT NULL default '0' COMMENT '申请任务时间',
PRIMARY KEY (uid,taskid),
KEY parter (taskid,dateline)
) ENGINE=MyISAM COMMENT='我的任务表';
DROP TABLE IF EXISTS pre_forum_onlinelist;
CREATE TABLE pre_forum_onlinelist (
groupid smallint(6) unsigned NOT NULL default '0' COMMENT '会员组id',
displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
title varchar(30) NOT NULL default COMMENT '组名称',
url varchar(30) NOT NULL default COMMENT '图例URL'
) ENGINE=MyISAM COMMENT='在线列表定制';
DROP TABLE IF EXISTS pre_forum_order;
CREATE TABLE pre_forum_order (
orderid char(32) NOT NULL default COMMENT '订单号id',
`status` char(3) NOT NULL default COMMENT '状态',
buyer char(50) NOT NULL default COMMENT '购买者姓名',
admin char(15) NOT NULL default COMMENT '补单管理员姓名',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '购买者id',
amount int(10) unsigned NOT NULL default '0' COMMENT '数量',
price float(7,2) unsigned NOT NULL default '0.00' COMMENT '价格',
submitdate int(10) unsigned NOT NULL default '0' COMMENT '提交日期',
confirmdate int(10) unsigned NOT NULL default '0' COMMENT '确认日期',
email char(40) NOT NULL default COMMENT '购买时的Email',
ip char(15) NOT NULL default COMMENT '购买时的IP',
UNIQUE KEY orderid (orderid),
KEY submitdate (submitdate),
KEY uid (uid,submitdate)
) ENGINE=MyISAM COMMENT='订单信息表';
|