Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5119706
  • 博文数量: 921
  • 博客积分: 16037
  • 博客等级: 上将
  • 技术积分: 8469
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-05 02:08
文章分类

全部博文(921)

文章存档

2020年(1)

2019年(3)

2018年(3)

2017年(6)

2016年(47)

2015年(72)

2014年(25)

2013年(72)

2012年(125)

2011年(182)

2010年(42)

2009年(14)

2008年(85)

2007年(89)

2006年(155)

分类:

2010-07-29 10:37:21

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=’提醒数目’;

DROP TABLE IF EXISTS cdb_prompttype;
CREATE TABLE cdb_prompttype (
  id SMALLINT(6) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT ‘提醒类型id’,
  key VARCHAR(255) NOT NULL DEFAULT ” COMMENT ‘提醒唯一标示符’,
  name VARCHAR(255) NOT NULL DEFAULT ” COMMENT ‘提醒条目’,
  script VARCHAR(255) NOT NULL DEFAULT ” COMMENT ‘外部提醒填写脚本url,内部提醒留空’,
  PRIMARY KEY (`id`),
  UNIQUE KEY `key` (`key`)
) TYPE=MyISAM COMMENT=’提醒类型’;

DROP TABLE IF EXISTS cdb_promptmsgs;
CREATE TABLE cdb_promptmsgs (
  id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT ‘提醒id’,
  typeid SMALLINT(6) UNSIGNED NOT NULL DEFAULT ’0′ COMMENT ‘提醒类型id’,
  uid MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT ’0′ COMMENT ‘会员id’,
  extraid INTEGER(10) UNSIGNED NOT NULL DEFAULT ’0′ COMMENT ‘扩展id’,
  new TINYINT(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否未读’,
  dateline INTEGER(10) UNSIGNED NOT NULL DEFAULT ’0′ COMMENT ‘时间’,
  message TEXT NOT NULL COMMENT ‘提醒内容’,
  actor TEXT NOT NULL COMMENT ‘相关人’,
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`, `typeid`),
  KEY `new` (`new`),
  KEY `dateline` (`dateline`),
  KEY `extraid` (`extraid`)
) TYPE=MyISAM COMMENT=’提醒数据’;

DROP TABLE IF EXISTS cdb_ranks;
CREATE TABLE cdb_ranks (
  rankid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT ‘级别id’,
  ranktitle varchar(30) NOT NULL DEFAULT ” COMMENT ‘级别头衔’,
  postshigher mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘发帖数阀值’,
  stars tinyint(3) NOT NULL DEFAULT ’0′ COMMENT ‘星星数’,
  color varchar(7) NOT NULL DEFAULT ” COMMENT ‘颜色’,
  PRIMARY KEY  (rankid)
) TYPE=MyISAM COMMENT=’级别表’;

DROP TABLE IF EXISTS cdb_ratelog;
CREATE TABLE cdb_ratelog (
  pid int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘帖子id’,
  uid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘会员id’,
  username char(15) NOT NULL DEFAULT ” COMMENT ‘会员名’,
  extcredits tinyint(1) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘评分字段’,
  dateline int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘评分时间’,
  score smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘分数’,
  reason char(40) NOT NULL DEFAULT ” COMMENT ‘操作理由’,
  KEY pid (pid,dateline),
  KEY dateline (dateline)
) TYPE=MyISAM COMMENT=’帖子评分记录表’;

DROP TABLE IF EXISTS cdb_regips;
CREATE TABLE cdb_regips (
  ip char(15) NOT NULL DEFAULT ” COMMENT ‘IP地址’,
  dateline int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘限制时间’,
  count smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘限制数量’,
  KEY ip (ip)
) TYPE=MyISAM COMMENT=’注册IP限制表’;

DROP TABLE IF EXISTS cdb_relatedthreads;
CREATE TABLE cdb_relatedthreads (
  tid mediumint(8) NOT NULL DEFAULT ’0′ COMMENT ‘主题id’,
  type enum(‘general’,'trade’) NOT NULL DEFAULT ‘general’ COMMENT ‘关键词类型’,
  expiration int(10) NOT NULL DEFAULT ’0′ COMMENT ‘过期时间’,
  keywords varchar(255) NOT NULL DEFAULT ” COMMENT ‘关键字’,
  relatedthreads text NOT NULL COMMENT ‘相关主题序列’,
  PRIMARY KEY (tid,`type`)
) TYPE=MyISAM COMMENT=’相关主题表’;

DROP TABLE IF EXISTS cdb_reportlog;
CREATE TABLE cdb_reportlog (
  id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT ‘id’,
  fid smallint(6) unsigned NOT NULL COMMENT ‘版块 fid’,
  pid int(10) unsigned NOT NULL COMMENT ‘帖子 pid’,
  uid mediumint(8) unsigned NOT NULL COMMENT ‘报告人 uid’,
  username char(15) NOT NULL COMMENT ‘报告人 username’,
  status tinyint(1) unsigned NOT NULL DEFAULT ’1′ COMMENT ‘报告状态\n(1:未处理 0:已处理)’,
  type tinyint(1) NOT NULL COMMENT ‘报告类型\n(1:推荐 -1:投诉)’,
  reason char(40) NOT NULL COMMENT ‘报告原因’,
  dateline int(10) unsigned NOT NULL COMMENT ‘报告时间’,
  PRIMARY KEY (id),
  UNIQUE KEY pid (pid,uid),
  KEY dateline (fid,dateline)
) TYPE=MyISAM COMMENT ‘相关主题序列’;

DROP TABLE IF EXISTS cdb_request;
CREATE TABLE cdb_request (
  variable varchar(32) NOT NULL DEFAULT ” COMMENT ‘变量名’,
  value mediumtext NOT NULL COMMENT ‘值’,
  type tinyint(1) NOT NULL COMMENT ‘调用类型’,
  system tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否系统调用(无法删除的)’,
  PRIMARY KEY  (variable),
  KEY `type` (`type`)
) TYPE=MyISAM COMMENT=’数据调用表’;

DROP TABLE IF EXISTS cdb_rewardlog;
CREATE TABLE cdb_rewardlog (
  tid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题id’,
  authorid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘作者id’,
  answererid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘回答者id’,
  dateline int(10) unsigned DEFAULT ’0′ COMMENT ‘悬赏发布时间’,
  netamount int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘悬赏金额’,
  KEY userid (authorid,answererid)
) TYPE=MyISAM COMMENT=’悬赏日志表’;

DROP TABLE IF EXISTS cdb_rsscaches;
CREATE TABLE cdb_rsscaches (
  lastupdate int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘最后更新时间’,
  fid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘论坛id’,
  tid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题id’,
  dateline int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘发表时间’,
  forum char(50) NOT NULL DEFAULT ” COMMENT ‘论坛名称’,
  author char(15) NOT NULL DEFAULT ” COMMENT ‘作者’,
  subject char(80) NOT NULL DEFAULT ” COMMENT ‘标题’,
  description char(255) NOT NULL DEFAULT ” COMMENT ‘解释说明’,
  UNIQUE KEY tid (tid),
  KEY fid (fid,dateline)
) TYPE=MyISAM COMMENT=’rss缓存表’;

DROP TABLE IF EXISTS cdb_searchindex;
CREATE TABLE cdb_searchindex (
  searchid int(10) unsigned NOT NULL auto_increment COMMENT ‘缓存id’,
  keywords varchar(255) NOT NULL DEFAULT ” COMMENT ‘关键字’,
  searchstring text NOT NULL COMMENT ‘查找字符串’,
  useip varchar(15) NOT NULL DEFAULT ” COMMENT ‘搜索人IP’,
  uid mediumint(10) 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 ‘过期时间’,
  threadsortid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类信息id’,
  threads smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题数量’,
  tids text NOT NULL COMMENT ‘主题id序列’,
  PRIMARY KEY  (searchid)
) TYPE=MyISAM COMMENT=’搜索缓存表’;

DROP TABLE IF EXISTS cdb_sessions;
CREATE TABLE cdb_sessions (
  sid char(6) binary NOT NULL DEFAULT ” COMMENT ‘sid’,
  ip1 tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘IP段’,
  ip2 tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘IP段’,
  ip3 tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘IP段’,
  ip4 tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘IP段’,
  uid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘会员id’,
  username char(15) NOT NULL DEFAULT ” COMMENT ‘会员名’,
  groupid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘会员组’,
  styleid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘风格id’,
  invisible tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否隐身登录’,
  action tinyint(1) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘当前动作’,
  lastactivity int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘最后活动时间’,
  lastolupdate int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘最后更新时间’,
  pageviews smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘页面访问量’,
  seccode mediumint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘记录验证码’,
  fid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘论坛id’,
  tid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题id’,
  bloguid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘正在浏览的文集’,
  UNIQUE KEY sid (sid),
  KEY uid (uid),
  KEY bloguid (bloguid)
) TYPE=HEAP COMMENT=’会员认证表’;

DROP TABLE IF EXISTS cdb_settings;
CREATE TABLE cdb_settings (
  variable varchar(32) NOT NULL DEFAULT ” COMMENT ‘变量名’,
  value text NOT NULL COMMENT ‘值’,
  PRIMARY KEY  (variable)
) TYPE=MyISAM COMMENT=’设置表’;

DROP TABLE IF EXISTS cdb_smilies;
CREATE TABLE cdb_smilies (
  id smallint(6) unsigned NOT NULL auto_increment COMMENT ‘表情id’,
  typeid smallint(6) unsigned NOT NULL COMMENT ‘表情分类 id’,
  displayorder tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘显示顺序’,
  type enum(‘smiley’,'icon’) NOT NULL DEFAULT ‘smiley’ COMMENT ‘类型’,
  code varchar(30) NOT NULL DEFAULT ” COMMENT ‘标记’,
  url varchar(30) NOT NULL DEFAULT ” COMMENT ‘路径’,
  PRIMARY KEY  (id)
) TYPE=MyISAM COMMENT=’表情表’;

DROP TABLE IF EXISTS cdb_spacecaches;
CREATE TABLE cdb_spacecaches (
  uid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘用户 uid’,
  variable varchar(20) NOT NULL COMMENT ‘缓存变量的名称’,
  value text NOT NULL COMMENT ‘缓存变量的值’,
  expiration int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘过期时间’,
  PRIMARY KEY  (uid,variable)
) TYPE=MyISAM COMMENT=’minispace缓存表’;

DROP TABLE IF EXISTS cdb_stats;
CREATE TABLE cdb_stats (
  type char(10) NOT NULL DEFAULT ” COMMENT ‘类型’,
  variable char(10) NOT NULL DEFAULT ” COMMENT ‘变量名’,
  count int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘数量’,
  PRIMARY KEY  (type,variable)
) TYPE=MyISAM COMMENT=’统计表’;

DROP TABLE IF EXISTS cdb_statvars;
CREATE TABLE cdb_statvars (
  type varchar(20) NOT NULL DEFAULT ” COMMENT ‘类型’,
  variable varchar(20) NOT NULL DEFAULT ” COMMENT ‘变量名’,
  value mediumtext NOT NULL COMMENT ‘值’,
  PRIMARY KEY  (type,variable)
) TYPE=MyISAM COMMENT=’统计变量表’;

DROP TABLE IF EXISTS cdb_styles;
CREATE TABLE cdb_styles (
  styleid smallint(6) unsigned NOT NULL auto_increment COMMENT ‘风格id’,
  name varchar(20) NOT NULL DEFAULT ” COMMENT ‘风格名称’,
  available tinyint(1) NOT NULL DEFAULT ’1′ COMMENT ‘风格是否可用’,
  templateid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘对应模板id’,
  PRIMARY KEY  (styleid)
) TYPE=MyISAM COMMENT=’风格表’;

DROP TABLE IF EXISTS cdb_stylevars;
CREATE TABLE cdb_stylevars (
  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)
) TYPE=MyISAM COMMENT=’风格变量表’;

DROP TABLE IF EXISTS cdb_tags;
CREATE TABLE cdb_tags (
  tagname char(20) NOT NULL COMMENT ‘TAG名’,
  closed tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否关闭’,
  total mediumint(8) unsigned NOT NULL COMMENT ‘使用此TAG的总数’,
  PRIMARY KEY  (tagname),
  KEY total (total),
  KEY closed (closed)
) TYPE=MyISAM COMMENT=’论坛标签数据表’;

DROP TABLE IF EXISTS cdb_tasks;
CREATE TABLE cdb_tasks (
  taskid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  taskid smallint(6) unsigned NOT NULL auto_increment COMMENT ‘任务id’,
  relatedtaskid smallint(6) unsigned NOT NULL default ’0′ COMMENT ‘依存任务id\n必须完成依存任务才能申请该任务’,
  available tinyint(1) NOT NULL default ’0′ COMMENT ‘是否启用’,
  name varchar(50) NOT NULL default ” COMMENT ‘任务名称’,
  description text NOT NULL COMMENT ‘任务描述’,
  icon varchar(150) NOT NULL DEFAULT ” COMMENT ‘任务图标’,
  applicants mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘已申请任务人次’,
  achievers mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘已完成任务人次’,
  tasklimits mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘允许申请并完成该任务的人次上限’,
  applyperm text NOT NULL COMMENT ‘允许申请任务的用户组id, 格式:        1        2        3′,
  scriptname varchar(50) NOT NULL DEFAULT ” COMMENT ‘任务脚本文件名’,
  starttime int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘任务上线时间’,
  endtime int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘任务下线时间’,
  period int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘任务周期 单位:小时 默认为0表示一次性任务 设置为24即1天表示日常任务’,
  reward enum(‘credit’,'magic’,'medal’,'invite’,'group’) NOT NULL DEFAULT ‘credit’ COMMENT ‘奖励类型\n(credit:积分 magic:道具 medal:勋章 invite:邀请码 group:特殊用户组)’,
  prize varchar(15) NOT NULL DEFAULT ” COMMENT ‘奖品: 哪一个扩展积分, 道具id, 勋章id,邀请码有效期, 特殊用户组id’,
  bonus int(10) NOT NULL DEFAULT ’0′ COMMENT ‘奖品数量/有效期: \n积分数量, 道具数量, 勋章有效期, 邀请码数量,特殊用户组有效期’,
  displayorder smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘显示顺序’,
  version varchar(15) NOT NULL DEFAULT ” COMMENT ‘任务脚本版本号’,
  PRIMARY KEY  (taskid)
) TYPE=MyISAM COMMENT=’论坛任务表’;

DROP TABLE IF EXISTS cdb_taskvars;
CREATE TABLE cdb_taskvars (
  taskvarid mediumint(8) unsigned NOT NULL auto_increment COMMENT ‘任务变量id’,
  taskid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘任务id’,
  sort enum(‘apply’,'complete’) NOT NULL DEFAULT ‘complete’ COMMENT ‘变量类别\n(apply:申请任务条件 complete:完成任务条件)’,
  name 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  (taskvarid),
  KEY taskid (taskid)
) TYPE=MyISAM COMMENT=’论坛任务设置表’;

DROP TABLE IF EXISTS cdb_templates;
CREATE TABLE cdb_templates (
  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)
) TYPE=MyISAM COMMENT=’模版表’;

DROP TABLE IF EXISTS cdb_threads;
CREATE TABLE cdb_threads (
  tid mediumint(8) unsigned NOT NULL auto_increment COMMENT ‘主题id’,
  fid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘上级论坛’,
  iconid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘图标’,
  typeid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题分类id’,
  sortid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类信息id’,
  readperm tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘阅读权限’,
  price smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘价格’,
  author char(15) NOT NULL DEFAULT ” COMMENT ‘会员名’,
  authorid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘会员id’,
  subject char(80) NOT NULL DEFAULT ” COMMENT ‘标题’,
  dateline int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘发表时间’,
  lastpost int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘最后发表’,
  lastposter char(15) NOT NULL DEFAULT ” COMMENT ‘最后发表人id’,
  views int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘浏览次数’,
  replies mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘回复次数’,
  displayorder tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘显示顺序’,
  highlight tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否高亮’,
  digest tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否精华’,
  rate tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否评分’,
  special tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘特殊主题’,
  attachment tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘附件’,
  moderated tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否被管理员改动’,
  closed mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘是否关闭’,
  itemid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘supe关联id’,
  supe_pushstatus tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘supe推送状态’,

  recommends SMALLINT(6) NOT NULL DEFAULT ’0′ COMMENT ‘推荐指数’,
  recommend_add SMALLINT(6) NOT NULL DEFAULT ’0′ COMMENT ‘支持人数’,
  recommend_sub SMALLINT(6) NOT NULL DEFAULT ’0′ COMMENT ‘反对人数’,
  heats INT(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题热度值’,
  PRIMARY KEY  (tid),
  KEY digest (digest),
  KEY sortid (sortid),
  KEY displayorder (fid,displayorder,lastpost),
  KEY typeid (fid,typeid,displayorder,lastpost),
  KEY recommends (recommends),
  KEY heats (heats),
  KEY authorid (authorid)
) TYPE=MyISAM COMMENT=’主题表’;

DROP TABLE IF EXISTS cdb_threadsmod;
CREATE TABLE cdb_threadsmod (
  tid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘主题id’,
  uid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘会员id’,
  username char(15) NOT NULL DEFAULT ” COMMENT ‘会员名’,
  dateline int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘操作时间’,
  expiration int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘有效时间’,
  action char(5) NOT NULL DEFAULT ” COMMENT ‘操作’,
  status tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘状态’,
  magicid smallint(6) unsigned NOT NULL COMMENT ‘使用道具id’,
  KEY tid (tid,dateline),
  KEY expiration (expiration,status)
) TYPE=MyISAM COMMENT=’主题管理记录表’;

DROP TABLE IF EXISTS cdb_threadtags;
CREATE TABLE cdb_threadtags (
  tagname char(20) NOT NULL COMMENT ‘标签名称’,
  tid int(10) unsigned NOT NULL COMMENT ‘标签对应主题id’,
  KEY tagname (tagname),
  KEY tid (tid)
) TYPE=MyISAM COMMENT=’主题标签表’;

DROP TABLE IF EXISTS cdb_threadtypes;
CREATE TABLE cdb_threadtypes (
  typeid smallint(6) unsigned NOT NULL auto_increment COMMENT ‘主题分类id’,
  displayorder smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘显示顺序’,
  name varchar(255) NOT NULL DEFAULT ” COMMENT ‘名称’,
  description varchar(255) NOT NULL DEFAULT ” COMMENT ‘解释说明’,
  special smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘分类状态’,
  modelid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类模型id’,
  expiration tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘分类有效期’,
  template text NOT NULL COMMENT ‘分类信息模板’,
  PRIMARY KEY  (typeid)
) TYPE=MyISAM COMMENT=’主题分类表’;

DROP TABLE IF EXISTS cdb_tradecomments;
CREATE TABLE cdb_tradecomments (
  id mediumint(8) NOT NULL auto_increment COMMENT ‘id’,
  orderid char(32) NOT NULL COMMENT ‘订单 id’,
  pid int(10) unsigned NOT NULL COMMENT ‘帖子 id’,
  type tinyint(1) NOT NULL COMMENT ‘类型’,
  raterid mediumint(8) unsigned NOT NULL COMMENT ‘评价方会员id’,
  rater char(15) NOT NULL COMMENT ‘评价方用户名’,
  rateeid mediumint(8) unsigned NOT NULL COMMENT ‘被评价方会员id’,
  ratee char(15) NOT NULL COMMENT ‘被评价方用户名’,
  message char(200) NOT NULL COMMENT ‘评价内容’,
  explanation char(200) NOT NULL COMMENT ‘解释’,
  score tinyint(1) NOT NULL COMMENT ‘评分’,
  dateline int(10) unsigned NOT NULL COMMENT ‘评价时间’,
  PRIMARY KEY  (id),
  KEY raterid (raterid,type,dateline),
  KEY rateeid (rateeid,type,dateline),
  KEY orderid (orderid)
) TYPE=MyISAM COMMENT=’信用评价’;

DROP TABLE IF EXISTS cdb_tradelog;
CREATE TABLE cdb_tradelog (
  tid mediumint(8) unsigned NOT NULL COMMENT ‘主题id’,
  pid int(10) unsigned NOT NULL COMMENT ‘帖子id’,
  orderid varchar(32) NOT NULL COMMENT ‘订单号id’,
  tradeno varchar(32) NOT NULL COMMENT ‘支付宝订单号’,
  subject varchar(100) NOT NULL COMMENT ‘标题’,
  price decimal(8,2) NOT NULL DEFAULT ’0.00′ COMMENT ‘价格’,
  quality tinyint(1) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘成色’,
  itemtype tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘商品类型’,
  number smallint(5) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘数量’,
  tax decimal(6,2) unsigned NOT NULL DEFAULT ’0.00′ COMMENT ‘交易手续费’,
  locus varchar(100) NOT NULL COMMENT ‘物品所在地’,
  sellerid mediumint(8) unsigned NOT NULL COMMENT ‘卖家id’,
  seller varchar(15) NOT NULL COMMENT ‘卖家名’,
  selleraccount varchar(50) NOT NULL COMMENT ‘卖家交易帐号’,
  buyerid mediumint(8) unsigned NOT NULL COMMENT ‘卖家id’,
  buyer varchar(15) NOT NULL COMMENT ‘买家名’,
  buyercontact varchar(50) NOT NULL COMMENT ‘买家联系方式’,
  buyercredits smallint(5) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘买家暂扣积分’,
  buyermsg varchar(200) DEFAULT NULL COMMENT ‘买家留言’,
  status tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘状态’,
  lastupdate int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘状态最后更新’,
  offline tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否离线交易’,
  buyername varchar(50) NOT NULL COMMENT ‘买家姓名’,
  buyerzip varchar(10) NOT NULL COMMENT ‘买家邮编’,
  buyerphone varchar(20) NOT NULL COMMENT ‘买家电话’,
  buyermobile varchar(20) NOT NULL COMMENT ‘买家手机’,
  transport tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘运输方式’,
  transportfee smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘运输费用’,
  baseprice decimal(8,2) NOT NULL COMMENT ‘商品原价’,
  discount tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘折扣’,
  ratestatus tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘评价状态’,
  message text NOT NULL COMMENT ‘订单留言’,
  credit int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘积分价格’,
  basecredit int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘积分原价’,
  UNIQUE KEY orderid (orderid),
  KEY sellerid (sellerid),
  KEY buyerid (buyerid),
  KEY status (status),
  KEY buyerlog (buyerid,status,lastupdate),
  KEY sellerlog (sellerid,status,lastupdate),
  KEY tid (tid,pid),
  KEY pid (pid)
) TYPE=MyISAM COMMENT=’交易记录表’;

DROP TABLE IF EXISTS cdb_tradeoptionvars;
CREATE TABLE cdb_tradeoptionvars (
  sortid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘商品分类信息id’,
  pid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘商品分类信息数据对应分类帖子id’,
  optionid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘商品分类信息数据对应选项id’,
  value mediumtext NOT NULL COMMENT ‘商品分类信息数据’,
  KEY sortid (sortid),
  KEY pid (pid)
) TYPE=MyISAM COMMENT=’商品分类信息设置项目数据表’;

DROP TABLE IF EXISTS cdb_trades;
CREATE TABLE cdb_trades (
  tid mediumint(8) unsigned NOT NULL COMMENT ‘主题id’,
  pid int(10) unsigned NOT NULL COMMENT ‘帖子id’,
  typeid smallint(6) unsigned NOT NULL COMMENT ‘主题分类id’,
  sellerid mediumint(8) unsigned NOT NULL COMMENT ‘买家id’,
  seller char(15) NOT NULL COMMENT ‘买家名’,
  account char(50) NOT NULL COMMENT ‘买家帐号’,
  subject char(100) NOT NULL COMMENT ‘标题’,
  price decimal(8,2) NOT NULL COMMENT ‘价格’,
  amount smallint(6) unsigned NOT NULL DEFAULT ’1′ COMMENT ‘数量’,
  quality tinyint(1) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘成色’,
  locus char(20) NOT NULL COMMENT ‘所在地’,
  transport tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘物流方式’,
  ordinaryfee smallint(4) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘平邮附加费’,
  expressfee smallint(4) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘快递附加费’,
  emsfee smallint(4) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘EMS附加费’,
  itemtype tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘商品类型’,
  dateline int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘交易时间’,
  expiration int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘过期时间’,
  lastbuyer char(15) NOT NULL COMMENT ‘最后买家用户名’,
  lastupdate int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘最后交易时间’,
  totalitems smallint(5) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘总交易量’,
  tradesum decimal(8,2) NOT NULL DEFAULT ’0.00′ COMMENT ‘总交易额’,
  closed tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘是否关闭’,
  aid mediumint(8) unsigned NOT NULL COMMENT ‘商品图片的 Aid’,
  displayorder tinyint(1) NOT NULL COMMENT ‘显示顺序’,
  costprice decimal(8,2) NOT NULL COMMENT ‘商品原价’,
  credit int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘积分价格’,
  costcredit int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘积分原价’,
  credittradesum int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘总积分交易额’,
  PRIMARY KEY  (tid,pid),
  KEY sellerid (sellerid),
  KEY totalitems (totalitems),
  KEY tradesum (tradesum),
  KEY displayorder (tid,displayorder),
  KEY sellertrades (sellerid,tradesum,totalitems),
  KEY typeid (typeid),
  KEY credittradesum(credittradesum)
) TYPE=MyISAM COMMENT=’商品数据表’;

DROP TABLE IF EXISTS cdb_typemodels;
CREATE TABLE cdb_typemodels (
  id smallint(6) unsigned NOT NULL auto_increment COMMENT ‘分类模型id’,
  name varchar(20) NOT NULL COMMENT ‘分类模型名称’,
  displayorder tinyint(3) NOT NULL DEFAULT ’0′ COMMENT ‘分类模型顺序’,
  type tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘分类模型类型’,
  options mediumtext NOT NULL COMMENT ‘分类模型系统项目’,
  customoptions mediumtext NOT NULL COMMENT ‘分类模型自定义项目’,
  PRIMARY KEY  (id)
) TYPE=MyISAM COMMENT=’分类信息模型表’;

DROP TABLE IF EXISTS cdb_typeoptions;
CREATE TABLE cdb_typeoptions (
  optionid smallint(6) unsigned NOT NULL auto_increment COMMENT ‘分类信息选项id’,
  classid 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 ‘分类信息选项描述’,
  identifier varchar(40) NOT NULL DEFAULT ” COMMENT ‘分类信息选项标识’,
  type varchar(20) NOT NULL DEFAULT ” COMMENT ‘分类信息选项类型’,
  rules mediumtext NOT NULL COMMENT ‘分类信息选项规则’,
  PRIMARY KEY  (optionid),
  KEY classid (classid)
) TYPE=MyISAM COMMENT=’分类信息设置项目表’;

DROP TABLE IF EXISTS cdb_typeoptionvars;
CREATE TABLE cdb_typeoptionvars (
  sortid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类信息id’,
  tid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类信息数据对应帖子id’,
  optionid smallint(6) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类信息数据对应选项id’,
  expiration int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘分类信息数据有效期’,
  value mediumtext NOT NULL COMMENT ‘分类信息数据数值’,
  KEY sortid (sortid),
  KEY tid (tid)
) TYPE=MyISAM COMMENT=’分类信息项目数据表’;

DROP TABLE IF EXISTS cdb_typevars;
CREATE TABLE cdb_typevars (
  sortid smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息id’,
  optionid smallint(6) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息对应项目id’,
  available tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息对应项目是否可用’,
  required tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息对应项目是否必填’,
  unchangeable tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息对应项目是否可修改’,
  search tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息对应项目是否可搜索’,
  displayorder tinyint(3) NOT NULL DEFAULT ’0′ COMMENT ‘分类信息对应项目顺序’,
  UNIQUE KEY optionid (sortid,optionid),
  KEY sortid (sortid)
) TYPE=MyISAM COMMENT=’分类信息对应项目表’;

DROP TABLE IF EXISTS cdb_usergroups;
CREATE TABLE cdb_usergroups (
  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 char(8) NOT NULL DEFAULT ‘private’ COMMENT ‘会员是否可以自由进出’,
  grouptitle char(30) 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 char(7) NOT NULL DEFAULT ” COMMENT ‘组头衔颜色’,
  groupavatar char(60) NOT NULL DEFAULT ” COMMENT ‘组头像图标’,
  readaccess tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘阅读权限’,
  allowvisit tinyint(1) 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 ‘允许下载附件’,
  allowpostattach tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许上传附件’,
  allowvote tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许参与投票’,
  allowmultigroups tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许加入/离开公共用户组’,
  allowsearch tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许搜索’,
  allowcstatus tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许自定义头衔’,
  allowuseblog 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 ‘允许设置附件权限’,
  allowhidecode tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许使用hide代码’,
  allowhtml tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许使用html’,
  allowcusbbcode tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许使用自定义bbocde’,
  allowanonymous tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许匿名发帖’,
  allownickname tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许使用昵称’,
  allowsigbbcode tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许签名使用bbocde’,
  allowsigimgcode tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许使用img’,
  allowviewpro tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许查看会员资料’,
  allowviewstats tinyint(1) NOT NULL DEFAULT ’0′ 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 mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘最大附件尺寸’,
  maxsizeperday int(10) 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 ‘道具折扣’,
  allowmagics tinyint(1) unsigned NOT NULL COMMENT ‘允许使用道具’,
  maxmagicsweight smallint(6) unsigned NOT NULL COMMENT ‘道具负载最大值’,
  allowbiobbcode tinyint(1) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘允许在自我介绍里面discuzcode标签’,
  allowbioimgcode tinyint(1) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘允许在自我介绍里面img标签’,
  maxbiosize smallint(6) unsigned NOT NULL DEFAULT ’0′ 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 ‘邀请码有效期’,
  allowpostdebate tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘允许发表辩论’,
  tradestick tinyint(1) unsigned NOT NULL COMMENT ‘可商品推荐数’,
  exempt tinyint(1) unsigned NOT NULL COMMENT ‘用户组表达式’,
  allowsendpm tinyint(1) NOT NULL DEFAULT ’1′ 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 ‘是否允许评价主题’,
  PRIMARY KEY  (groupid),
  KEY creditsrange (creditshigher,creditslower)
) TYPE=MyISAM COMMENT=’会员用户组表’;

DROP TABLE IF EXISTS cdb_validating;
CREATE TABLE cdb_validating (
  uid mediumint(8) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘会员id’,
  submitdate int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘提交日期’,
  moddate int(10) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘审核日期’,
  admin varchar(15) NOT NULL DEFAULT ” COMMENT ‘管理员名’,
  submittimes tinyint(3) unsigned NOT NULL DEFAULT ’0′ COMMENT ‘提交的次数’,
  status tinyint(1) NOT NULL DEFAULT ’0′ COMMENT ‘状态’,
  message text NOT NULL COMMENT ‘注册原因’,
  remark text NOT NULL COMMENT ‘管理员留言’,
  PRIMARY KEY  (uid),
  KEY status (status)
) TYPE=MyISAM COMMENT=’用户审核表’;

DROP TABLE IF EXISTS cdb_warnings;
CREATE TABLE cdb_warnings (
  wid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT ‘记录id’,
  pid int(10) unsigned NOT NULL COMMENT ‘帖子 pid’,
  operatorid mediumint(8) unsigned NOT NULL COMMENT ‘警告者 Uid’,
  operator char(15) NOT NULL COMMENT ‘警告者用户名’,
  authorid mediumint(8) unsigned NOT NULL COMMENT ‘被警告者 uid’,
  author char(15) NOT NULL COMMENT ‘被警告者用户名’,
  dateline int(10) unsigned NOT NULL COMMENT ‘警告时间’,
  reason char(40) NOT NULL COMMENT ‘警告原因’,
  PRIMARY KEY (wid),
  UNIQUE KEY pid (pid),
  KEY authorid (authorid)
) TYPE=MyISAM COMMENT=’警告记录表’;

DROP TABLE IF EXISTS cdb_words;
CREATE TABLE cdb_words (
  id smallint(6) unsigned NOT NULL auto_increment COMMENT ‘词汇id’,
  admin varchar(15) NOT NULL DEFAULT ” COMMENT ‘管理员名’,
  find varchar(255) NOT NULL DEFAULT ” COMMENT ‘不良词语’,
  replacement varchar(255) NOT NULL DEFAULT ” COMMENT ‘替换内容’,
  extra varchar(255) NOT NULL DEFAULT ”,
  PRIMARY KEY  (id)
) TYPE=MyISAM COMMENT=’词语过滤表’;

阅读(4520) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~