Discuz7.2数据字典[1] 不指定

jed , 2010-9-15 09:43 , 代码编程 , 评论(0) , 阅读(5540) , Via 本站原创 | |
DROP TABLE IF EXISTS cdb_access;
CREATE TABLE cdb_access (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   fid smallint(6) 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 '允许下载附件',
   allowpostattach 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)
) TYPE=MyISAM COMMENT='访问权限表';

DROP TABLE IF EXISTS cdb_activities;
CREATE TABLE cdb_activities (
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   uid 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 char(40) NOT NULL DEFAULT '' COMMENT '地点',
   class char(20) NOT NULL DEFAULT '' COMMENT '类别',
   gender tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别',
   number smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '人数',
   expiration int(10) unsigned NOT NULL DEFAULT '0' COMMENT '报名截止日期',
   PRIMARY KEY   (tid),
   KEY uid (uid,starttimefrom)
) TYPE=MyISAM COMMENT='活动表';

DROP TABLE IF EXISTS cdb_activityapplies;
CREATE TABLE cdb_activityapplies (
   applyid int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '申请id',
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   username char(15) NOT NULL DEFAULT '' COMMENT '用户名',
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   message char(200) NOT NULL DEFAULT '' COMMENT '消息',
   verified tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否审核通过\n(0:N 1:Y)',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '申请时间',
   payment mediumint(8) NOT NULL DEFAULT '0' COMMENT '每人花销',
   contact char(200) NOT NULL COMMENT '活动申请人联系方式',
   PRIMARY KEY   (applyid),
   KEY uid (uid),
   KEY tid (tid),
   KEY dateline (tid,dateline)
) TYPE=MyISAM COMMENT='活动申请表';

DROP TABLE IF EXISTS cdb_adminactions;
CREATE TABLE cdb_adminactions (
   admingid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '管理组id',
   disabledactions text NOT NULL COMMENT '禁止使用的功能\n序列化存放的数组数据',
   PRIMARY KEY   (admingid)
) TYPE=MyISAM COMMENT='关联用户组表';

DROP TABLE IF EXISTS cdb_admincustom;
CREATE TABLE cdb_admincustom (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '项目id',
   title varchar(255) NOT NULL COMMENT '菜单标题',
   url varchar(255) NOT NULL COMMENT '菜单链接',
   sort tinyint(1) NOT NULL DEFAULT '0' COMMENT '菜单类型\n(0:历史操作 1:常用操作)',
   displayorder tinyint(3) NOT NULL COMMENT '显示顺序',
   clicks smallint(6) unsigned NOT NULL DEFAULT '1' COMMENT '点击数',
   uid mediumint(8) unsigned NOT NULL COMMENT '操作者Uid',
   dateline int(10) unsigned NOT NULL COMMENT '最后操作时间',
   PRIMARY KEY   (id),
   KEY uid (uid),
   KEY displayorder (displayorder)
) TYPE=MyISAM COMMENT='后台动作记录表';

DROP TABLE IF EXISTS cdb_admingroups;
CREATE TABLE cdb_admingroups (
   admingid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '管理组id',
   alloweditpost tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许编辑帖子',
   alloweditpoll tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许编辑投票',
   allowstickthread tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许置顶',
   allowmodpost tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许管理帖子',
   allowdelpost tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许删除帖子',
   allowmassprune tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许批量主题管理',
   allowrefund tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许强制退款',
   allowcensorword tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许过滤词语',
   allowviewip tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许查看用户IP',
   allowbanip tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许禁止IP访问',
   allowedituser tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许编辑用户',
   allowmoduser tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许用户管理',
   allowbanuser tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许禁止用户',
   allowpostannounce tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许匿名发帖',
   allowviewlog tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许查看管理日志',
   allowbanpost tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许单贴屏蔽',
   disablepostctrl tinyint(1) NOT NULL DEFAULT '0' COMMENT '发帖不受限制',
   supe_allowpushthread tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许和Supe推送主题',
   PRIMARY KEY   (admingid)
) TYPE=MyISAM COMMENT='管理组表';

DROP TABLE IF EXISTS cdb_adminnotes;
CREATE TABLE cdb_adminnotes (
   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '后台留言id',
   admin varchar(15) NOT NULL DEFAULT '' COMMENT '管理员姓名',
   access tinyint(3) NOT NULL DEFAULT '0' COMMENT '哪组可以看到信息',
   adminid tinyint(3) NOT NULL DEFAULT '0' COMMENT '管理员id',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发表时间',
   expiration int(10) unsigned NOT NULL DEFAULT '0' COMMENT '过期时间',
   message text NOT NULL COMMENT '消息',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='后台留言表';

DROP TABLE IF EXISTS cdb_adminsessions;
CREATE TABLE cdb_adminsessions (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   adminid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '管理组id',
   panel tinyint(1) NOT NULL DEFAULT '0' COMMENT '管理面板类型',
   ip varchar(15) NOT NULL DEFAULT '' COMMENT 'IP地址',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录时间',
   errorcount tinyint(1) NOT NULL DEFAULT '0' COMMENT '错误次数',
   storage mediumtext NOT NULL COMMENT '用户相关数据',
   PRIMARY KEY (uid,panel)
) TYPE=MyISAM COMMENT='管理员认证表';

DROP TABLE IF EXISTS cdb_addons;
CREATE TABLE cdb_addons (
   key varchar(255) NOT NULL DEFAULT '' COMMENT '资源提供商ID',
   title varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
   sitename varchar(255) NOT NULL DEFAULT '' COMMENT '站点名称',
   siteurl varchar(255) NOT NULL DEFAULT '' COMMENT '站点 URL',
   description varchar(255) NOT NULL DEFAULT '' COMMENT '说明',
   contact varchar(255) NOT NULL DEFAULT '' COMMENT '联系方式',
   logo varchar(255) NOT NULL DEFAULT '' COMMENT 'LOGO 图片 URL',
   system tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统提商(无法删除的)',
   PRIMARY KEY (key)
) TYPE=MyISAM COMMENT='扩展中心资源提供商';

DROP TABLE IF EXISTS cdb_advertisements;
CREATE TABLE cdb_advertisements (
   advid mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '广告id',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
   type varchar(50) NOT NULL DEFAULT '0' COMMENT '类型',
   displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '显示顺序',
   title varchar(255) NOT NULL DEFAULT '' COMMENT '广告标题',
   targets text NOT NULL COMMENT '投放范围',
   parameters text NOT NULL COMMENT '参数\n序列化存放的数组数据',
   code text NOT NULL COMMENT '代码',
   starttime int(10) unsigned NOT NULL DEFAULT '0' COMMENT '开始时间',
   endtime int(10) unsigned NOT NULL DEFAULT '0' COMMENT '结束时间',
   PRIMARY KEY   (advid)
) TYPE=MyISAM COMMENT='广告数据表';

DROP TABLE IF EXISTS cdb_announcements;
CREATE TABLE cdb_announcements (
   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)
) TYPE=MyISAM COMMENT='公告表';

DROP TABLE IF EXISTS cdb_attachments;
CREATE TABLE cdb_attachments (
   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',
   width smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '附件宽度',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传时间',
   readperm tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '阅读权限',
   price smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '附件价格',
   filename char(100) NOT NULL DEFAULT '' COMMENT '原文件名',
   filetype char(50) NOT NULL DEFAULT '' COMMENT '文件类型',
   filesize int(10) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小',
   attachment char(100) NOT NULL DEFAULT '' COMMENT '服务器路径',
   downloads mediumint(8) NOT NULL DEFAULT '0' COMMENT '下载次数',
   isimage tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否图片',
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   thumb tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否是缩率图',
   remote tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否远程附件',
   PRIMARY KEY (aid),
   KEY tid (tid),
   KEY pid (pid,aid),
   KEY uid (uid),
   KEY dateline (dateline, isimage, downloads)
) TYPE=MyISAM COMMENT='附件表';

DROP TABLE IF EXISTS cdb_attachmentfields;
CREATE TABLE cdb_attachmentfields (
   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',
   description VARCHAR( 255 ) NOT NULL COMMENT '解释说明',
   PRIMARY KEY ( aid ),
   KEY tid (tid),
   KEY pid (pid,aid),
   KEY uid (uid)
) TYPE = MYISAM COMMENT='附件扩展表';

DROP TABLE IF EXISTS cdb_attachpaymentlog;
CREATE TABLE cdb_attachpaymentlog (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '购买者 uid',
   aid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '被购买的附件 aid',
   authorid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '附件所属主题作者的 uid',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '购买日期',
   amount int(10) unsigned NOT NULL DEFAULT '0' COMMENT '售价',
   netamount int(10) unsigned NOT NULL DEFAULT '0' COMMENT '作者所得(去除了积分交易税)',
   PRIMARY KEY   (aid,uid),
   KEY uid (uid),
   KEY authorid (authorid)
) TYPE=MyISAM COMMENT='附件付费日志表';

DROP TABLE IF EXISTS cdb_attachtypes;
CREATE TABLE cdb_attachtypes (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '类型id',
   extension char(12) NOT NULL DEFAULT '' COMMENT '扩展名',
   maxsize int(10) unsigned NOT NULL DEFAULT '0' COMMENT '允许上传最大值',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='附件类型表';

DROP TABLE IF EXISTS cdb_banned;
CREATE TABLE cdb_banned (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '禁止id',
   ip1 smallint(3) NOT NULL DEFAULT '0' COMMENT 'IP分段1',
   ip2 smallint(3) NOT NULL DEFAULT '0' COMMENT 'IP分段2',
   ip3 smallint(3) NOT NULL DEFAULT '0' COMMENT 'IP分段3',
   ip4 smallint(3) NOT NULL DEFAULT '0' COMMENT 'IP分段4',
   admin varchar(15) NOT NULL DEFAULT '' COMMENT '管理员姓名',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '禁止时间',
   expiration int(10) unsigned NOT NULL DEFAULT '0' COMMENT '过期时间',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='禁止访问表';

DROP TABLE IF EXISTS cdb_bbcodes;
CREATE TABLE cdb_bbcodes (
   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 '显示顺序',
   PRIMARY KEY   (id)
) TYPE=MyISAM   COMMENT='Discuz! 代码表';

DROP TABLE IF EXISTS cdb_caches;
CREATE TABLE cdb_caches (
   cachename varchar(32) NOT NULL COMMENT '缓存名称',
   type tinyint(3) unsigned NOT NULL COMMENT '缓存类型 1 表示系统缓存',
   dateline int(10) unsigned NOT NULL COMMENT '缓存生成时间',
   expiration int(10) unsigned NOT NULL COMMENT '缓存过期时间',
   data mediumtext NOT NULL COMMENT '缓存数据',
   PRIMARY KEY   (cachename),
   KEY expiration (`type`,expiration)
) TYPE=MyISAM COMMENT='缓存数据表';

DROP TABLE IF EXISTS cdb_creditslog;
CREATE TABLE cdb_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)
) TYPE=MyISAM COMMENT='转帐记录表';

DROP TABLE IF EXISTS cdb_crons;
CREATE TABLE cdb_crons (
   cronid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '计划任务id',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
   type enum('user','system') NOT NULL DEFAULT 'user' COMMENT '类型',
   name char(50) NOT NULL DEFAULT '' COMMENT '名称',
   filename char(50) NOT NULL DEFAULT '' COMMENT '对应文件',
   lastrun int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上次执行时间',
   nextrun int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下次执行时间',
   weekday tinyint(1) NOT NULL DEFAULT '0' COMMENT '周计划',
   day tinyint(2) NOT NULL DEFAULT '0' COMMENT '日计划',
   hour tinyint(2) NOT NULL DEFAULT '0' COMMENT '小时计划',
   minute char(36) NOT NULL DEFAULT '' COMMENT '分计划',
   PRIMARY KEY   (cronid),
   KEY nextrun (available,nextrun)
) TYPE=MyISAM   COMMENT='计划任务表';

DROP TABLE IF EXISTS cdb_debateposts;
CREATE TABLE cdb_debateposts (
   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)
) TYPE=MyISAM COMMENT='辩论帖子表';

DROP TABLE IF EXISTS cdb_debates;
CREATE TABLE cdb_debates (
   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)
) TYPE=MyISAM COMMENT='辩论主题表';

DROP TABLE IF EXISTS cdb_failedlogins;
CREATE TABLE cdb_failedlogins (
   ip char(15) NOT NULL DEFAULT '' COMMENT '失败IP',
   count tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '尝试次数',
   lastupdate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后一次尝试时间',
   PRIMARY KEY   (ip)
) TYPE=MyISAM COMMENT='失败登录表';

DROP TABLE IF EXISTS cdb_faqs;
CREATE TABLE cdb_faqs (
   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)
) TYPE=MyISAM   COMMENT='论坛帮助表';

DROP TABLE IF EXISTS cdb_favorites;
CREATE TABLE cdb_favorites (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   fid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '论坛id',
   KEY uid (uid)
) TYPE=MyISAM COMMENT='收藏表';

DROP TABLE IF EXISTS cdb_favoritethreads;
CREATE TABLE cdb_favoritethreads (
   tid mediumint(8) NOT NULL DEFAULT '0' COMMENT '主题ID',
   uid mediumint(8) NOT NULL DEFAULT '0' COMMENT '会员ID',
   dateline int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
   newreplies smallint(6) NOT NULL DEFAULT '0' COMMENT '新回复数目',
   PRIMARY KEY (tid, uid)
) TYPE=MYISAM COMMENT='主题关注表';

DROP TABLE IF EXISTS cdb_favoriteforums;
CREATE TABLE cdb_favoriteforums (
   fid smallint(6) NOT NULL DEFAULT '0' COMMENT '版块ID',
   uid mediumint(8) NOT NULL DEFAULT '0' COMMENT '会员ID',
   dateline int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间',
   newthreads mediumint(8) NOT NULL DEFAULT '0' COMMENT '新主题数目',
   PRIMARY KEY (fid, uid)

) TYPE=MYISAM COMMENT='版块关注表';


DROP TABLE IF EXISTS cdb_feeds;
CREATE TABLE cdb_feeds (
   feed_id mediumint(8) unsigned NOT NULL auto_increment COMMENT 'Feed id',
   type varchar(255) NOT NULL DEFAULT 'default' COMMENT 'Feed 类型,Feed模板由此值确定',
   fid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '如果是帖子类型的Feed,帖子属于的版块id',
   typeid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '同上,帖子属于的主题分类id',
   sortid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '同上,帖子属于的分类信息id',
   appid varchar(30) NOT NULL DEFAULT '' COMMENT '漫游应用的id',
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '所属会员uid',
   username varchar(15) NOT NULL DEFAULT '' COMMENT '所属会员username',
   data text NOT NULL DEFAULT '' COMMENT 'Feed数据,序列化后保存',
   template text NOT NULL DEFAULT '' COMMENT '自定义feed模板',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Feed加入的时间,时间戳格式',
   PRIMARY KEY (feed_id),
   KEY type(type),
   KEY dateline (dateline),
   KEY uid(uid),
   KEY appid(appid)
) TYPE=MyISAM COMMENT='论坛Feed表';

DROP TABLE IF EXISTS cdb_forumfields;
CREATE TABLE cdb_forumfields (
   fid smallint(6) 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 '图标',
   postcredits varchar(255) NOT NULL DEFAULT '' COMMENT '发帖积分',
   replycredits varchar(255) NOT NULL DEFAULT '' COMMENT '回复积分',
   getattachcredits varchar(255) NOT NULL DEFAULT '' COMMENT '下载附件积分',
   postattachcredits varchar(255) NOT NULL DEFAULT '' COMMENT '发表附件积分',
   digestcredits varchar(255) NOT NULL DEFAULT '' COMMENT '精华积分',
   redirect varchar(255) NOT NULL DEFAULT '' COMMENT 'URL转发',
   attachextensions varchar(255) NOT NULL DEFAULT '' 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',
   keywords text NOT NULL COMMENT '版块seo关键词',
   supe_pushsetting text NOT NULL COMMENT 'supe推送设置,序列化存放设置数据,格式为一个数组。',
   modrecommend text NOT NULL COMMENT '版主推荐规则',
   tradetypes text NOT NULL COMMENT '版块商品分类',
   typemodels mediumtext NOT NULL COMMENT '分类信息模型id',
   threadplugin text NOT NULL,
   PRIMARY KEY   (fid)
) TYPE=MyISAM COMMENT='论坛扩展表';

DROP TABLE IF EXISTS cdb_forumlinks;
CREATE TABLE cdb_forumlinks (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '联盟id',
   displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '显示顺序,正序',
   name varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
   url varchar(255) NOT NULL DEFAULT '' COMMENT '联盟论坛url',
   description mediumtext NOT NULL COMMENT '解释说明',
   logo varchar(255) NOT NULL DEFAULT '' COMMENT '联盟论坛logo',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='联盟论坛表';

DROP TABLE IF EXISTS cdb_forumrecommend;
CREATE TABLE cdb_forumrecommend (
   fid smallint(6) 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 ) NULL 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)
) TYPE=MyISAM COMMENT='版主推荐表';

DROP TABLE IF EXISTS cdb_forums;
CREATE TABLE cdb_forums (
   fid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '论坛id',
   fup smallint(6) 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(1:正常 0:隐藏)',
   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 '最后发表',
   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 '允许匿名',
   allowshare tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许共享到文集和supe',
   allowpostspecial smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '允许发表特殊主题',
   allowspecialonly tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '只允许发表特殊主题',
   alloweditrules tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许版主修改论坛规则',
   allowfeed tinyint(1) NOT NULL DEFAULT '1' 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 '增加论坛水平横排设置',
   threadcaches tinyint(1) NOT NULL DEFAULT '0' COMMENT '主题缓存功能设置',
   alloweditpost tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '允许编辑帖子',
   simple tinyint(1) unsigned NOT NULL COMMENT '只显示子版块',
   modworks tinyint(1) unsigned NOT NULL COMMENT '本版有待处理的管理事项',
   allowtag tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用标签功能',
   allowglobalstick tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示全局置顶',
   PRIMARY KEY   (fid),
   KEY forum (status,type,displayorder),
   KEY fup (fup)
) TYPE=MyISAM COMMENT='版块表';

DROP TABLE IF EXISTS cdb_imagetypes;
CREATE TABLE cdb_imagetypes (
   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)
) TYPE=MyISAM COMMENT='图片(表情、头像等)分类';

DROP TABLE IF EXISTS cdb_invites;
CREATE TABLE cdb_invites (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码拥有者id',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码购买时间',
   expiration int(10) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码有效期',
   inviteip char(15) NOT NULL COMMENT '邀请码购买者IP',
   invitecode char(16) NOT NULL COMMENT '邀请码',
   reguid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码使用者id',
   regdateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码使用者使用时间',
   status tinyint(1) NOT NULL DEFAULT '1' COMMENT '邀请码状态',
   KEY uid (uid,status),
   KEY invitecode (invitecode)
) TYPE=MyISAM COMMENT='邀请注册数据表';

DROP TABLE IF EXISTS cdb_itempool;
CREATE TABLE cdb_itempool (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '验证问题id',
   type tinyint(1) unsigned NOT NULL COMMENT '验证问题类型',
   question text NOT NULL COMMENT '验证问题',
   answer varchar(255) NOT NULL COMMENT '问题答案',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='验证问题数据表';

DROP TABLE IF EXISTS cdb_magiclog;
CREATE TABLE cdb_magiclog (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
   magicid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '道具id',
   action tinyint(1) NOT NULL DEFAULT '0' COMMENT '操作动作',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
   amount smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '操作数量',
   price mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '操作价格',
   targettid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '道具目标tid',
   targetpid int(10) unsigned NOT NULL DEFAULT '0' COMMENT '道具目标pid',
   targetuid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '道具目标uid',
   KEY uid (uid,dateline),
   KEY targetuid (targetuid,dateline)
) TYPE=MyISAM COMMENT='道具日志表';

DROP TABLE IF EXISTS cdb_magicmarket;
CREATE TABLE cdb_magicmarket (
   mid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '操作道具id',
   magicid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '道具id',
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '出售者uid',
   username char(15) NOT NULL COMMENT '出售者用户名',
   price mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '出售价格',
   num smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '出售数量',
   PRIMARY KEY   (mid),
   KEY num (magicid,num),
   KEY price (magicid,price),
   KEY uid (uid)
) TYPE=MyISAM COMMENT='道具市场数据表';

DROP TABLE IF EXISTS cdb_magics;
CREATE TABLE cdb_magics (
   magicid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '道具id',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
   type tinyint(3) NOT NULL DEFAULT '0' COMMENT '类型id',
   name varchar(50) NOT NULL COMMENT '名称',
   identifier varchar(40) NOT NULL COMMENT '唯一标识',
   description varchar(255) NOT NULL COMMENT '描述',
   displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '顺序',
   price mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '价格',
   num smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '数量',
   salevolume smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '销售量',
   supplytype tinyint(1) NOT NULL DEFAULT '0' COMMENT '自动补货类型',
   supplynum smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '自动补货数量',
   weight tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '重量',
   recommend tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为推荐道具',
   filename varchar(50) NOT NULL COMMENT '对应文件',
   magicperm text NOT NULL COMMENT '权限',
   PRIMARY KEY   (magicid),
   UNIQUE KEY identifier (identifier),
   KEY displayorder (available,displayorder)
) TYPE=MyISAM COMMENT='道具数据表';

DROP TABLE IF EXISTS cdb_medallog;
CREATE TABLE cdb_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`)
) TYPE=MyISAM COMMENT='勋章日志表';

DROP TABLE IF EXISTS cdb_medals;
CREATE TABLE cdb_medals (
   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 '勋章获得条件表达式',
   PRIMARY KEY (medalid),
   KEY displayorder (displayorder)
) TYPE=MyISAM COMMENT='勋章表';

DROP TABLE IF EXISTS cdb_memberfields;
CREATE TABLE cdb_memberfields (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   nickname varchar(30) NOT NULL DEFAULT '' COMMENT '用户昵称',
   site varchar(75) NOT NULL DEFAULT '' COMMENT '主页',
   alipay varchar(50) NOT NULL DEFAULT '' COMMENT '支付宝帐号',
   icq varchar(12) NOT NULL DEFAULT '' COMMENT 'ICQ',
   qq varchar(12) NOT NULL DEFAULT '' COMMENT 'QQ',
   yahoo varchar(40) NOT NULL DEFAULT '' COMMENT 'YAHOO',
   msn varchar(100) NOT NULL DEFAULT '' COMMENT 'MSN',
   taobao varchar(40) NOT NULL DEFAULT '' COMMENT '阿里旺旺',
   location varchar(30) NOT NULL DEFAULT '' COMMENT '来自',
   customstatus varchar(30) NOT NULL DEFAULT '' COMMENT '自定义头衔',
   medals text NOT NULL COMMENT '勋章信息',
   avatar varchar(255) NOT NULL DEFAULT '' COMMENT '头像',
   avatarwidth tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '头像宽度',
   avatarheight tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '头像高度',
   bio text NOT NULL COMMENT '自我介绍',
   sightml text NOT NULL COMMENT '签名',
   ignorepm text NOT NULL COMMENT '短消息忽略列表',
   groupterms text NOT NULL COMMENT '公共用户组',
   authstr varchar(20) NOT NULL DEFAULT '' COMMENT 'Email认证串',
   spacename varchar(40) NOT NULL COMMENT 'minispace空间名称',
   buyercredit smallint(6) NOT NULL DEFAULT '0' COMMENT '买家信用等级及积分',
   sellercredit smallint(6) NOT NULL DEFAULT '0' COMMENT '卖家信用等级及积分',
   PRIMARY KEY   (uid)
) TYPE=MyISAM COMMENT='会员扩展表';

DROP TABLE IF EXISTS cdb_membermagics;
CREATE TABLE cdb_membermagics (
   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 '拥有数量',
   KEY uid (uid)
) TYPE=MyISAM COMMENT='用户道具数据表';

DROP TABLE IF EXISTS cdb_members;
CREATE TABLE cdb_members (
   uid mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '会员id',
   username char(15) NOT NULL DEFAULT '' COMMENT '用户名',
   password char(32) NOT NULL DEFAULT '' COMMENT '密码',
   secques char(8) NOT NULL DEFAULT '' COMMENT '安全码',
   gender tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别\n(0:保密 1:男 2:女)',
   adminid tinyint(1) NOT NULL DEFAULT '0' COMMENT '管理员id',
   groupid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '会员组id',
   groupexpiry int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户组有效期',
   extgroupids char(20) NOT NULL DEFAULT '' COMMENT '扩展用户组',
   regip char(15) NOT NULL DEFAULT '' COMMENT '注册IP',
   regdate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间',
   lastip char(15) NOT NULL DEFAULT '' COMMENT '最后登录IP',
   lastvisit int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后访问',
   lastactivity int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后活动',
   lastpost int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后发表',
   posts mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '帖子数',
   threads mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
   digestposts smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '精华数',
   oltime smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '在线时间',
   pageviews mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '页面访问量',
   credits int(10) NOT NULL DEFAULT '0' COMMENT '总积分',
   extcredits1 int(10) NOT NULL DEFAULT '0' COMMENT '声望',
   extcredits2 int(10) NOT NULL DEFAULT '0' COMMENT '金钱',
   extcredits3 int(10) NOT NULL DEFAULT '0' COMMENT '扩展',
   extcredits4 int(10) NOT NULL DEFAULT '0' COMMENT '扩展',
   extcredits5 int(10) NOT NULL DEFAULT '0' COMMENT '扩展',
   extcredits6 int(10) NOT NULL DEFAULT '0' COMMENT '扩展',
   extcredits7 int(10) NOT NULL DEFAULT '0' COMMENT '扩展',
   extcredits8 int(10) NOT NULL DEFAULT '0' COMMENT '扩展',
   email char(40) NOT NULL DEFAULT '' COMMENT '邮箱',
   bday date NOT NULL DEFAULT '0000-00-00' COMMENT '生日',
   sigstatus tinyint(1) NOT NULL DEFAULT '0' COMMENT '签名状态',
   tpp tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '每页显示主题数',
   ppp tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '每页显示帖子数',
   styleid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '风格id',
   dateformat tinyint(1) NOT NULL DEFAULT '0' COMMENT '日期格式',
   timeformat tinyint(1) NOT NULL DEFAULT '0' COMMENT '时间格式',
   pmsound tinyint(1) NOT NULL DEFAULT '0' COMMENT '短信声音',
   showemail tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否公开邮箱',
   newsletter tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否接受论坛通知',
   invisible tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否隐身登录',
   timeoffset char(4) NOT NULL DEFAULT '' COMMENT '时区校正',
   prompt tinyint(1) NOT NULL DEFAULT '0' COMMENT '新短消息提醒 新任务提醒 二进制存储',
   accessmasks tinyint(1) NOT NULL DEFAULT '0' COMMENT '标志',
   editormode tinyint(1) unsigned NOT NULL DEFAULT '2' COMMENT '编辑器模式',
   customshow tinyint(1) unsigned NOT NULL DEFAULT '26' COMMENT '自定义帖子显示模式',
   xspacestatus tinyint(1) NOT NULL DEFAULT '0' COMMENT 'supe状态',
   customaddfeed tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户自定义推送事件',
   newbietaskid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '当前正在进行的新手任务',
   PRIMARY KEY   (uid),
   UNIQUE KEY username (username),
   KEY email (email),
   KEY groupid (groupid)
) TYPE=MyISAM COMMENT='会员表';

DROP TABLE IF EXISTS cdb_memberrecommend;
CREATE TABLE cdb_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`)
) TYPE=MyISAM COMMENT='用户推荐表';

DROP TABLE IF EXISTS cdb_memberspaces;
CREATE TABLE cdb_memberspaces (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '用户 uid',
   style char(20) NOT NULL COMMENT '风格路径',
   description char(100) NOT NULL COMMENT '空间说明注释',
   layout char(200) NOT NULL COMMENT '空间模块',
   side tinyint(1) NOT NULL DEFAULT '0' COMMENT '空间布局',
   PRIMARY KEY   (uid)
) TYPE=MyISAM COMMENT='个人空间数据表';

DROP TABLE IF EXISTS cdb_moderators;
CREATE TABLE cdb_moderators (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   fid smallint(6) 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)
) TYPE=MyISAM COMMENT='版主表';

DROP TABLE IF EXISTS cdb_modworks;
CREATE TABLE cdb_modworks (
   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)
) TYPE=MyISAM COMMENT='论坛管理统计表';

DROP TABLE IF EXISTS cdb_mytasks;
CREATE TABLE cdb_mytasks (
   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)
) TYPE=MyISAM COMMENT='我的任务表';

DROP TABLE IF EXISTS cdb_navs;
CREATE TABLE cdb_navs (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '项目id',
   parentid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '父 id',
   name char(50) NOT NULL COMMENT '栏目名称',
   title char(255) NOT NULL COMMENT '栏目说明',
   url char(255) NOT NULL COMMENT '链接地址',
   target tinyint(1) NOT NULL DEFAULT '0' COMMENT '目标框架\n(0:本窗口 1:新窗口)',
   type tinyint(1) NOT NULL DEFAULT '0' COMMENT '类型 0 系统   1 自定义',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
   displayorder tinyint(3) NOT NULL COMMENT '显示顺序',
   highlight tinyint(1) NOT NULL DEFAULT '0' COMMENT '样式',
   level tinyint(1) NOT NULL DEFAULT '0' COMMENT '使用等级\n(0:游客 1:会员 2:版主 3:管理员)',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='自定义导航栏表';

DROP TABLE IF EXISTS cdb_onlinelist;
CREATE TABLE cdb_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'
) TYPE=MyISAM COMMENT='在线列表定制';

DROP TABLE IF EXISTS cdb_onlinetime;
CREATE TABLE cdb_onlinetime (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   thismonth smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '本月在线时间',
   total mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '总计在线时间',
   lastupdate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后访问时间',
   PRIMARY KEY   (uid)
) TYPE=MyISAM COMMENT='在线时间表';

DROP TABLE IF EXISTS cdb_orders;
CREATE TABLE cdb_orders (
   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 '确认日期',
   UNIQUE KEY orderid (orderid),
   KEY submitdate (submitdate),
   KEY uid (uid,submitdate)
) TYPE=MyISAM COMMENT='订单信息表';

DROP TABLE IF EXISTS cdb_paymentlog;
CREATE TABLE cdb_paymentlog (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   authorid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '作者id',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '帖子买卖时间',
   amount int(10) unsigned NOT NULL DEFAULT '0' COMMENT '价格',
   netamount int(10) unsigned NOT NULL DEFAULT '0' COMMENT '作者收入',
   PRIMARY KEY   (tid,uid),
   KEY uid (uid),
   KEY authorid (authorid)
) TYPE=MyISAM COMMENT='帖子买卖日志';

DROP TABLE IF EXISTS cdb_pluginhooks;
CREATE TABLE cdb_pluginhooks (
   pluginhookid mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '钩子id',
   pluginid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '插件id',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
   title varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
   description mediumtext NOT NULL COMMENT '解释说明',
   code mediumtext NOT NULL COMMENT '代码',
   PRIMARY KEY   (pluginhookid),
   KEY pluginid (pluginid),
   KEY available (available)
) TYPE=MyISAM COMMENT='插件HOOK表';

DROP TABLE IF EXISTS cdb_plugins;
CREATE TABLE cdb_plugins (
   pluginid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '插件id',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
   adminid tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id',
   name varchar(40) NOT NULL DEFAULT '' COMMENT '名称',
   identifier varchar(40) NOT NULL DEFAULT '' COMMENT '唯一标识符',
   description varchar(255) NOT NULL DEFAULT '' COMMENT '解释说明',
   datatables varchar(255) NOT NULL DEFAULT '' COMMENT '插件数据表',
   directory varchar(100) NOT NULL DEFAULT '' COMMENT '插件目录',
   copyright varchar(100) NOT NULL DEFAULT '' COMMENT '版权信息',
   modules text NOT NULL COMMENT '插件信息',
   version varchar(20) NOT NULL default '' COMMENT '插件版本',
   PRIMARY KEY   (pluginid),
   UNIQUE KEY identifier (identifier)

) TYPE=MyISAM COMMENT='插件表';

DROP TABLE IF EXISTS cdb_pluginvars;
CREATE TABLE cdb_pluginvars (
   pluginvarid mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '插件变量id',
   pluginid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '插件id',
   displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '显示顺序',
   title varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
   description varchar(255) NOT NULL DEFAULT '' COMMENT '解释说明',
   variable varchar(40) NOT NULL DEFAULT '' COMMENT '变量名',
   type varchar(20) NOT NULL DEFAULT 'text' COMMENT '类型',
   value text NOT NULL COMMENT '值',
   extra text NOT NULL COMMENT '附加',
   PRIMARY KEY   (pluginvarid),
   KEY pluginid (pluginid)
) TYPE=MyISAM COMMENT='插件变量表';

DROP TABLE IF EXISTS cdb_polloptions;
CREATE TABLE cdb_polloptions (
   polloptionid int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '选项id',
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   votes mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '票数',
   displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '显示顺序',
   polloption varchar(80) NOT NULL DEFAULT '' COMMENT '选项内容',
   voterids mediumtext NOT NULL COMMENT '投票人id',
   PRIMARY KEY   (polloptionid),
   KEY tid (tid,displayorder)
) TYPE=MyISAM COMMENT='投票选项表';

DROP TABLE IF EXISTS cdb_polls;
CREATE TABLE cdb_polls (
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   overt tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否公开投票参与人',
   multiple tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否多选',
   visible tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否投票可见',
   maxchoices tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '最大可选项数',
   expiration int(10) unsigned NOT NULL DEFAULT '0' COMMENT '过期时间',
   PRIMARY KEY (tid)
) TYPE=MyISAM COMMENT='投票表';

DROP TABLE IF EXISTS cdb_posts;
CREATE TABLE cdb_posts (
   pid int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '帖子id',
   fid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '论坛id',
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   first tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是首贴',
   author varchar(15) NOT NULL DEFAULT '' COMMENT '作者姓名',
   authorid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '作者id',
   subject varchar(80) NOT NULL DEFAULT '' COMMENT '标题',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发表时间',
   message mediumtext NOT NULL COMMENT '消息',
   useip varchar(15) NOT NULL DEFAULT '' COMMENT '发帖者IP',
   invisible tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否通过审核',
   anonymous tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否匿名',
   usesig tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用签名',
   htmlon tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许HTML',
   bbcodeoff tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否关闭BBCODE',
   smileyoff tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否关闭表情',
   parseurloff tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否允许粘贴URL',
   attachment tinyint(1) NOT NULL DEFAULT '0' COMMENT '附件',
   rate smallint(6) NOT NULL DEFAULT '0' COMMENT '评分分数',
   ratetimes tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '评分次数',
   status tinyint(1) NOT NULL DEFAULT '0' COMMENT '帖子状态',
   PRIMARY KEY   (pid),
   KEY fid (fid),
   KEY authorid (authorid),
   KEY dateline (dateline),
   KEY invisible (invisible),
   KEY displayorder (tid,invisible,dateline),
   KEY first (tid,first)
) TYPE=MyISAM COMMENT='帖子表';

DROP TABLE IF EXISTS cdb_profilefields;
CREATE TABLE cdb_profilefields (
   fieldid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '数据id',
   available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
   invisible tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否隐藏',
   title varchar(50) NOT NULL DEFAULT '' COMMENT '栏目标题',
   description varchar(255) NOT NULL DEFAULT '' COMMENT '解释说明',
   size tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '内容最大长度',
   displayorder smallint(6) NOT NULL DEFAULT '0' COMMENT '显示顺序',
   required tinyint(1) NOT NULL DEFAULT '0' COMMENT '必填内容',
   unchangeable tinyint(1) NOT NULL DEFAULT '0' COMMENT '不可修改',
   showinthread tinyint(1) NOT NULL DEFAULT '0' COMMENT '在帖子中显示',
   selective tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可选',
   choices text NOT NULL COMMENT '选填内容',
   PRIMARY KEY   (fieldid),
   KEY available (available,required,displayorder)
) TYPE=MyISAM COMMENT='个人信息扩展表';

DROP TABLE IF EXISTS cdb_projects;
CREATE TABLE cdb_projects (
   id smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '方案id',
   name varchar(50) NOT NULL COMMENT '方案名称',
   type varchar(10) NOT NULL COMMENT '方案类型',
   description varchar(255) NOT NULL COMMENT '方案描述',
   value mediumtext NOT NULL COMMENT '方案数值',
   PRIMARY KEY   (id),
   KEY type (type)
) TYPE=MyISAM COMMENT='全局方案表';

DROP TABLE IF EXISTS cdb_promotions;
CREATE TABLE cdb_promotions (
   ip char(15) NOT NULL DEFAULT '' COMMENT 'IP地址',
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   username char(15) NOT NULL DEFAULT '' COMMENT '会员名',
   PRIMARY KEY   (ip)
) TYPE=MyISAM COMMENT='论坛推广';

DROP TABLE IF EXISTS cdb_prompt;
CREATE TABLE cdb_prompt (
   uid MEDIUMINT(8) UNSIGNED NOT NULL COMMENT '会员id',
   typeid SMALLINT(6) UNSIGNED NOT NULL COMMENT '提醒类型id',
   number SMALLINT(6) UNSIGNED NOT NULL COMMENT '提醒条目',
   PRIMARY KEY (`uid`, `typeid`)
) TYPE=MyISAM COMMENT='提醒数目';
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]