找回密码
 立即注册

QQ登录

只需一步,快速开始

免费咨询热线:13559213891

Discu!x3.4 innodb安装方式

领券优惠购买阿里云
install.sql
  1. --
  2. -- DiscuzX INSTALL MAKE SQL DUMP V1.0
  3. -- DO NOT modify this file
  4. --
  5. -- Create: 2013-08-27 16:12:45
  6. --
  7. DROP TABLE IF EXISTS pre_common_admincp_cmenu;
  8. CREATE TABLE pre_common_admincp_cmenu (
  9.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  10.   title varchar(255) NOT NULL,
  11.   url varchar(255) NOT NULL,
  12.   sort tinyint(1) NOT NULL DEFAULT '0',
  13.   displayorder tinyint(3) NOT NULL,
  14.   clicks smallint(6) unsigned NOT NULL DEFAULT '1',
  15.   uid mediumint(8) unsigned NOT NULL,
  16.   dateline int(10) unsigned NOT NULL,
  17.   PRIMARY KEY (id),
  18.   KEY uid (uid),
  19.   KEY displayorder (displayorder)
  20. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  21. DROP TABLE IF EXISTS pre_common_admincp_group;
  22. CREATE TABLE pre_common_admincp_group (
  23.   cpgroupid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  24.   cpgroupname varchar(255) NOT NULL,
  25.   PRIMARY KEY (cpgroupid)
  26. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  27. DROP TABLE IF EXISTS pre_common_admincp_member;
  28. CREATE TABLE pre_common_admincp_member (
  29.   uid int(10) unsigned NOT NULL,
  30.   cpgroupid int(10) unsigned NOT NULL,
  31.   customperm text NOT NULL,
  32.   PRIMARY KEY (uid)
  33. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  34. DROP TABLE IF EXISTS pre_common_admincp_perm;
  35. CREATE TABLE pre_common_admincp_perm (
  36.   cpgroupid smallint(6) unsigned NOT NULL,
  37.   perm varchar(255) NOT NULL,
  38.   UNIQUE KEY cpgroupperm (cpgroupid,perm)
  39. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  40. DROP TABLE IF EXISTS pre_common_admincp_session;
  41. CREATE TABLE pre_common_admincp_session (
  42.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  43.   adminid smallint(6) unsigned NOT NULL DEFAULT '0',
  44.   panel tinyint(1) NOT NULL DEFAULT '0',
  45.   ip varchar(15) NOT NULL DEFAULT '',
  46.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  47.   errorcount tinyint(1) NOT NULL DEFAULT '0',
  48.   `storage` mediumtext NOT NULL,
  49.   PRIMARY KEY (uid,panel)
  50. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  51. DROP TABLE IF EXISTS pre_common_admingroup;
  52. CREATE TABLE pre_common_admingroup (
  53.   admingid smallint(6) unsigned NOT NULL DEFAULT '0',
  54.   alloweditpost tinyint(1) NOT NULL DEFAULT '0',
  55.   alloweditpoll tinyint(1) NOT NULL DEFAULT '0',
  56.   allowstickthread tinyint(1) NOT NULL DEFAULT '0',
  57.   allowmodpost tinyint(1) NOT NULL DEFAULT '0',
  58.   allowdelpost tinyint(1) NOT NULL DEFAULT '0',
  59.   allowmassprune tinyint(1) NOT NULL DEFAULT '0',
  60.   allowrefund tinyint(1) NOT NULL DEFAULT '0',
  61.   allowcensorword tinyint(1) NOT NULL DEFAULT '0',
  62.   allowviewip tinyint(1) NOT NULL DEFAULT '0',
  63.   allowbanip tinyint(1) NOT NULL DEFAULT '0',
  64.   allowedituser tinyint(1) NOT NULL DEFAULT '0',
  65.   allowmoduser tinyint(1) NOT NULL DEFAULT '0',
  66.   allowbanuser tinyint(1) NOT NULL DEFAULT '0',
  67.   allowbanvisituser tinyint(1) NOT NULL DEFAULT '0',
  68.   allowpostannounce tinyint(1) NOT NULL DEFAULT '0',
  69.   allowviewlog tinyint(1) NOT NULL DEFAULT '0',
  70.   allowbanpost tinyint(1) NOT NULL DEFAULT '0',
  71.   supe_allowpushthread tinyint(1) NOT NULL DEFAULT '0',
  72.   allowhighlightthread tinyint(1) NOT NULL DEFAULT '0',
  73.   allowlivethread tinyint(1) NOT NULL DEFAULT '0',
  74.   allowdigestthread tinyint(1) NOT NULL DEFAULT '0',
  75.   allowrecommendthread tinyint(1) NOT NULL DEFAULT '0',
  76.   allowbumpthread tinyint(1) NOT NULL DEFAULT '0',
  77.   allowclosethread tinyint(1) NOT NULL DEFAULT '0',
  78.   allowmovethread tinyint(1) NOT NULL DEFAULT '0',
  79.   allowedittypethread tinyint(1) NOT NULL DEFAULT '0',
  80.   allowstampthread tinyint(1) NOT NULL DEFAULT '0',
  81.   allowstamplist tinyint(1) NOT NULL DEFAULT '0',
  82.   allowcopythread tinyint(1) NOT NULL DEFAULT '0',
  83.   allowmergethread tinyint(1) NOT NULL DEFAULT '0',
  84.   allowsplitthread tinyint(1) NOT NULL DEFAULT '0',
  85.   allowrepairthread tinyint(1) NOT NULL DEFAULT '0',
  86.   allowwarnpost tinyint(1) NOT NULL DEFAULT '0',
  87.   allowviewreport tinyint(1) NOT NULL DEFAULT '0',
  88.   alloweditforum tinyint(1) NOT NULL DEFAULT '0',
  89.   allowremovereward tinyint(1) NOT NULL DEFAULT '0',
  90.   allowedittrade tinyint(1) NOT NULL DEFAULT '0',
  91.   alloweditactivity tinyint(1) NOT NULL DEFAULT '0',
  92.   allowstickreply tinyint(1) NOT NULL DEFAULT '0',
  93.   allowmanagearticle tinyint(1) NOT NULL DEFAULT '0',
  94.   allowaddtopic tinyint(1) NOT NULL DEFAULT '0',
  95.   allowmanagetopic tinyint(1) NOT NULL DEFAULT '0',
  96.   allowdiy tinyint(1) NOT NULL DEFAULT '0',
  97.   allowclearrecycle tinyint(1) NOT NULL DEFAULT '0',
  98.   allowmanagetag tinyint(1) NOT NULL DEFAULT '0',
  99.   alloweditusertag tinyint(1) NOT NULL DEFAULT '0',
  100.   managefeed tinyint(1) NOT NULL DEFAULT '0',
  101.   managedoing tinyint(1) NOT NULL DEFAULT '0',
  102.   manageshare tinyint(1) NOT NULL DEFAULT '0',
  103.   manageblog tinyint(1) NOT NULL DEFAULT '0',
  104.   managealbum tinyint(1) NOT NULL DEFAULT '0',
  105.   managecomment tinyint(1) NOT NULL DEFAULT '0',
  106.   managemagiclog tinyint(1) NOT NULL DEFAULT '0',
  107.   managereport tinyint(1) NOT NULL DEFAULT '0',
  108.   managehotuser tinyint(1) NOT NULL DEFAULT '0',
  109.   managedefaultuser tinyint(1) NOT NULL DEFAULT '0',
  110.   managevideophoto tinyint(1) NOT NULL DEFAULT '0',
  111.   managemagic tinyint(1) NOT NULL DEFAULT '0',
  112.   manageclick tinyint(1) NOT NULL DEFAULT '0',
  113.   allowmanagecollection tinyint(1) NOT NULL DEFAULT '0',
  114.   allowmakehtml tinyint(1) NOT NULL DEFAULT '0',
  115.   PRIMARY KEY (admingid)
  116. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  117. DROP TABLE IF EXISTS pre_common_adminnote;
  118. CREATE TABLE pre_common_adminnote (
  119.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  120.   admin varchar(15) NOT NULL DEFAULT '',
  121.   access tinyint(3) NOT NULL DEFAULT '0',
  122.   adminid tinyint(3) NOT NULL DEFAULT '0',
  123.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  124.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  125.   message text NOT NULL,
  126.   PRIMARY KEY (id)
  127. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  128. DROP TABLE IF EXISTS pre_common_advertisement;
  129. CREATE TABLE pre_common_advertisement (
  130.   advid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  131.   available tinyint(1) NOT NULL DEFAULT '0',
  132.   `type` varchar(50) NOT NULL DEFAULT '0',
  133.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  134.   title varchar(255) NOT NULL DEFAULT '',
  135.   targets text NOT NULL,
  136.   parameters text NOT NULL,
  137.   `code` text NOT NULL,
  138.   starttime int(10) unsigned NOT NULL DEFAULT '0',
  139.   endtime int(10) unsigned NOT NULL DEFAULT '0',
  140.   PRIMARY KEY (advid)
  141. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  142. DROP TABLE IF EXISTS pre_common_advertisement_custom;
  143. CREATE TABLE pre_common_advertisement_custom (
  144.   id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  145.   `name` varchar(255) NOT NULL,
  146.   PRIMARY KEY (id),
  147.   KEY `name` (`name`)
  148. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  149. DROP TABLE IF EXISTS pre_common_banned;
  150. CREATE TABLE pre_common_banned (
  151.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  152.   ip1 smallint(3) NOT NULL DEFAULT '0',
  153.   ip2 smallint(3) NOT NULL DEFAULT '0',
  154.   ip3 smallint(3) NOT NULL DEFAULT '0',
  155.   ip4 smallint(3) NOT NULL DEFAULT '0',
  156.   admin varchar(15) NOT NULL DEFAULT '',
  157.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  158.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  159.   PRIMARY KEY (id)
  160. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  161. DROP TABLE IF EXISTS pre_common_block;
  162. CREATE TABLE pre_common_block (
  163.   bid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  164.   blockclass varchar(255) NOT NULL DEFAULT '0',
  165.   blocktype tinyint(1) NOT NULL DEFAULT '0',
  166.   `name` varchar(255) NOT NULL DEFAULT '',
  167.   title text NOT NULL,
  168.   classname varchar(255) NOT NULL DEFAULT '',
  169.   summary text NOT NULL,
  170.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  171.   username varchar(255) NOT NULL DEFAULT '',
  172.   styleid smallint(6) unsigned NOT NULL DEFAULT '0',
  173.   blockstyle text NOT NULL,
  174.   picwidth smallint(6) unsigned NOT NULL DEFAULT '0',
  175.   picheight smallint(6) unsigned NOT NULL DEFAULT '0',
  176.   target varchar(255) NOT NULL DEFAULT '',
  177.   dateformat varchar(255) NOT NULL DEFAULT '',
  178.   dateuformat tinyint(1) NOT NULL DEFAULT '0',
  179.   script varchar(255) NOT NULL DEFAULT '',
  180.   param text NOT NULL,
  181.   shownum smallint(6) unsigned NOT NULL DEFAULT '0',
  182.   cachetime int(10) NOT NULL DEFAULT '0',
  183.   cachetimerange char(5) NOT NULL DEFAULT '',
  184.   punctualupdate tinyint(1) NOT NULL DEFAULT '0',
  185.   hidedisplay tinyint(1) NOT NULL DEFAULT '0',
  186.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  187.   notinherited tinyint(1) NOT NULL DEFAULT '0',
  188.   isblank tinyint(1) NOT NULL DEFAULT '0',
  189.   PRIMARY KEY (bid)
  190. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  191. DROP TABLE IF EXISTS pre_common_block_favorite;
  192. CREATE TABLE pre_common_block_favorite (
  193.   favid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  194.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  195.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  196.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  197.   PRIMARY KEY (favid),
  198.   KEY uid (uid,dateline)
  199. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  200. DROP TABLE IF EXISTS pre_common_block_item;
  201. CREATE TABLE pre_common_block_item (
  202.   itemid int(10) unsigned NOT NULL AUTO_INCREMENT,
  203.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  204.   id int(10) unsigned NOT NULL DEFAULT '0',
  205.   idtype varchar(255) NOT NULL DEFAULT '',
  206.   itemtype tinyint(1) NOT NULL DEFAULT '0',
  207.   title varchar(255) NOT NULL DEFAULT '',
  208.   url varchar(255) NOT NULL DEFAULT '',
  209.   pic varchar(255) NOT NULL DEFAULT '',
  210.   picflag tinyint(1) NOT NULL DEFAULT '0',
  211.   makethumb tinyint(1) NOT NULL DEFAULT '0',
  212.   thumbpath varchar(255) NOT NULL DEFAULT '',
  213.   summary text NOT NULL,
  214.   showstyle text NOT NULL,
  215.   related text NOT NULL,
  216.   `fields` text NOT NULL,
  217.   displayorder smallint(6) NOT NULL DEFAULT '0',
  218.   startdate int(10) unsigned NOT NULL DEFAULT '0',
  219.   enddate int(10) unsigned NOT NULL DEFAULT '0',
  220.   PRIMARY KEY (itemid),
  221.   KEY bid (bid)
  222. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  223. DROP TABLE IF EXISTS pre_common_block_item_data;
  224. CREATE TABLE pre_common_block_item_data (
  225.   dataid int(10) unsigned NOT NULL AUTO_INCREMENT,
  226.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  227.   id int(10) unsigned NOT NULL DEFAULT '0',
  228.   idtype varchar(255) NOT NULL DEFAULT '',
  229.   itemtype tinyint(1) NOT NULL DEFAULT '0',
  230.   title varchar(255) NOT NULL DEFAULT '',
  231.   url varchar(255) NOT NULL DEFAULT '',
  232.   pic varchar(255) NOT NULL DEFAULT '',
  233.   picflag tinyint(1) NOT NULL DEFAULT '0',
  234.   makethumb tinyint(1) NOT NULL DEFAULT '0',
  235.   summary text NOT NULL,
  236.   showstyle text NOT NULL,
  237.   related text NOT NULL,
  238.   `fields` text NOT NULL,
  239.   displayorder smallint(6) NOT NULL DEFAULT '0',
  240.   startdate int(10) unsigned NOT NULL DEFAULT '0',
  241.   enddate int(10) unsigned NOT NULL DEFAULT '0',
  242.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  243.   username varchar(255) NOT NULL DEFAULT '',
  244.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  245.   isverified tinyint(1) NOT NULL DEFAULT '0',
  246.   verifiedtime int(10) unsigned NOT NULL DEFAULT '0',
  247.   stickgrade tinyint(2) unsigned NOT NULL DEFAULT '0',
  248.   PRIMARY KEY (dataid),
  249.   KEY bid (bid,stickgrade,displayorder,verifiedtime)
  250. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  251. DROP TABLE IF EXISTS pre_common_block_permission;
  252. CREATE TABLE pre_common_block_permission (
  253.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  254.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  255.   allowmanage tinyint(1) NOT NULL DEFAULT '0',
  256.   allowrecommend tinyint(1) NOT NULL DEFAULT '0',
  257.   needverify tinyint(1) NOT NULL DEFAULT '0',
  258.   inheritedtplname varchar(255) NOT NULL DEFAULT '',
  259.   PRIMARY KEY (bid,uid),
  260.   KEY uid (uid)
  261. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  262. DROP TABLE IF EXISTS pre_common_block_pic;
  263. CREATE TABLE pre_common_block_pic (
  264.   picid int(10) unsigned NOT NULL AUTO_INCREMENT,
  265.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  266.   itemid int(10) unsigned NOT NULL DEFAULT '0',
  267.   pic varchar(255) NOT NULL DEFAULT '',
  268.   picflag tinyint(1) NOT NULL DEFAULT '0',
  269.   `type` tinyint(1) NOT NULL DEFAULT '0',
  270.   PRIMARY KEY (picid),
  271.   KEY bid (bid,itemid)
  272. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  273. DROP TABLE IF EXISTS pre_common_block_style;
  274. CREATE TABLE pre_common_block_style (
  275.   styleid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  276.   blockclass varchar(255) NOT NULL DEFAULT '',
  277.   `name` varchar(255) NOT NULL DEFAULT '',
  278.   template text NOT NULL,
  279.   `hash` varchar(255) NOT NULL DEFAULT '',
  280.   getpic tinyint(1) NOT NULL DEFAULT '0',
  281.   getsummary tinyint(1) NOT NULL DEFAULT '0',
  282.   makethumb tinyint(1) NOT NULL DEFAULT '0',
  283.   settarget tinyint(1) NOT NULL DEFAULT '0',
  284.   `fields` text NOT NULL,
  285.   moreurl tinyint(1) NOT NULL DEFAULT '0',
  286.   PRIMARY KEY (styleid),
  287.   KEY `hash` (`hash`),
  288.   KEY blockclass (blockclass)
  289. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  290. DROP TABLE IF EXISTS pre_common_block_xml;
  291. CREATE TABLE pre_common_block_xml (
  292.   id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  293.   `name` varchar(255) NOT NULL,
  294.   version varchar(255) NOT NULL,
  295.   url varchar(255) NOT NULL,
  296.   clientid varchar(255) NOT NULL,
  297.   `key` varchar(255) NOT NULL,
  298.   signtype varchar(255) NOT NULL,
  299.   `data` text NOT NULL,
  300.   PRIMARY KEY (id)
  301. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  302. DROP TABLE IF EXISTS pre_common_cache;
  303. CREATE TABLE pre_common_cache (
  304.   cachekey varchar(255) NOT NULL DEFAULT '',
  305.   cachevalue mediumblob NOT NULL,
  306.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  307.   PRIMARY KEY (cachekey)
  308. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  309. DROP TABLE IF EXISTS pre_common_card;
  310. CREATE TABLE pre_common_card (
  311.   id char(255) NOT NULL DEFAULT '',
  312.   typeid smallint(6) unsigned NOT NULL DEFAULT '1',
  313.   maketype tinyint(1) NOT NULL DEFAULT '0',
  314.   makeruid mediumint(8) unsigned NOT NULL DEFAULT '0',
  315.   price mediumint(8) unsigned NOT NULL DEFAULT '0',
  316.   extcreditskey tinyint(1) NOT NULL DEFAULT '0',
  317.   extcreditsval int(10) NOT NULL DEFAULT '0',
  318.   `status` tinyint(1) unsigned NOT NULL DEFAULT '1',
  319.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  320.   cleardateline int(10) unsigned NOT NULL DEFAULT '0',
  321.   useddateline int(10) unsigned NOT NULL DEFAULT '0',
  322.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  323.   PRIMARY KEY (id),
  324.   KEY dateline (dateline)
  325. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  326. DROP TABLE IF EXISTS pre_common_card_log;
  327. CREATE TABLE pre_common_card_log (
  328.   id smallint(6) NOT NULL AUTO_INCREMENT,
  329.   uid mediumint(8) NOT NULL DEFAULT '0',
  330.   username varchar(20) NOT NULL DEFAULT '',
  331.   cardrule varchar(255) NOT NULL DEFAULT '',
  332.   info text NOT NULL,
  333.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  334.   description mediumtext NOT NULL,
  335.   operation tinyint(1) NOT NULL DEFAULT '0',
  336.   PRIMARY KEY (id),
  337.   KEY dateline (dateline),
  338.   KEY operation_dateline (operation,dateline)
  339. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  340. DROP TABLE IF EXISTS pre_common_card_type;
  341. CREATE TABLE pre_common_card_type (
  342.   id smallint(6) NOT NULL AUTO_INCREMENT,
  343.   typename char(20) NOT NULL DEFAULT '',
  344.   PRIMARY KEY (id)
  345. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  346. DROP TABLE IF EXISTS pre_common_connect_guest;
  347. CREATE TABLE pre_common_connect_guest (
  348.   conopenid char(32) NOT NULL DEFAULT '',
  349.   conuin char(40) NOT NULL DEFAULT '',
  350.   conuinsecret char(16) NOT NULL DEFAULT '',
  351.   conqqnick char(100) NOT NULL DEFAULT '',
  352.   conuintoken char(32) NOT NULL DEFAULT '',
  353.   PRIMARY KEY (conopenid)
  354. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  355. DROP TABLE IF EXISTS pre_common_credit_log;
  356. CREATE TABLE pre_common_credit_log (
  357.   logid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  358.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  359.   operation char(3) NOT NULL DEFAULT '',
  360.   relatedid int(10) unsigned NOT NULL,
  361.   dateline int(10) unsigned NOT NULL,
  362.   extcredits1 int(10) NOT NULL,
  363.   extcredits2 int(10) NOT NULL,
  364.   extcredits3 int(10) NOT NULL,
  365.   extcredits4 int(10) NOT NULL,
  366.   extcredits5 int(10) NOT NULL,
  367.   extcredits6 int(10) NOT NULL,
  368.   extcredits7 int(10) NOT NULL,
  369.   extcredits8 int(10) NOT NULL,
  370.   PRIMARY KEY (logid),
  371.   KEY uid (uid),
  372.   KEY operation (operation),
  373.   KEY relatedid (relatedid),
  374.   KEY dateline (dateline)
  375. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  376. DROP TABLE IF EXISTS pre_common_credit_log_field;
  377. CREATE TABLE pre_common_credit_log_field (
  378.   logid mediumint(8) unsigned NOT NULL,
  379.   title varchar(100) NOT NULL,
  380.   `text` text NOT NULL,
  381.   KEY logid (logid)
  382. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  383. DROP TABLE IF EXISTS pre_common_credit_rule;
  384. CREATE TABLE pre_common_credit_rule (
  385.   rid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  386.   rulename varchar(20) NOT NULL DEFAULT '',
  387.   `action` varchar(20) NOT NULL DEFAULT '',
  388.   cycletype tinyint(1) NOT NULL DEFAULT '0',
  389.   cycletime int(10) NOT NULL DEFAULT '0',
  390.   rewardnum tinyint(2) NOT NULL DEFAULT '1',
  391.   norepeat tinyint(1) NOT NULL DEFAULT '0',
  392.   extcredits1 int(10) NOT NULL DEFAULT '0',
  393.   extcredits2 int(10) NOT NULL DEFAULT '0',
  394.   extcredits3 int(10) NOT NULL DEFAULT '0',
  395.   extcredits4 int(10) NOT NULL DEFAULT '0',
  396.   extcredits5 int(10) NOT NULL DEFAULT '0',
  397.   extcredits6 int(10) NOT NULL DEFAULT '0',
  398.   extcredits7 int(10) NOT NULL DEFAULT '0',
  399.   extcredits8 int(10) NOT NULL DEFAULT '0',
  400.   fids text NOT NULL,
  401.   PRIMARY KEY (rid),
  402.   UNIQUE KEY `action` (`action`)
  403. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  404. DROP TABLE IF EXISTS pre_common_credit_rule_log;
  405. CREATE TABLE pre_common_credit_rule_log (
  406.   clid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  407.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  408.   rid mediumint(8) unsigned NOT NULL DEFAULT '0',
  409.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  410.   total mediumint(8) unsigned NOT NULL DEFAULT '0',
  411.   cyclenum mediumint(8) unsigned NOT NULL DEFAULT '0',
  412.   extcredits1 int(10) NOT NULL DEFAULT '0',
  413.   extcredits2 int(10) NOT NULL DEFAULT '0',
  414.   extcredits3 int(10) NOT NULL DEFAULT '0',
  415.   extcredits4 int(10) NOT NULL DEFAULT '0',
  416.   extcredits5 int(10) NOT NULL DEFAULT '0',
  417.   extcredits6 int(10) NOT NULL DEFAULT '0',
  418.   extcredits7 int(10) NOT NULL DEFAULT '0',
  419.   extcredits8 int(10) NOT NULL DEFAULT '0',
  420.   starttime int(10) unsigned NOT NULL DEFAULT '0',
  421.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  422.   PRIMARY KEY (clid),
  423.   KEY uid (uid,rid,fid),
  424.   KEY dateline (dateline)
  425. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  426. DROP TABLE IF EXISTS pre_common_credit_rule_log_field;
  427. CREATE TABLE pre_common_credit_rule_log_field (
  428.   clid mediumint(8) unsigned NOT NULL DEFAULT '0',
  429.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  430.   info text NOT NULL,
  431.   `user` text NOT NULL,
  432.   app text NOT NULL,
  433.   PRIMARY KEY (uid,clid)
  434. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  435. DROP TABLE IF EXISTS pre_common_cron;
  436. CREATE TABLE pre_common_cron (
  437.   cronid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  438.   available tinyint(1) NOT NULL DEFAULT '0',
  439.   `type` enum('user','system','plugin') NOT NULL DEFAULT 'user',
  440.   `name` char(50) NOT NULL DEFAULT '',
  441.   filename char(50) NOT NULL DEFAULT '',
  442.   lastrun int(10) unsigned NOT NULL DEFAULT '0',
  443.   nextrun int(10) unsigned NOT NULL DEFAULT '0',
  444.   weekday tinyint(1) NOT NULL DEFAULT '0',
  445.   `day` tinyint(2) NOT NULL DEFAULT '0',
  446.   `hour` tinyint(2) NOT NULL DEFAULT '0',
  447.   `minute` char(36) NOT NULL DEFAULT '',
  448.   PRIMARY KEY (cronid),
  449.   KEY nextrun (available,nextrun)
  450. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  451. DROP TABLE IF EXISTS pre_common_devicetoken;
  452. CREATE TABLE pre_common_devicetoken (
  453.   uid mediumint(8) unsigned NOT NULL,
  454.   token char(50) NOT NULL,
  455.   PRIMARY KEY (uid),
  456.   KEY token (token)
  457. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  458. DROP TABLE IF EXISTS pre_common_district;
  459. CREATE TABLE pre_common_district (
  460.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  461.   `name` varchar(255) NOT NULL DEFAULT '',
  462.   `level` tinyint(4) unsigned NOT NULL DEFAULT '0',
  463.   usetype tinyint(1) unsigned NOT NULL DEFAULT '0',
  464.   upid mediumint(8) unsigned NOT NULL DEFAULT '0',
  465.   displayorder smallint(6) NOT NULL DEFAULT '0',
  466.   PRIMARY KEY (id),
  467.   KEY upid (upid,displayorder)
  468. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  469. DROP TABLE IF EXISTS pre_common_diy_data;
  470. CREATE TABLE pre_common_diy_data (
  471.   targettplname varchar(100) NOT NULL DEFAULT '',
  472.   tpldirectory varchar(80) NOT NULL DEFAULT '',
  473.   primaltplname varchar(255) NOT NULL DEFAULT '',
  474.   diycontent mediumtext NOT NULL,
  475.   `name` varchar(255) NOT NULL DEFAULT '',
  476.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  477.   username varchar(15) NOT NULL DEFAULT '',
  478.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  479.   PRIMARY KEY (targettplname,tpldirectory)
  480. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  481. DROP TABLE IF EXISTS pre_common_domain;
  482. CREATE TABLE pre_common_domain (
  483.   domain char(30) NOT NULL DEFAULT '',
  484.   domainroot char(60) NOT NULL DEFAULT '',
  485.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  486.   idtype char(15) NOT NULL DEFAULT '',
  487.   PRIMARY KEY (id,idtype),
  488.   KEY domain (domain,domainroot),
  489.   KEY idtype (idtype)
  490. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  491. DROP TABLE IF EXISTS pre_common_failedip;
  492. CREATE TABLE pre_common_failedip (
  493.   ip char(7) NOT NULL DEFAULT '',
  494.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  495.   count tinyint(1) unsigned NOT NULL DEFAULT '0',
  496.   PRIMARY KEY (ip,lastupdate),
  497.   KEY lastupdate (lastupdate)
  498. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  499. DROP TABLE IF EXISTS pre_common_failedlogin;
  500. CREATE TABLE pre_common_failedlogin (
  501.   ip char(15) NOT NULL DEFAULT '',
  502.   username char(32) NOT NULL DEFAULT '',
  503.   count tinyint(1) unsigned NOT NULL DEFAULT '0',
  504.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  505.   PRIMARY KEY (ip,username)
  506. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  507. DROP TABLE IF EXISTS pre_common_friendlink;
  508. CREATE TABLE pre_common_friendlink (
  509.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  510.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  511.   `name` varchar(100) NOT NULL DEFAULT '',
  512.   url varchar(255) NOT NULL DEFAULT '',
  513.   description mediumtext NOT NULL,
  514.   logo varchar(255) NOT NULL DEFAULT '',
  515.   `type` tinyint(3) NOT NULL DEFAULT '0',
  516.   PRIMARY KEY (id)
  517. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  518. DROP TABLE IF EXISTS pre_common_grouppm;
  519. CREATE TABLE pre_common_grouppm (
  520.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  521.   authorid mediumint(8) unsigned NOT NULL DEFAULT '0',
  522.   author varchar(15) NOT NULL DEFAULT '',
  523.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  524.   message text NOT NULL,
  525.   numbers mediumint(8) unsigned NOT NULL DEFAULT '0',
  526.   PRIMARY KEY (id)
  527. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  528. DROP TABLE IF EXISTS pre_common_invite;
  529. CREATE TABLE pre_common_invite (
  530.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  531.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  532.   `code` char(20) NOT NULL DEFAULT '',
  533.   fuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  534.   fusername char(20) NOT NULL DEFAULT '',
  535.   `type` tinyint(1) NOT NULL DEFAULT '0',
  536.   email char(40) NOT NULL DEFAULT '',
  537.   inviteip char(15) NOT NULL DEFAULT '',
  538.   appid mediumint(8) unsigned NOT NULL DEFAULT '0',
  539.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  540.   endtime int(10) unsigned NOT NULL DEFAULT '0',
  541.   regdateline int(10) unsigned NOT NULL DEFAULT '0',
  542.   `status` tinyint(1) NOT NULL DEFAULT '1',
  543.   orderid char(32) NOT NULL DEFAULT '',
  544.   PRIMARY KEY (id),
  545.   KEY uid (uid,dateline)
  546. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  547. DROP TABLE IF EXISTS pre_common_magic;
  548. CREATE TABLE pre_common_magic (
  549.   magicid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  550.   available tinyint(1) NOT NULL DEFAULT '0',
  551.   `name` varchar(50) NOT NULL,
  552.   identifier varchar(40) NOT NULL,
  553.   description varchar(255) NOT NULL,
  554.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  555.   credit tinyint(1) NOT NULL DEFAULT '0',
  556.   price mediumint(8) unsigned NOT NULL DEFAULT '0',
  557.   num smallint(6) unsigned NOT NULL DEFAULT '0',
  558.   salevolume smallint(6) unsigned NOT NULL DEFAULT '0',
  559.   supplytype tinyint(1) NOT NULL DEFAULT '0',
  560.   supplynum smallint(6) unsigned NOT NULL DEFAULT '0',
  561.   useperoid tinyint(1) NOT NULL DEFAULT '0',
  562.   usenum smallint(6) unsigned NOT NULL DEFAULT '0',
  563.   weight tinyint(3) unsigned NOT NULL DEFAULT '1',
  564.   magicperm text NOT NULL,
  565.   useevent tinyint(1) NOT NULL DEFAULT '0',
  566.   PRIMARY KEY (magicid),
  567.   UNIQUE KEY identifier (identifier),
  568.   KEY displayorder (available,displayorder)
  569. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  570. DROP TABLE IF EXISTS pre_common_magiclog;
  571. CREATE TABLE pre_common_magiclog (
  572.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  573.   magicid smallint(6) unsigned NOT NULL DEFAULT '0',
  574.   `action` tinyint(1) NOT NULL DEFAULT '0',
  575.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  576.   amount smallint(6) unsigned NOT NULL DEFAULT '0',
  577.   credit tinyint(1) unsigned NOT NULL DEFAULT '0',
  578.   price mediumint(8) unsigned NOT NULL DEFAULT '0',
  579.   targetid int(10) unsigned NOT NULL DEFAULT '0',
  580.   idtype char(6) DEFAULT NULL,
  581.   targetuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  582.   KEY uid (uid,dateline),
  583.   KEY `action` (`action`),
  584.   KEY targetuid (targetuid,dateline),
  585.   KEY magicid (magicid,dateline)
  586. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  587. DROP TABLE IF EXISTS pre_common_mailcron;
  588. CREATE TABLE pre_common_mailcron (
  589.   cid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  590.   touid mediumint(8) unsigned NOT NULL DEFAULT '0',
  591.   email varchar(100) NOT NULL DEFAULT '',
  592.   sendtime int(10) unsigned NOT NULL DEFAULT '0',
  593.   PRIMARY KEY (cid),
  594.   KEY sendtime (sendtime)
  595. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  596. DROP TABLE IF EXISTS pre_common_mailqueue;
  597. CREATE TABLE pre_common_mailqueue (
  598.   qid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  599.   cid mediumint(8) unsigned NOT NULL DEFAULT '0',
  600.   `subject` text NOT NULL,
  601.   message text NOT NULL,
  602.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  603.   PRIMARY KEY (qid),
  604.   KEY mcid (cid,dateline)
  605. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  606. DROP TABLE IF EXISTS pre_common_member;
  607. CREATE TABLE pre_common_member (
  608.   uid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  609.   email char(40) NOT NULL DEFAULT '',
  610.   username char(15) NOT NULL DEFAULT '',
  611.   `password` char(32) NOT NULL DEFAULT '',
  612.   `status` tinyint(1) NOT NULL DEFAULT '0',
  613.   emailstatus tinyint(1) NOT NULL DEFAULT '0',
  614.   avatarstatus tinyint(1) NOT NULL DEFAULT '0',
  615.   videophotostatus tinyint(1) NOT NULL DEFAULT '0',
  616.   adminid tinyint(1) NOT NULL DEFAULT '0',
  617.   groupid smallint(6) unsigned NOT NULL DEFAULT '0',
  618.   groupexpiry int(10) unsigned NOT NULL DEFAULT '0',
  619.   extgroupids char(20) NOT NULL DEFAULT '',
  620.   regdate int(10) unsigned NOT NULL DEFAULT '0',
  621.   credits int(10) NOT NULL DEFAULT '0',
  622.   notifysound tinyint(1) NOT NULL DEFAULT '0',
  623.   timeoffset char(4) NOT NULL DEFAULT '',
  624.   newpm smallint(6) unsigned NOT NULL DEFAULT '0',
  625.   newprompt smallint(6) unsigned NOT NULL DEFAULT '0',
  626.   accessmasks tinyint(1) NOT NULL DEFAULT '0',
  627.   allowadmincp tinyint(1) NOT NULL DEFAULT '0',
  628.   onlyacceptfriendpm tinyint(1) NOT NULL DEFAULT '0',
  629.   conisbind tinyint(1) unsigned NOT NULL DEFAULT '0',
  630.   freeze tinyint(1) NOT NULL DEFAULT '0',
  631.   PRIMARY KEY (uid),
  632.   UNIQUE KEY username (username),
  633.   KEY email (email),
  634.   KEY groupid (groupid),
  635.   KEY conisbind (conisbind),
  636.   KEY regdate (regdate)
  637. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  638. DROP TABLE IF EXISTS pre_common_member_action_log;
  639. CREATE TABLE pre_common_member_action_log (
  640.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  641.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  642.   `action` tinyint(5) NOT NULL DEFAULT '0',
  643.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  644.   PRIMARY KEY (id),
  645.   KEY dateline (dateline,`action`,uid)
  646. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  647. DROP TABLE IF EXISTS pre_common_member_connect;
  648. CREATE TABLE pre_common_member_connect (
  649.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  650.   conuin char(40) NOT NULL DEFAULT '',
  651.   conuinsecret char(16) NOT NULL DEFAULT '',
  652.   conopenid char(32) NOT NULL DEFAULT '',
  653.   conisfeed tinyint(1) unsigned NOT NULL DEFAULT '0',
  654.   conispublishfeed tinyint(1) unsigned NOT NULL DEFAULT '0',
  655.   conispublisht tinyint(1) unsigned NOT NULL DEFAULT '0',
  656.   conisregister tinyint(1) unsigned NOT NULL DEFAULT '0',
  657.   conisqzoneavatar tinyint(1) unsigned NOT NULL DEFAULT '0',
  658.   conisqqshow tinyint(1) unsigned NOT NULL DEFAULT '0',
  659.   conuintoken char(32) NOT NULL DEFAULT '',
  660.   PRIMARY KEY (uid),
  661.   KEY conuin (conuin),
  662.   KEY conopenid (conopenid)
  663. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  664. DROP TABLE IF EXISTS pre_common_member_count;
  665. CREATE TABLE pre_common_member_count (
  666.   uid mediumint(8) unsigned NOT NULL,
  667.   extcredits1 int(10) NOT NULL DEFAULT '0',
  668.   extcredits2 int(10) NOT NULL DEFAULT '0',
  669.   extcredits3 int(10) NOT NULL DEFAULT '0',
  670.   extcredits4 int(10) NOT NULL DEFAULT '0',
  671.   extcredits5 int(10) NOT NULL DEFAULT '0',
  672.   extcredits6 int(10) NOT NULL DEFAULT '0',
  673.   extcredits7 int(10) NOT NULL DEFAULT '0',
  674.   extcredits8 int(10) NOT NULL DEFAULT '0',
  675.   friends smallint(6) unsigned NOT NULL DEFAULT '0',
  676.   posts mediumint(8) unsigned NOT NULL DEFAULT '0',
  677.   threads mediumint(8) unsigned NOT NULL DEFAULT '0',
  678.   digestposts smallint(6) unsigned NOT NULL DEFAULT '0',
  679.   doings smallint(6) unsigned NOT NULL DEFAULT '0',
  680.   blogs smallint(6) unsigned NOT NULL DEFAULT '0',
  681.   albums smallint(6) unsigned NOT NULL DEFAULT '0',
  682.   sharings smallint(6) unsigned NOT NULL DEFAULT '0',
  683.   attachsize int(10) unsigned NOT NULL DEFAULT '0',
  684.   views mediumint(8) unsigned NOT NULL DEFAULT '0',
  685.   oltime smallint(6) unsigned NOT NULL DEFAULT '0',
  686.   todayattachs smallint(6) unsigned NOT NULL DEFAULT '0',
  687.   todayattachsize int(10) unsigned NOT NULL DEFAULT '0',
  688.   feeds mediumint(8) unsigned NOT NULL DEFAULT '0',
  689.   follower mediumint(8) unsigned NOT NULL DEFAULT '0',
  690.   following mediumint(8) unsigned NOT NULL DEFAULT '0',
  691.   newfollower mediumint(8) unsigned NOT NULL DEFAULT '0',
  692.   blacklist mediumint(8) unsigned NOT NULL DEFAULT '0',
  693.   PRIMARY KEY (uid),
  694.   KEY posts (posts)
  695. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  696. DROP TABLE IF EXISTS pre_common_member_crime;
  697. CREATE TABLE pre_common_member_crime (
  698.   cid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  699.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  700.   operatorid mediumint(8) unsigned NOT NULL DEFAULT '0',
  701.   operator varchar(15) NOT NULL,
  702.   `action` tinyint(5) NOT NULL,
  703.   reason text NOT NULL,
  704.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  705.   PRIMARY KEY (cid),
  706.   KEY uid (uid,`action`,dateline)
  707. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  708. DROP TABLE IF EXISTS pre_common_member_field_forum;
  709. CREATE TABLE pre_common_member_field_forum (
  710.   uid mediumint(8) unsigned NOT NULL,
  711.   publishfeed tinyint(3) NOT NULL DEFAULT '0',
  712.   customshow tinyint(1) unsigned NOT NULL DEFAULT '26',
  713.   customstatus varchar(30) NOT NULL DEFAULT '',
  714.   medals text NOT NULL,
  715.   sightml text NOT NULL,
  716.   groupterms text NOT NULL,
  717.   authstr varchar(20) NOT NULL DEFAULT '',
  718.   `groups` mediumtext NOT NULL,
  719.   attentiongroup varchar(255) NOT NULL DEFAULT '',
  720.   PRIMARY KEY (uid)
  721. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  722. DROP TABLE IF EXISTS pre_common_member_field_home;
  723. CREATE TABLE pre_common_member_field_home (
  724.   uid mediumint(8) unsigned NOT NULL,
  725.   videophoto varchar(255) NOT NULL DEFAULT '',
  726.   spacename varchar(255) NOT NULL DEFAULT '',
  727.   spacedescription varchar(255) NOT NULL DEFAULT '',
  728.   domain char(15) NOT NULL DEFAULT '',
  729.   addsize int(10) unsigned NOT NULL DEFAULT '0',
  730.   addfriend smallint(6) unsigned NOT NULL DEFAULT '0',
  731.   menunum smallint(6) unsigned NOT NULL DEFAULT '0',
  732.   theme varchar(20) NOT NULL DEFAULT '',
  733.   spacecss text NOT NULL,
  734.   blockposition text NOT NULL,
  735.   recentnote text NOT NULL,
  736.   spacenote text NOT NULL,
  737.   privacy text NOT NULL,
  738.   feedfriend mediumtext NOT NULL,
  739.   acceptemail text NOT NULL,
  740.   magicgift text NOT NULL,
  741.   stickblogs text NOT NULL,
  742.   PRIMARY KEY (uid),
  743.   KEY domain (domain)
  744. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  745. DROP TABLE IF EXISTS pre_common_member_forum_buylog;
  746. CREATE TABLE pre_common_member_forum_buylog (
  747.   uid mediumint(8) unsigned NOT NULL,
  748.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  749.   credits int(10) unsigned NOT NULL DEFAULT '0',
  750.   PRIMARY KEY (uid,fid),
  751.   KEY fid (fid)
  752. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  753. DROP TABLE IF EXISTS pre_common_member_grouppm;
  754. CREATE TABLE pre_common_member_grouppm (
  755.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  756.   gpmid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  757.   `status` tinyint(1) NOT NULL DEFAULT '0',
  758.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  759.   PRIMARY KEY (gpmid),
  760.   KEY uid (uid)
  761. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  762. DROP TABLE IF EXISTS pre_common_member_log;
  763. CREATE TABLE pre_common_member_log (
  764.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  765.   `action` char(10) NOT NULL DEFAULT '',
  766.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  767.   PRIMARY KEY (uid)
  768. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  769. DROP TABLE IF EXISTS pre_common_member_magic;
  770. CREATE TABLE pre_common_member_magic (
  771.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  772.   magicid smallint(6) unsigned NOT NULL DEFAULT '0',
  773.   num smallint(6) unsigned NOT NULL DEFAULT '0',
  774.   PRIMARY KEY (uid,magicid)
  775. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  776. DROP TABLE IF EXISTS pre_common_member_medal;
  777. CREATE TABLE pre_common_member_medal (
  778.   uid mediumint(8) unsigned NOT NULL,
  779.   medalid smallint(6) unsigned NOT NULL,
  780.   PRIMARY KEY (uid,medalid)
  781. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  782. DROP TABLE IF EXISTS pre_common_member_newprompt;
  783. CREATE TABLE pre_common_member_newprompt (
  784.   uid mediumint(8) unsigned NOT NULL,
  785.   `data` varchar(255) NOT NULL DEFAULT '',
  786.   PRIMARY KEY (uid)
  787. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  788. DROP TABLE IF EXISTS pre_common_member_profile;
  789. CREATE TABLE pre_common_member_profile (
  790.   uid mediumint(8) unsigned NOT NULL,
  791.   realname varchar(255) NOT NULL DEFAULT '',
  792.   gender tinyint(1) NOT NULL DEFAULT '0',
  793.   birthyear smallint(6) unsigned NOT NULL DEFAULT '0',
  794.   birthmonth tinyint(3) unsigned NOT NULL DEFAULT '0',
  795.   birthday tinyint(3) unsigned NOT NULL DEFAULT '0',
  796.   constellation varchar(255) NOT NULL DEFAULT '',
  797.   zodiac varchar(255) NOT NULL DEFAULT '',
  798.   telephone varchar(255) NOT NULL DEFAULT '',
  799.   mobile varchar(255) NOT NULL DEFAULT '',
  800.   idcardtype varchar(255) NOT NULL DEFAULT '',
  801.   idcard varchar(255) NOT NULL DEFAULT '',
  802.   address varchar(255) NOT NULL DEFAULT '',
  803.   zipcode varchar(255) NOT NULL DEFAULT '',
  804.   nationality varchar(255) NOT NULL DEFAULT '',
  805.   birthprovince varchar(255) NOT NULL DEFAULT '',
  806.   birthcity varchar(255) NOT NULL DEFAULT '',
  807.   birthdist varchar(20) NOT NULL DEFAULT '',
  808.   birthcommunity varchar(255) NOT NULL DEFAULT '',
  809.   resideprovince varchar(255) NOT NULL DEFAULT '',
  810.   residecity varchar(255) NOT NULL DEFAULT '',
  811.   residedist varchar(20) NOT NULL DEFAULT '',
  812.   residecommunity varchar(255) NOT NULL DEFAULT '',
  813.   residesuite varchar(255) NOT NULL DEFAULT '',
  814.   graduateschool varchar(255) NOT NULL DEFAULT '',
  815.   company varchar(255) NOT NULL DEFAULT '',
  816.   education varchar(255) NOT NULL DEFAULT '',
  817.   occupation varchar(255) NOT NULL DEFAULT '',
  818.   position varchar(255) NOT NULL DEFAULT '',
  819.   revenue varchar(255) NOT NULL DEFAULT '',
  820.   affectivestatus varchar(255) NOT NULL DEFAULT '',
  821.   lookingfor varchar(255) NOT NULL DEFAULT '',
  822.   bloodtype varchar(255) NOT NULL DEFAULT '',
  823.   height varchar(255) NOT NULL DEFAULT '',
  824.   weight varchar(255) NOT NULL DEFAULT '',
  825.   alipay varchar(255) NOT NULL DEFAULT '',
  826.   icq varchar(255) NOT NULL DEFAULT '',
  827.   qq varchar(255) NOT NULL DEFAULT '',
  828.   yahoo varchar(255) NOT NULL DEFAULT '',
  829.   msn varchar(255) NOT NULL DEFAULT '',
  830.   taobao varchar(255) NOT NULL DEFAULT '',
  831.   site varchar(255) NOT NULL DEFAULT '',
  832.   bio text NOT NULL,
  833.   interest text NOT NULL,
  834.   field1 text NOT NULL,
  835.   field2 text NOT NULL,
  836.   field3 text NOT NULL,
  837.   field4 text NOT NULL,
  838.   field5 text NOT NULL,
  839.   field6 text NOT NULL,
  840.   field7 text NOT NULL,
  841.   field8 text NOT NULL,
  842.   PRIMARY KEY (uid)
  843. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  844. DROP TABLE IF EXISTS pre_common_member_profile_setting;
  845. CREATE TABLE pre_common_member_profile_setting (
  846.   fieldid varchar(255) NOT NULL DEFAULT '',
  847.   available tinyint(1) NOT NULL DEFAULT '0',
  848.   invisible tinyint(1) NOT NULL DEFAULT '0',
  849.   needverify tinyint(1) NOT NULL DEFAULT '0',
  850.   title varchar(255) NOT NULL DEFAULT '',
  851.   description varchar(255) NOT NULL DEFAULT '',
  852.   displayorder smallint(6) unsigned NOT NULL DEFAULT '0',
  853.   required tinyint(1) NOT NULL DEFAULT '0',
  854.   unchangeable tinyint(1) NOT NULL DEFAULT '0',
  855.   showincard tinyint(1) NOT NULL DEFAULT '0',
  856.   showinthread tinyint(1) NOT NULL DEFAULT '0',
  857.   showinregister tinyint(1) NOT NULL DEFAULT '0',
  858.   allowsearch tinyint(1) NOT NULL DEFAULT '0',
  859.   formtype varchar(255) NOT NULL,
  860.   size smallint(6) unsigned NOT NULL DEFAULT '0',
  861.   choices text NOT NULL,
  862.   validate text NOT NULL,
  863.   PRIMARY KEY (fieldid)
  864. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  865. DROP TABLE IF EXISTS pre_common_member_security;
  866. CREATE TABLE pre_common_member_security (
  867.   securityid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  868.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  869.   username varchar(255) NOT NULL DEFAULT '',
  870.   fieldid varchar(255) NOT NULL DEFAULT '',
  871.   oldvalue text NOT NULL,
  872.   newvalue text NOT NULL,
  873.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  874.   PRIMARY KEY (securityid),
  875.   KEY uid (uid,fieldid),
  876.   KEY dateline (dateline)
  877. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  878. DROP TABLE IF EXISTS pre_common_member_secwhite;
  879. CREATE TABLE pre_common_member_secwhite (
  880.   uid int(10) NOT NULL,
  881.   dateline int(10) NOT NULL,
  882.   PRIMARY KEY (uid)
  883. ) ENGINE=HEAP;

  884. DROP TABLE IF EXISTS pre_common_member_stat_field;
  885. CREATE TABLE pre_common_member_stat_field (
  886.   optionid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  887.   fieldid varchar(255) NOT NULL DEFAULT '',
  888.   fieldvalue varchar(255) NOT NULL DEFAULT '',
  889.   `hash` varchar(255) NOT NULL DEFAULT '',
  890.   users mediumint(8) unsigned NOT NULL DEFAULT '0',
  891.   updatetime int(10) unsigned NOT NULL DEFAULT '0',
  892.   PRIMARY KEY (optionid),
  893.   KEY fieldid (fieldid)
  894. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  895. DROP TABLE IF EXISTS pre_common_member_status;
  896. CREATE TABLE pre_common_member_status (
  897.   uid mediumint(8) unsigned NOT NULL,
  898.   regip char(15) NOT NULL DEFAULT '',
  899.   lastip char(15) NOT NULL DEFAULT '',
  900.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  901.   lastvisit int(10) unsigned NOT NULL DEFAULT '0',
  902.   lastactivity int(10) unsigned NOT NULL DEFAULT '0',
  903.   lastpost int(10) unsigned NOT NULL DEFAULT '0',
  904.   lastsendmail int(10) unsigned NOT NULL DEFAULT '0',
  905.   invisible tinyint(1) NOT NULL DEFAULT '0',
  906.   buyercredit smallint(6) NOT NULL DEFAULT '0',
  907.   sellercredit smallint(6) NOT NULL DEFAULT '0',
  908.   favtimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  909.   sharetimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  910.   profileprogress tinyint(2) unsigned NOT NULL DEFAULT '0',
  911.   PRIMARY KEY (uid),
  912.   KEY lastactivity (lastactivity,invisible)
  913. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  914. DROP TABLE IF EXISTS pre_common_member_validate;
  915. CREATE TABLE pre_common_member_validate (
  916.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  917.   submitdate int(10) unsigned NOT NULL DEFAULT '0',
  918.   moddate int(10) unsigned NOT NULL DEFAULT '0',
  919.   admin varchar(15) NOT NULL DEFAULT '',
  920.   submittimes tinyint(3) unsigned NOT NULL DEFAULT '0',
  921.   `status` tinyint(1) NOT NULL DEFAULT '0',
  922.   message text NOT NULL,
  923.   remark text NOT NULL,
  924.   PRIMARY KEY (uid),
  925.   KEY `status` (`status`)
  926. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  927. DROP TABLE IF EXISTS pre_common_member_verify;
  928. CREATE TABLE pre_common_member_verify (
  929.   uid mediumint(8) unsigned NOT NULL,
  930.   verify1 tinyint(1) NOT NULL DEFAULT '0',
  931.   verify2 tinyint(1) NOT NULL DEFAULT '0',
  932.   verify3 tinyint(1) NOT NULL DEFAULT '0',
  933.   verify4 tinyint(1) NOT NULL DEFAULT '0',
  934.   verify5 tinyint(1) NOT NULL DEFAULT '0',
  935.   verify6 tinyint(1) NOT NULL DEFAULT '0',
  936.   verify7 tinyint(1) NOT NULL DEFAULT '0',
  937.   PRIMARY KEY (uid),
  938.   KEY verify1 (verify1),
  939.   KEY verify2 (verify2),
  940.   KEY verify3 (verify3),
  941.   KEY verify4 (verify4),
  942.   KEY verify5 (verify5),
  943.   KEY verify6 (verify6),
  944.   KEY verify7 (verify7)
  945. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  946. DROP TABLE IF EXISTS pre_common_member_verify_info;
  947. CREATE TABLE pre_common_member_verify_info (
  948.   vid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  949.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  950.   username varchar(30) NOT NULL DEFAULT '',
  951.   verifytype tinyint(1) NOT NULL DEFAULT '0',
  952.   flag tinyint(1) NOT NULL DEFAULT '0',
  953.   field text NOT NULL,
  954.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  955.   PRIMARY KEY (vid),
  956.   KEY verifytype (verifytype,flag),
  957.   KEY uid (uid,verifytype,dateline)
  958. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  959. DROP TABLE IF EXISTS pre_common_myapp;
  960. CREATE TABLE pre_common_myapp (
  961.   appid mediumint(8) unsigned NOT NULL DEFAULT '0',
  962.   appname varchar(60) NOT NULL DEFAULT '',
  963.   narrow tinyint(1) NOT NULL DEFAULT '0',
  964.   flag tinyint(1) NOT NULL DEFAULT '0',
  965.   version mediumint(8) unsigned NOT NULL DEFAULT '0',
  966.   userpanelarea tinyint(1) NOT NULL DEFAULT '0',
  967.   canvastitle varchar(60) NOT NULL DEFAULT '',
  968.   fullscreen tinyint(1) NOT NULL DEFAULT '0',
  969.   displayuserpanel tinyint(1) NOT NULL DEFAULT '0',
  970.   displaymethod tinyint(1) NOT NULL DEFAULT '0',
  971.   displayorder smallint(6) unsigned NOT NULL DEFAULT '0',
  972.   appstatus tinyint(2) NOT NULL DEFAULT '0',
  973.   iconstatus tinyint(2) NOT NULL DEFAULT '0',
  974.   icondowntime int(10) unsigned NOT NULL DEFAULT '0',
  975.   PRIMARY KEY (appid),
  976.   KEY flag (flag,displayorder)
  977. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  978. DROP TABLE IF EXISTS pre_common_myinvite;
  979. CREATE TABLE pre_common_myinvite (
  980.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  981.   typename varchar(100) NOT NULL DEFAULT '',
  982.   appid mediumint(8) NOT NULL DEFAULT '0',
  983.   `type` tinyint(1) NOT NULL DEFAULT '0',
  984.   fromuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  985.   touid mediumint(8) unsigned NOT NULL DEFAULT '0',
  986.   myml text NOT NULL,
  987.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  988.   `hash` int(10) unsigned NOT NULL DEFAULT '0',
  989.   PRIMARY KEY (id),
  990.   KEY `hash` (`hash`),
  991.   KEY uid (touid,dateline)
  992. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  993. DROP TABLE IF EXISTS pre_common_mytask;
  994. CREATE TABLE pre_common_mytask (
  995.   uid mediumint(8) unsigned NOT NULL,
  996.   username char(15) NOT NULL DEFAULT '',
  997.   taskid smallint(6) unsigned NOT NULL,
  998.   `status` tinyint(1) NOT NULL DEFAULT '0',
  999.   csc char(255) NOT NULL DEFAULT '',
  1000.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1001.   PRIMARY KEY (uid,taskid),
  1002.   KEY parter (taskid,dateline)
  1003. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1004. DROP TABLE IF EXISTS pre_common_nav;
  1005. CREATE TABLE pre_common_nav (
  1006.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1007.   parentid smallint(6) unsigned NOT NULL DEFAULT '0',
  1008.   `name` varchar(255) NOT NULL,
  1009.   title varchar(255) NOT NULL,
  1010.   url varchar(255) NOT NULL,
  1011.   identifier varchar(255) NOT NULL,
  1012.   target tinyint(1) NOT NULL DEFAULT '0',
  1013.   `type` tinyint(1) NOT NULL DEFAULT '0',
  1014.   available tinyint(1) NOT NULL DEFAULT '0',
  1015.   displayorder tinyint(3) NOT NULL,
  1016.   highlight tinyint(1) NOT NULL DEFAULT '0',
  1017.   `level` tinyint(1) NOT NULL DEFAULT '0',
  1018.   subtype tinyint(1) NOT NULL DEFAULT '0',
  1019.   subcols tinyint(1) NOT NULL DEFAULT '0',
  1020.   icon varchar(255) NOT NULL,
  1021.   subname varchar(255) NOT NULL,
  1022.   suburl varchar(255) NOT NULL,
  1023.   navtype tinyint(1) NOT NULL DEFAULT '0',
  1024.   logo varchar(255) NOT NULL,
  1025.   PRIMARY KEY (id),
  1026.   KEY navtype (navtype)
  1027. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1028. DROP TABLE IF EXISTS pre_common_onlinetime;
  1029. CREATE TABLE pre_common_onlinetime (
  1030.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1031.   thismonth smallint(6) unsigned NOT NULL DEFAULT '0',
  1032.   total mediumint(8) unsigned NOT NULL DEFAULT '0',
  1033.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  1034.   PRIMARY KEY (uid)
  1035. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1036. DROP TABLE IF EXISTS pre_common_optimizer;
  1037. CREATE TABLE pre_common_optimizer (
  1038.   k char(100) NOT NULL DEFAULT '',
  1039.   v char(255) NOT NULL DEFAULT '',
  1040.   PRIMARY KEY (k)
  1041. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1042. DROP TABLE IF EXISTS pre_common_patch;
  1043. CREATE TABLE pre_common_patch (
  1044.   `serial` varchar(10) NOT NULL DEFAULT '',
  1045.   rule text NOT NULL,
  1046.   note text NOT NULL,
  1047.   `status` tinyint(1) NOT NULL DEFAULT '0',
  1048.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1049.   PRIMARY KEY (`serial`)
  1050. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1051. DROP TABLE IF EXISTS pre_common_plugin;
  1052. CREATE TABLE pre_common_plugin (
  1053.   pluginid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1054.   available tinyint(1) NOT NULL DEFAULT '0',
  1055.   adminid tinyint(1) unsigned NOT NULL DEFAULT '0',
  1056.   `name` varchar(40) NOT NULL DEFAULT '',
  1057.   identifier varchar(40) NOT NULL DEFAULT '',
  1058.   description varchar(255) NOT NULL DEFAULT '',
  1059.   datatables varchar(255) NOT NULL DEFAULT '',
  1060.   `directory` varchar(100) NOT NULL DEFAULT '',
  1061.   copyright varchar(100) NOT NULL DEFAULT '',
  1062.   modules text NOT NULL,
  1063.   version varchar(20) NOT NULL DEFAULT '',
  1064.   PRIMARY KEY (pluginid),
  1065.   UNIQUE KEY identifier (identifier)
  1066. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1067. DROP TABLE IF EXISTS pre_common_pluginvar;
  1068. CREATE TABLE pre_common_pluginvar (
  1069.   pluginvarid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1070.   pluginid smallint(6) unsigned NOT NULL DEFAULT '0',
  1071.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  1072.   title varchar(100) NOT NULL DEFAULT '',
  1073.   description varchar(255) NOT NULL DEFAULT '',
  1074.   variable varchar(40) NOT NULL DEFAULT '',
  1075.   `type` varchar(20) NOT NULL DEFAULT 'text',
  1076.   `value` text NOT NULL,
  1077.   extra text NOT NULL,
  1078.   PRIMARY KEY (pluginvarid),
  1079.   KEY pluginid (pluginid)
  1080. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1081. DROP TABLE IF EXISTS pre_common_process;
  1082. CREATE TABLE pre_common_process (
  1083.   processid char(32) NOT NULL,
  1084.   expiry int(10) DEFAULT NULL,
  1085.   extra int(10) DEFAULT NULL,
  1086.   PRIMARY KEY (processid),
  1087.   KEY expiry (expiry)
  1088. ) ENGINE=HEAP;

  1089. DROP TABLE IF EXISTS pre_common_regip;
  1090. CREATE TABLE pre_common_regip (
  1091.   ip char(15) NOT NULL DEFAULT '',
  1092.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1093.   count smallint(6) NOT NULL DEFAULT '0',
  1094.   KEY ip (ip)
  1095. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1096. DROP TABLE IF EXISTS pre_common_relatedlink;
  1097. CREATE TABLE pre_common_relatedlink (
  1098.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1099.   `name` varchar(100) NOT NULL DEFAULT '',
  1100.   url varchar(255) NOT NULL DEFAULT '',
  1101.   extent tinyint(3) NOT NULL DEFAULT '0',
  1102.   PRIMARY KEY (id)
  1103. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1104. DROP TABLE IF EXISTS pre_common_remote_port;
  1105. CREATE TABLE pre_common_remote_port (
  1106.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  1107.   idtype char(15) NOT NULL DEFAULT '',
  1108.   useip char(15) NOT NULL DEFAULT '',
  1109.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  1110.   PRIMARY KEY (id,idtype)
  1111. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1112. DROP TABLE IF EXISTS pre_common_report;
  1113. CREATE TABLE pre_common_report (
  1114.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1115.   urlkey char(32) NOT NULL DEFAULT '',
  1116.   url varchar(255) NOT NULL DEFAULT '',
  1117.   message text NOT NULL,
  1118.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1119.   username varchar(15) NOT NULL DEFAULT '',
  1120.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1121.   num smallint(6) unsigned NOT NULL DEFAULT '1',
  1122.   opuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1123.   opname varchar(15) NOT NULL DEFAULT '',
  1124.   optime int(10) unsigned NOT NULL DEFAULT '0',
  1125.   opresult varchar(255) NOT NULL DEFAULT '',
  1126.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1127.   PRIMARY KEY (id),
  1128.   KEY urlkey (urlkey),
  1129.   KEY fid (fid)
  1130. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1131. DROP TABLE IF EXISTS pre_common_searchindex;
  1132. CREATE TABLE pre_common_searchindex (
  1133.   searchid int(10) unsigned NOT NULL AUTO_INCREMENT,
  1134.   srchmod tinyint(3) unsigned NOT NULL,
  1135.   keywords varchar(255) NOT NULL DEFAULT '',
  1136.   searchstring text NOT NULL,
  1137.   useip varchar(15) NOT NULL DEFAULT '',
  1138.   uid mediumint(10) unsigned NOT NULL DEFAULT '0',
  1139.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1140.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  1141.   threadsortid smallint(6) unsigned NOT NULL DEFAULT '0',
  1142.   num smallint(6) unsigned NOT NULL DEFAULT '0',
  1143.   ids text NOT NULL,
  1144.   PRIMARY KEY (searchid),
  1145.   KEY srchmod (srchmod)
  1146. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1147. DROP TABLE IF EXISTS pre_common_seccheck;
  1148. CREATE TABLE pre_common_seccheck (
  1149.   ssid int(10) NOT NULL AUTO_INCREMENT,
  1150.   dateline int(10) NOT NULL,
  1151.   `code` char(6) NOT NULL,
  1152.   succeed tinyint(1) NOT NULL,
  1153.   verified tinyint(1) NOT NULL,
  1154.   PRIMARY KEY (ssid),
  1155.   KEY dateline (dateline),
  1156.   KEY succeed (succeed),
  1157.   KEY verified (verified)
  1158. ) ENGINE=HEAP;

  1159. DROP TABLE IF EXISTS pre_common_secquestion;
  1160. CREATE TABLE pre_common_secquestion (
  1161.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1162.   `type` tinyint(1) unsigned NOT NULL,
  1163.   question text NOT NULL,
  1164.   answer varchar(255) NOT NULL,
  1165.   PRIMARY KEY (id)
  1166. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1167. DROP TABLE IF EXISTS pre_common_session;
  1168. CREATE TABLE pre_common_session (
  1169.   sid char(6) NOT NULL DEFAULT '',
  1170.   ip1 tinyint(3) unsigned NOT NULL DEFAULT '0',
  1171.   ip2 tinyint(3) unsigned NOT NULL DEFAULT '0',
  1172.   ip3 tinyint(3) unsigned NOT NULL DEFAULT '0',
  1173.   ip4 tinyint(3) unsigned NOT NULL DEFAULT '0',
  1174.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1175.   username char(15) NOT NULL DEFAULT '',
  1176.   groupid smallint(6) unsigned NOT NULL DEFAULT '0',
  1177.   invisible tinyint(1) NOT NULL DEFAULT '0',
  1178.   `action` tinyint(1) unsigned NOT NULL DEFAULT '0',
  1179.   lastactivity int(10) unsigned NOT NULL DEFAULT '0',
  1180.   lastolupdate int(10) unsigned NOT NULL DEFAULT '0',
  1181.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1182.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1183.   UNIQUE KEY sid (sid),
  1184.   KEY uid (uid)
  1185. ) ENGINE=HEAP;

  1186. DROP TABLE IF EXISTS pre_common_setting;
  1187. CREATE TABLE pre_common_setting (
  1188.   skey varchar(255) NOT NULL DEFAULT '',
  1189.   svalue text NOT NULL,
  1190.   PRIMARY KEY (skey)
  1191. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1192. DROP TABLE IF EXISTS pre_common_smiley;
  1193. CREATE TABLE pre_common_smiley (
  1194.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1195.   typeid smallint(6) unsigned NOT NULL,
  1196.   displayorder tinyint(1) NOT NULL DEFAULT '0',
  1197.   `type` enum('smiley','stamp','stamplist') NOT NULL DEFAULT 'smiley',
  1198.   `code` varchar(30) NOT NULL DEFAULT '',
  1199.   url varchar(30) NOT NULL DEFAULT '',
  1200.   PRIMARY KEY (id),
  1201.   KEY `type` (`type`,displayorder)
  1202. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1203. DROP TABLE IF EXISTS pre_common_sphinxcounter;
  1204. CREATE TABLE pre_common_sphinxcounter (
  1205.   indexid tinyint(1) NOT NULL,
  1206.   maxid int(10) NOT NULL,
  1207.   PRIMARY KEY (indexid)
  1208. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1209. DROP TABLE IF EXISTS pre_common_stat;
  1210. CREATE TABLE pre_common_stat (
  1211.   daytime int(10) unsigned NOT NULL DEFAULT '0',
  1212.   login int(10) unsigned NOT NULL DEFAULT '0',
  1213.   mobilelogin int(10) unsigned NOT NULL DEFAULT '0',
  1214.   connectlogin int(10) unsigned NOT NULL DEFAULT '0',
  1215.   register int(10) unsigned NOT NULL DEFAULT '0',
  1216.   invite int(10) unsigned NOT NULL DEFAULT '0',
  1217.   appinvite int(10) unsigned NOT NULL DEFAULT '0',
  1218.   doing int(10) unsigned NOT NULL DEFAULT '0',
  1219.   blog int(10) unsigned NOT NULL DEFAULT '0',
  1220.   pic int(10) unsigned NOT NULL DEFAULT '0',
  1221.   poll int(10) unsigned NOT NULL DEFAULT '0',
  1222.   activity int(10) unsigned NOT NULL DEFAULT '0',
  1223.   `share` int(10) unsigned NOT NULL DEFAULT '0',
  1224.   thread int(10) unsigned NOT NULL DEFAULT '0',
  1225.   docomment int(10) unsigned NOT NULL DEFAULT '0',
  1226.   blogcomment int(10) unsigned NOT NULL DEFAULT '0',
  1227.   piccomment int(10) unsigned NOT NULL DEFAULT '0',
  1228.   sharecomment int(10) unsigned NOT NULL DEFAULT '0',
  1229.   reward int(10) unsigned NOT NULL DEFAULT '0',
  1230.   debate int(10) unsigned NOT NULL DEFAULT '0',
  1231.   trade int(10) unsigned NOT NULL DEFAULT '0',
  1232.   `group` int(10) unsigned NOT NULL DEFAULT '0',
  1233.   groupjoin int(10) unsigned NOT NULL DEFAULT '0',
  1234.   groupthread int(10) unsigned NOT NULL DEFAULT '0',
  1235.   grouppost int(10) unsigned NOT NULL DEFAULT '0',
  1236.   post int(10) unsigned NOT NULL DEFAULT '0',
  1237.   wall int(10) unsigned NOT NULL DEFAULT '0',
  1238.   poke int(10) unsigned NOT NULL DEFAULT '0',
  1239.   click int(10) unsigned NOT NULL DEFAULT '0',
  1240.   sendpm int(10) unsigned NOT NULL DEFAULT '0',
  1241.   friend int(10) unsigned NOT NULL DEFAULT '0',
  1242.   addfriend int(10) unsigned NOT NULL DEFAULT '0',
  1243.   PRIMARY KEY (daytime)
  1244. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1245. DROP TABLE IF EXISTS pre_common_statuser;
  1246. CREATE TABLE pre_common_statuser (
  1247.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1248.   daytime int(10) unsigned NOT NULL DEFAULT '0',
  1249.   `type` char(20) NOT NULL DEFAULT '',
  1250.   KEY uid (uid)
  1251. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1252. DROP TABLE IF EXISTS pre_common_style;
  1253. CREATE TABLE pre_common_style (
  1254.   styleid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1255.   `name` varchar(20) NOT NULL DEFAULT '',
  1256.   available tinyint(1) NOT NULL DEFAULT '1',
  1257.   templateid smallint(6) unsigned NOT NULL DEFAULT '0',
  1258.   extstyle varchar(255) NOT NULL DEFAULT '',
  1259.   PRIMARY KEY (styleid)
  1260. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1261. DROP TABLE IF EXISTS pre_common_stylevar;
  1262. CREATE TABLE pre_common_stylevar (
  1263.   stylevarid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1264.   styleid smallint(6) unsigned NOT NULL DEFAULT '0',
  1265.   variable text NOT NULL,
  1266.   substitute text NOT NULL,
  1267.   PRIMARY KEY (stylevarid),
  1268.   KEY styleid (styleid)
  1269. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1270. DROP TABLE IF EXISTS pre_common_syscache;
  1271. CREATE TABLE pre_common_syscache (
  1272.   cname varchar(32) NOT NULL,
  1273.   ctype tinyint(3) unsigned NOT NULL,
  1274.   dateline int(10) unsigned NOT NULL,
  1275.   `data` mediumblob NOT NULL,
  1276.   PRIMARY KEY (cname)
  1277. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1278. DROP TABLE IF EXISTS pre_common_tag;
  1279. CREATE TABLE pre_common_tag (
  1280.   tagid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1281.   tagname char(20) NOT NULL DEFAULT '',
  1282.   `status` tinyint(1) NOT NULL DEFAULT '0',
  1283.   PRIMARY KEY (tagid),
  1284.   KEY tagname (tagname),
  1285.   KEY `status` (`status`,tagid)
  1286. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1287. DROP TABLE IF EXISTS pre_common_tagitem;
  1288. CREATE TABLE pre_common_tagitem (
  1289.   tagid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1290.   itemid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1291.   idtype char(10) NOT NULL DEFAULT '',
  1292.   UNIQUE KEY item (tagid,itemid,idtype),
  1293.   KEY idtype (idtype,itemid)
  1294. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1295. DROP TABLE IF EXISTS pre_common_task;
  1296. CREATE TABLE pre_common_task (
  1297.   taskid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1298.   relatedtaskid smallint(6) unsigned NOT NULL DEFAULT '0',
  1299.   available tinyint(1) NOT NULL DEFAULT '0',
  1300.   `name` varchar(50) NOT NULL DEFAULT '',
  1301.   description text NOT NULL,
  1302.   icon varchar(150) NOT NULL DEFAULT '',
  1303.   applicants mediumint(8) unsigned NOT NULL DEFAULT '0',
  1304.   achievers mediumint(8) unsigned NOT NULL DEFAULT '0',
  1305.   tasklimits mediumint(8) unsigned NOT NULL DEFAULT '0',
  1306.   applyperm text NOT NULL,
  1307.   scriptname varchar(50) NOT NULL DEFAULT '',
  1308.   starttime int(10) unsigned NOT NULL DEFAULT '0',
  1309.   endtime int(10) unsigned NOT NULL DEFAULT '0',
  1310.   period int(10) unsigned NOT NULL DEFAULT '0',
  1311.   periodtype tinyint(1) NOT NULL DEFAULT '0',
  1312.   reward enum('credit','magic','medal','invite','group') NOT NULL DEFAULT 'credit',
  1313.   prize varchar(15) NOT NULL DEFAULT '',
  1314.   bonus int(10) NOT NULL DEFAULT '0',
  1315.   displayorder smallint(6) unsigned NOT NULL DEFAULT '0',
  1316.   version varchar(15) NOT NULL DEFAULT '',
  1317.   PRIMARY KEY (taskid)
  1318. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1319. DROP TABLE IF EXISTS pre_common_taskvar;
  1320. CREATE TABLE pre_common_taskvar (
  1321.   taskvarid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1322.   taskid smallint(6) unsigned NOT NULL DEFAULT '0',
  1323.   sort enum('apply','complete') NOT NULL DEFAULT 'complete',
  1324.   `name` varchar(100) NOT NULL DEFAULT '',
  1325.   description varchar(255) NOT NULL DEFAULT '',
  1326.   variable varchar(40) NOT NULL DEFAULT '',
  1327.   `type` varchar(20) NOT NULL DEFAULT 'text',
  1328.   `value` text NOT NULL,
  1329.   PRIMARY KEY (taskvarid),
  1330.   KEY taskid (taskid)
  1331. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1332. DROP TABLE IF EXISTS pre_common_template;
  1333. CREATE TABLE pre_common_template (
  1334.   templateid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1335.   `name` varchar(30) NOT NULL DEFAULT '',
  1336.   `directory` varchar(100) NOT NULL DEFAULT '',
  1337.   copyright varchar(100) NOT NULL DEFAULT '',
  1338.   PRIMARY KEY (templateid)
  1339. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1340. DROP TABLE IF EXISTS pre_common_template_block;
  1341. CREATE TABLE pre_common_template_block (
  1342.   targettplname varchar(100) NOT NULL DEFAULT '',
  1343.   tpldirectory varchar(80) NOT NULL DEFAULT '',
  1344.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1345.   PRIMARY KEY (targettplname,tpldirectory,bid),
  1346.   KEY bid (bid)
  1347. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1348. DROP TABLE IF EXISTS pre_common_template_permission;
  1349. CREATE TABLE pre_common_template_permission (
  1350.   targettplname varchar(100) NOT NULL DEFAULT '',
  1351.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1352.   allowmanage tinyint(1) NOT NULL DEFAULT '0',
  1353.   allowrecommend tinyint(1) NOT NULL DEFAULT '0',
  1354.   needverify tinyint(1) NOT NULL DEFAULT '0',
  1355.   inheritedtplname varchar(255) NOT NULL DEFAULT '',
  1356.   PRIMARY KEY (targettplname,uid),
  1357.   KEY uid (uid)
  1358. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1359. DROP TABLE IF EXISTS pre_common_uin_black;
  1360. CREATE TABLE pre_common_uin_black (
  1361.   uin char(40) NOT NULL,
  1362.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1363.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1364.   PRIMARY KEY (uin),
  1365.   UNIQUE KEY uid (uid)
  1366. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1367. DROP TABLE IF EXISTS pre_common_usergroup;
  1368. CREATE TABLE pre_common_usergroup (
  1369.   groupid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1370.   radminid tinyint(3) NOT NULL DEFAULT '0',
  1371.   `type` enum('system','special','member') NOT NULL DEFAULT 'member',
  1372.   `system` varchar(255) NOT NULL DEFAULT 'private',
  1373.   grouptitle varchar(255) NOT NULL DEFAULT '',
  1374.   creditshigher int(10) NOT NULL DEFAULT '0',
  1375.   creditslower int(10) NOT NULL DEFAULT '0',
  1376.   stars tinyint(3) NOT NULL DEFAULT '0',
  1377.   color varchar(255) NOT NULL DEFAULT '',
  1378.   icon varchar(255) NOT NULL DEFAULT '',
  1379.   allowvisit tinyint(1) NOT NULL DEFAULT '0',
  1380.   allowsendpm tinyint(1) NOT NULL DEFAULT '1',
  1381.   allowinvite tinyint(1) NOT NULL DEFAULT '0',
  1382.   allowmailinvite tinyint(1) NOT NULL DEFAULT '0',
  1383.   maxinvitenum tinyint(3) unsigned NOT NULL DEFAULT '0',
  1384.   inviteprice smallint(6) unsigned NOT NULL DEFAULT '0',
  1385.   maxinviteday smallint(6) unsigned NOT NULL DEFAULT '0',
  1386.   PRIMARY KEY (groupid),
  1387.   KEY creditsrange (creditshigher,creditslower)
  1388. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1389. DROP TABLE IF EXISTS pre_common_usergroup_field;
  1390. CREATE TABLE pre_common_usergroup_field (
  1391.   groupid smallint(6) unsigned NOT NULL,
  1392.   readaccess tinyint(3) unsigned NOT NULL DEFAULT '0',
  1393.   allowpost tinyint(1) NOT NULL DEFAULT '0',
  1394.   allowreply tinyint(1) NOT NULL DEFAULT '0',
  1395.   allowpostpoll tinyint(1) NOT NULL DEFAULT '0',
  1396.   allowpostreward tinyint(1) NOT NULL DEFAULT '0',
  1397.   allowposttrade tinyint(1) NOT NULL DEFAULT '0',
  1398.   allowpostactivity tinyint(1) NOT NULL DEFAULT '0',
  1399.   allowdirectpost tinyint(1) NOT NULL DEFAULT '0',
  1400.   allowgetattach tinyint(1) NOT NULL DEFAULT '0',
  1401.   allowgetimage tinyint(1) NOT NULL DEFAULT '0',
  1402.   allowpostattach tinyint(1) NOT NULL DEFAULT '0',
  1403.   allowpostimage tinyint(1) NOT NULL DEFAULT '0',
  1404.   allowvote tinyint(1) NOT NULL DEFAULT '0',
  1405.   allowsearch tinyint(1) NOT NULL DEFAULT '0',
  1406.   allowcstatus tinyint(1) NOT NULL DEFAULT '0',
  1407.   allowinvisible tinyint(1) NOT NULL DEFAULT '0',
  1408.   allowtransfer tinyint(1) NOT NULL DEFAULT '0',
  1409.   allowsetreadperm tinyint(1) NOT NULL DEFAULT '0',
  1410.   allowsetattachperm tinyint(1) NOT NULL DEFAULT '0',
  1411.   allowposttag tinyint(1) NOT NULL DEFAULT '0',
  1412.   allowhidecode tinyint(1) NOT NULL DEFAULT '0',
  1413.   allowhtml tinyint(1) NOT NULL DEFAULT '0',
  1414.   allowanonymous tinyint(1) NOT NULL DEFAULT '0',
  1415.   allowsigbbcode tinyint(1) NOT NULL DEFAULT '0',
  1416.   allowsigimgcode tinyint(1) NOT NULL DEFAULT '0',
  1417.   allowmagics tinyint(1) unsigned NOT NULL,
  1418.   disableperiodctrl tinyint(1) NOT NULL DEFAULT '0',
  1419.   reasonpm tinyint(1) NOT NULL DEFAULT '0',
  1420.   maxprice smallint(6) unsigned NOT NULL DEFAULT '0',
  1421.   maxsigsize smallint(6) unsigned NOT NULL DEFAULT '0',
  1422.   maxattachsize int(10) unsigned NOT NULL DEFAULT '0',
  1423.   maxsizeperday int(10) unsigned NOT NULL DEFAULT '0',
  1424.   maxthreadsperhour tinyint(3) unsigned NOT NULL DEFAULT '0',
  1425.   maxpostsperhour tinyint(3) unsigned NOT NULL DEFAULT '0',
  1426.   attachextensions char(100) NOT NULL DEFAULT '',
  1427.   raterange char(150) NOT NULL DEFAULT '',
  1428.   loginreward char(150) NOT NULL DEFAULT '',
  1429.   mintradeprice smallint(6) unsigned NOT NULL DEFAULT '1',
  1430.   maxtradeprice smallint(6) unsigned NOT NULL DEFAULT '0',
  1431.   minrewardprice smallint(6) unsigned NOT NULL DEFAULT '1',
  1432.   maxrewardprice smallint(6) unsigned NOT NULL DEFAULT '0',
  1433.   magicsdiscount tinyint(1) NOT NULL,
  1434.   maxmagicsweight smallint(6) unsigned NOT NULL,
  1435.   allowpostdebate tinyint(1) NOT NULL DEFAULT '0',
  1436.   tradestick tinyint(1) unsigned NOT NULL,
  1437.   exempt tinyint(1) unsigned NOT NULL,
  1438.   maxattachnum smallint(6) NOT NULL DEFAULT '0',
  1439.   allowposturl tinyint(1) NOT NULL DEFAULT '3',
  1440.   allowrecommend tinyint(1) unsigned NOT NULL DEFAULT '1',
  1441.   allowpostrushreply tinyint(1) NOT NULL DEFAULT '0',
  1442.   maxfriendnum smallint(6) unsigned NOT NULL DEFAULT '0',
  1443.   maxspacesize int(10) unsigned NOT NULL DEFAULT '0',
  1444.   allowcomment tinyint(1) NOT NULL DEFAULT '0',
  1445.   allowcommentarticle smallint(6) NOT NULL DEFAULT '0',
  1446.   searchinterval smallint(6) unsigned NOT NULL DEFAULT '0',
  1447.   searchignore tinyint(1) NOT NULL DEFAULT '0',
  1448.   allowblog tinyint(1) NOT NULL DEFAULT '0',
  1449.   allowdoing tinyint(1) NOT NULL DEFAULT '0',
  1450.   allowupload tinyint(1) NOT NULL DEFAULT '0',
  1451.   allowshare tinyint(1) NOT NULL DEFAULT '0',
  1452.   allowblogmod tinyint(1) unsigned NOT NULL DEFAULT '0',
  1453.   allowdoingmod tinyint(1) unsigned NOT NULL DEFAULT '0',
  1454.   allowuploadmod tinyint(1) unsigned NOT NULL DEFAULT '0',
  1455.   allowsharemod tinyint(1) unsigned NOT NULL DEFAULT '0',
  1456.   allowcss tinyint(1) NOT NULL DEFAULT '0',
  1457.   allowpoke tinyint(1) NOT NULL DEFAULT '0',
  1458.   allowfriend tinyint(1) NOT NULL DEFAULT '0',
  1459.   allowclick tinyint(1) NOT NULL DEFAULT '0',
  1460.   allowmagic tinyint(1) NOT NULL DEFAULT '0',
  1461.   allowstat tinyint(1) NOT NULL DEFAULT '0',
  1462.   allowstatdata tinyint(1) NOT NULL DEFAULT '0',
  1463.   videophotoignore tinyint(1) NOT NULL DEFAULT '0',
  1464.   allowviewvideophoto tinyint(1) NOT NULL DEFAULT '0',
  1465.   allowmyop tinyint(1) NOT NULL DEFAULT '0',
  1466.   magicdiscount tinyint(1) NOT NULL DEFAULT '0',
  1467.   domainlength smallint(6) unsigned NOT NULL DEFAULT '0',
  1468.   seccode tinyint(1) NOT NULL DEFAULT '1',
  1469.   disablepostctrl tinyint(1) NOT NULL DEFAULT '0',
  1470.   allowbuildgroup tinyint(1) unsigned NOT NULL DEFAULT '0',
  1471.   allowgroupdirectpost tinyint(1) unsigned NOT NULL DEFAULT '0',
  1472.   allowgroupposturl tinyint(1) unsigned NOT NULL DEFAULT '0',
  1473.   edittimelimit smallint(6) unsigned NOT NULL DEFAULT '0',
  1474.   allowpostarticle tinyint(1) NOT NULL DEFAULT '0',
  1475.   allowdownlocalimg tinyint(1) NOT NULL DEFAULT '0',
  1476.   allowdownremoteimg tinyint(1) NOT NULL DEFAULT '0',
  1477.   allowpostarticlemod tinyint(1) unsigned NOT NULL DEFAULT '0',
  1478.   allowspacediyhtml tinyint(1) NOT NULL DEFAULT '0',
  1479.   allowspacediybbcode tinyint(1) NOT NULL DEFAULT '0',
  1480.   allowspacediyimgcode tinyint(1) NOT NULL DEFAULT '0',
  1481.   allowcommentpost tinyint(1) NOT NULL DEFAULT '2',
  1482.   allowcommentitem tinyint(1) NOT NULL DEFAULT '0',
  1483.   allowcommentreply tinyint(1) NOT NULL DEFAULT '0',
  1484.   allowreplycredit tinyint(1) NOT NULL DEFAULT '0',
  1485.   ignorecensor tinyint(1) unsigned NOT NULL DEFAULT '0',
  1486.   allowsendallpm tinyint(1) unsigned NOT NULL DEFAULT '0',
  1487.   allowsendpmmaxnum smallint(6) unsigned NOT NULL DEFAULT '0',
  1488.   maximagesize mediumint(8) unsigned NOT NULL DEFAULT '0',
  1489.   allowmediacode tinyint(1) NOT NULL DEFAULT '0',
  1490.   allowbegincode tinyint(1) unsigned NOT NULL DEFAULT '0',
  1491.   allowat smallint(6) unsigned NOT NULL DEFAULT '0',
  1492.   allowsetpublishdate tinyint(1) unsigned NOT NULL DEFAULT '0',
  1493.   allowfollowcollection tinyint(1) unsigned NOT NULL DEFAULT '0',
  1494.   allowcommentcollection tinyint(1) unsigned NOT NULL DEFAULT '0',
  1495.   allowcreatecollection smallint(6) unsigned NOT NULL DEFAULT '0',
  1496.   forcesecques tinyint(1) unsigned NOT NULL DEFAULT '0',
  1497.   forcelogin tinyint(1) unsigned NOT NULL DEFAULT '0',
  1498.   closead tinyint(1) unsigned NOT NULL DEFAULT '0',
  1499.   buildgroupcredits smallint(6) unsigned NOT NULL DEFAULT '0',
  1500.   allowimgcontent tinyint(1) unsigned NOT NULL DEFAULT '0',
  1501.   PRIMARY KEY (groupid)
  1502. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1503. DROP TABLE IF EXISTS pre_common_visit;
  1504. CREATE TABLE pre_common_visit (
  1505.   ip int(10) unsigned NOT NULL DEFAULT '0',
  1506.   `view` int(10) unsigned NOT NULL DEFAULT '0',
  1507.   PRIMARY KEY (ip),
  1508.   KEY ip (ip,`view`)
  1509. ) ENGINE=HEAP;

  1510. DROP TABLE IF EXISTS pre_common_word;
  1511. CREATE TABLE pre_common_word (
  1512.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1513.   admin varchar(15) NOT NULL DEFAULT '',
  1514.   `type` smallint(6) NOT NULL DEFAULT '1',
  1515.   find varchar(255) NOT NULL DEFAULT '',
  1516.   replacement varchar(255) NOT NULL DEFAULT '',
  1517.   extra varchar(255) NOT NULL DEFAULT '',
  1518.   PRIMARY KEY (id)
  1519. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1520. DROP TABLE IF EXISTS pre_common_word_type;
  1521. CREATE TABLE pre_common_word_type (
  1522.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1523.   typename varchar(15) NOT NULL DEFAULT '',
  1524.   PRIMARY KEY (id)
  1525. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1526. DROP TABLE IF EXISTS pre_connect_disktask;
  1527. CREATE TABLE pre_connect_disktask (
  1528.   taskid int(10) unsigned NOT NULL AUTO_INCREMENT,
  1529.   aid int(10) unsigned NOT NULL DEFAULT '0',
  1530.   uid int(10) unsigned NOT NULL DEFAULT '0',
  1531.   openid char(32) NOT NULL DEFAULT '',
  1532.   filename varchar(255) NOT NULL DEFAULT '',
  1533.   verifycode char(32) NOT NULL DEFAULT '',
  1534.   `status` smallint(6) unsigned NOT NULL DEFAULT '0',
  1535.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1536.   downloadtime int(10) unsigned NOT NULL DEFAULT '0',
  1537.   extra text,
  1538.   PRIMARY KEY (taskid),
  1539.   KEY openid (openid),
  1540.   KEY `status` (`status`)
  1541. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1542. DROP TABLE IF EXISTS pre_connect_feedlog;
  1543. CREATE TABLE pre_connect_feedlog (
  1544.   flid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1545.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1546.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1547.   publishtimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  1548.   lastpublished int(10) unsigned NOT NULL DEFAULT '0',
  1549.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1550.   `status` tinyint(1) NOT NULL DEFAULT '1',
  1551.   PRIMARY KEY (flid),
  1552.   UNIQUE KEY tid (tid)
  1553. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1554. DROP TABLE IF EXISTS pre_connect_memberbindlog;
  1555. CREATE TABLE pre_connect_memberbindlog (
  1556.   mblid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1557.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1558.   uin char(40) NOT NULL,
  1559.   `type` tinyint(1) NOT NULL DEFAULT '0',
  1560.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1561.   PRIMARY KEY (mblid),
  1562.   KEY uid (uid),
  1563.   KEY uin (uin),
  1564.   KEY dateline (dateline)
  1565. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1566. DROP TABLE IF EXISTS pre_connect_postfeedlog;
  1567. CREATE TABLE pre_connect_postfeedlog (
  1568.   flid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1569.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1570.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1571.   publishtimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  1572.   lastpublished int(10) unsigned NOT NULL DEFAULT '0',
  1573.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1574.   `status` tinyint(1) NOT NULL DEFAULT '1',
  1575.   PRIMARY KEY (flid),
  1576.   UNIQUE KEY pid (pid)
  1577. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1578. DROP TABLE IF EXISTS pre_connect_tthreadlog;
  1579. CREATE TABLE pre_connect_tthreadlog (
  1580.   twid char(16) NOT NULL,
  1581.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1582.   conopenid char(32) NOT NULL,
  1583.   pagetime int(10) unsigned DEFAULT '0',
  1584.   lasttwid char(16) DEFAULT NULL,
  1585.   nexttime int(10) unsigned DEFAULT '0',
  1586.   updatetime int(10) unsigned DEFAULT '0',
  1587.   dateline int(10) unsigned DEFAULT '0',
  1588.   PRIMARY KEY (twid),
  1589.   KEY nexttime (tid,nexttime),
  1590.   KEY updatetime (tid,updatetime)
  1591. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1592. DROP TABLE IF EXISTS pre_forum_access;
  1593. CREATE TABLE pre_forum_access (
  1594.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1595.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1596.   allowview tinyint(1) NOT NULL DEFAULT '0',
  1597.   allowpost tinyint(1) NOT NULL DEFAULT '0',
  1598.   allowreply tinyint(1) NOT NULL DEFAULT '0',
  1599.   allowgetattach tinyint(1) NOT NULL DEFAULT '0',
  1600.   allowgetimage tinyint(1) NOT NULL DEFAULT '0',
  1601.   allowpostattach tinyint(1) NOT NULL DEFAULT '0',
  1602.   allowpostimage tinyint(1) NOT NULL DEFAULT '0',
  1603.   adminuser mediumint(8) unsigned NOT NULL DEFAULT '0',
  1604.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1605.   PRIMARY KEY (uid,fid),
  1606.   KEY listorder (fid,dateline)
  1607. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1608. DROP TABLE IF EXISTS pre_forum_activity;
  1609. CREATE TABLE pre_forum_activity (
  1610.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1611.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1612.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1613.   cost mediumint(8) unsigned NOT NULL DEFAULT '0',
  1614.   starttimefrom int(10) unsigned NOT NULL DEFAULT '0',
  1615.   starttimeto int(10) unsigned NOT NULL DEFAULT '0',
  1616.   place varchar(255) NOT NULL DEFAULT '',
  1617.   class varchar(255) NOT NULL DEFAULT '',
  1618.   gender tinyint(1) NOT NULL DEFAULT '0',
  1619.   number smallint(5) unsigned NOT NULL DEFAULT '0',
  1620.   applynumber smallint(5) unsigned NOT NULL DEFAULT '0',
  1621.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  1622.   ufield text NOT NULL,
  1623.   credit smallint(6) unsigned NOT NULL DEFAULT '0',
  1624.   PRIMARY KEY (tid),
  1625.   KEY uid (uid,starttimefrom),
  1626.   KEY starttimefrom (starttimefrom),
  1627.   KEY expiration (expiration),
  1628.   KEY applynumber (applynumber)
  1629. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1630. DROP TABLE IF EXISTS pre_forum_activityapply;
  1631. CREATE TABLE pre_forum_activityapply (
  1632.   applyid int(10) unsigned NOT NULL AUTO_INCREMENT,
  1633.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1634.   username varchar(255) NOT NULL DEFAULT '',
  1635.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1636.   message varchar(255) NOT NULL DEFAULT '',
  1637.   verified tinyint(1) NOT NULL DEFAULT '0',
  1638.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1639.   payment mediumint(8) NOT NULL DEFAULT '0',
  1640.   ufielddata text NOT NULL,
  1641.   PRIMARY KEY (applyid),
  1642.   KEY uid (uid),
  1643.   KEY tid (tid),
  1644.   KEY dateline (tid,dateline)
  1645. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1646. DROP TABLE IF EXISTS pre_forum_announcement;
  1647. CREATE TABLE pre_forum_announcement (
  1648.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1649.   author varchar(15) NOT NULL DEFAULT '',
  1650.   `subject` varchar(255) NOT NULL DEFAULT '',
  1651.   `type` tinyint(1) NOT NULL DEFAULT '0',
  1652.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  1653.   starttime int(10) unsigned NOT NULL DEFAULT '0',
  1654.   endtime int(10) unsigned NOT NULL DEFAULT '0',
  1655.   message text NOT NULL,
  1656.   `groups` text NOT NULL,
  1657.   PRIMARY KEY (id),
  1658.   KEY timespan (starttime,endtime)
  1659. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1660. DROP TABLE IF EXISTS pre_forum_attachment;
  1661. CREATE TABLE pre_forum_attachment (
  1662.   aid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1663.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1664.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1665.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1666.   tableid tinyint(1) unsigned NOT NULL DEFAULT '0',
  1667.   downloads mediumint(8) NOT NULL DEFAULT '0',
  1668.   PRIMARY KEY (aid),
  1669.   KEY tid (tid),
  1670.   KEY pid (pid),
  1671.   KEY uid (uid)
  1672. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1673. DROP TABLE IF EXISTS pre_forum_attachment_0;
  1674. CREATE TABLE pre_forum_attachment_0 (
  1675.   aid mediumint(8) unsigned NOT NULL,
  1676.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1677.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1678.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1679.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1680.   filename varchar(255) NOT NULL DEFAULT '',
  1681.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1682.   attachment varchar(255) NOT NULL DEFAULT '',
  1683.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1684.   description varchar(255) NOT NULL,
  1685.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1686.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1687.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1688.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1689.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1690.   picid mediumint(8) NOT NULL DEFAULT '0',
  1691.   PRIMARY KEY (aid),
  1692.   KEY tid (tid),
  1693.   KEY pid (pid),
  1694.   KEY uid (uid)
  1695. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1696. DROP TABLE IF EXISTS pre_forum_attachment_1;
  1697. CREATE TABLE pre_forum_attachment_1 (
  1698.   aid mediumint(8) unsigned NOT NULL,
  1699.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1700.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1701.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1702.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1703.   filename varchar(255) NOT NULL DEFAULT '',
  1704.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1705.   attachment varchar(255) NOT NULL DEFAULT '',
  1706.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1707.   description varchar(255) NOT NULL,
  1708.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1709.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1710.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1711.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1712.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1713.   picid mediumint(8) NOT NULL DEFAULT '0',
  1714.   PRIMARY KEY (aid),
  1715.   KEY tid (tid),
  1716.   KEY pid (pid),
  1717.   KEY uid (uid)
  1718. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1719. DROP TABLE IF EXISTS pre_forum_attachment_2;
  1720. CREATE TABLE pre_forum_attachment_2 (
  1721.   aid mediumint(8) unsigned NOT NULL,
  1722.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1723.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1724.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1725.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1726.   filename varchar(255) NOT NULL DEFAULT '',
  1727.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1728.   attachment varchar(255) NOT NULL DEFAULT '',
  1729.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1730.   description varchar(255) NOT NULL,
  1731.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1732.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1733.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1734.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1735.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1736.   picid mediumint(8) NOT NULL DEFAULT '0',
  1737.   PRIMARY KEY (aid),
  1738.   KEY tid (tid),
  1739.   KEY pid (pid),
  1740.   KEY uid (uid)
  1741. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1742. DROP TABLE IF EXISTS pre_forum_attachment_3;
  1743. CREATE TABLE pre_forum_attachment_3 (
  1744.   aid mediumint(8) unsigned NOT NULL,
  1745.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1746.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1747.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1748.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1749.   filename varchar(255) NOT NULL DEFAULT '',
  1750.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1751.   attachment varchar(255) NOT NULL DEFAULT '',
  1752.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1753.   description varchar(255) NOT NULL,
  1754.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1755.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1756.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1757.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1758.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1759.   picid mediumint(8) NOT NULL DEFAULT '0',
  1760.   PRIMARY KEY (aid),
  1761.   KEY tid (tid),
  1762.   KEY pid (pid),
  1763.   KEY uid (uid)
  1764. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1765. DROP TABLE IF EXISTS pre_forum_attachment_4;
  1766. CREATE TABLE pre_forum_attachment_4 (
  1767.   aid mediumint(8) unsigned NOT NULL,
  1768.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1769.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1770.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1771.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1772.   filename varchar(255) NOT NULL DEFAULT '',
  1773.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1774.   attachment varchar(255) NOT NULL DEFAULT '',
  1775.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1776.   description varchar(255) NOT NULL,
  1777.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1778.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1779.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1780.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1781.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1782.   picid mediumint(8) NOT NULL DEFAULT '0',
  1783.   PRIMARY KEY (aid),
  1784.   KEY tid (tid),
  1785.   KEY pid (pid),
  1786.   KEY uid (uid)
  1787. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1788. DROP TABLE IF EXISTS pre_forum_attachment_5;
  1789. CREATE TABLE pre_forum_attachment_5 (
  1790.   aid mediumint(8) unsigned NOT NULL,
  1791.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1792.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1793.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1794.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1795.   filename varchar(255) NOT NULL DEFAULT '',
  1796.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1797.   attachment varchar(255) NOT NULL DEFAULT '',
  1798.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1799.   description varchar(255) NOT NULL,
  1800.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1801.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1802.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1803.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1804.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1805.   picid mediumint(8) NOT NULL DEFAULT '0',
  1806.   PRIMARY KEY (aid),
  1807.   KEY tid (tid),
  1808.   KEY pid (pid),
  1809.   KEY uid (uid)
  1810. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1811. DROP TABLE IF EXISTS pre_forum_attachment_6;
  1812. CREATE TABLE pre_forum_attachment_6 (
  1813.   aid mediumint(8) unsigned NOT NULL,
  1814.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1815.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1816.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1817.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1818.   filename varchar(255) NOT NULL DEFAULT '',
  1819.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1820.   attachment varchar(255) NOT NULL DEFAULT '',
  1821.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1822.   description varchar(255) NOT NULL,
  1823.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1824.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1825.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1826.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1827.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1828.   picid mediumint(8) NOT NULL DEFAULT '0',
  1829.   PRIMARY KEY (aid),
  1830.   KEY tid (tid),
  1831.   KEY pid (pid),
  1832.   KEY uid (uid)
  1833. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1834. DROP TABLE IF EXISTS pre_forum_attachment_7;
  1835. CREATE TABLE pre_forum_attachment_7 (
  1836.   aid mediumint(8) unsigned NOT NULL,
  1837.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1838.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1839.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1840.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1841.   filename varchar(255) NOT NULL DEFAULT '',
  1842.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1843.   attachment varchar(255) NOT NULL DEFAULT '',
  1844.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1845.   description varchar(255) NOT NULL,
  1846.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1847.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1848.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1849.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1850.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1851.   picid mediumint(8) NOT NULL DEFAULT '0',
  1852.   PRIMARY KEY (aid),
  1853.   KEY tid (tid),
  1854.   KEY pid (pid),
  1855.   KEY uid (uid)
  1856. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1857. DROP TABLE IF EXISTS pre_forum_attachment_8;
  1858. CREATE TABLE pre_forum_attachment_8 (
  1859.   aid mediumint(8) unsigned NOT NULL,
  1860.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1861.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1862.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1863.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1864.   filename varchar(255) NOT NULL DEFAULT '',
  1865.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1866.   attachment varchar(255) NOT NULL DEFAULT '',
  1867.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1868.   description varchar(255) NOT NULL,
  1869.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1870.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1871.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1872.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1873.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1874.   picid mediumint(8) NOT NULL DEFAULT '0',
  1875.   PRIMARY KEY (aid),
  1876.   KEY tid (tid),
  1877.   KEY pid (pid),
  1878.   KEY uid (uid)
  1879. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1880. DROP TABLE IF EXISTS pre_forum_attachment_9;
  1881. CREATE TABLE pre_forum_attachment_9 (
  1882.   aid mediumint(8) unsigned NOT NULL,
  1883.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1884.   pid int(10) unsigned NOT NULL DEFAULT '0',
  1885.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1886.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1887.   filename varchar(255) NOT NULL DEFAULT '',
  1888.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1889.   attachment varchar(255) NOT NULL DEFAULT '',
  1890.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1891.   description varchar(255) NOT NULL,
  1892.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  1893.   price smallint(6) unsigned NOT NULL DEFAULT '0',
  1894.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1895.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1896.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1897.   picid mediumint(8) NOT NULL DEFAULT '0',
  1898.   PRIMARY KEY (aid),
  1899.   KEY tid (tid),
  1900.   KEY pid (pid),
  1901.   KEY uid (uid)
  1902. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1903. DROP TABLE IF EXISTS pre_forum_attachment_exif;
  1904. CREATE TABLE pre_forum_attachment_exif (
  1905.   aid mediumint(8) unsigned NOT NULL,
  1906.   exif text NOT NULL,
  1907.   PRIMARY KEY (aid)
  1908. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1909. DROP TABLE IF EXISTS pre_forum_attachment_unused;
  1910. CREATE TABLE pre_forum_attachment_unused (
  1911.   aid mediumint(8) unsigned NOT NULL,
  1912.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1913.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1914.   filename varchar(255) NOT NULL DEFAULT '',
  1915.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  1916.   attachment varchar(255) NOT NULL DEFAULT '',
  1917.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  1918.   isimage tinyint(1) NOT NULL DEFAULT '0',
  1919.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  1920.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  1921.   PRIMARY KEY (aid),
  1922.   KEY uid (uid)
  1923. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1924. DROP TABLE IF EXISTS pre_forum_attachtype;
  1925. CREATE TABLE pre_forum_attachtype (
  1926.   id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  1927.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1928.   extension char(12) NOT NULL DEFAULT '',
  1929.   maxsize int(10) unsigned NOT NULL DEFAULT '0',
  1930.   PRIMARY KEY (id),
  1931.   KEY fid (fid)
  1932. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1933. DROP TABLE IF EXISTS pre_forum_bbcode;
  1934. CREATE TABLE pre_forum_bbcode (
  1935.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1936.   available tinyint(1) NOT NULL DEFAULT '0',
  1937.   tag varchar(100) NOT NULL DEFAULT '',
  1938.   icon varchar(255) NOT NULL,
  1939.   replacement text NOT NULL,
  1940.   example varchar(255) NOT NULL DEFAULT '',
  1941.   explanation text NOT NULL,
  1942.   params tinyint(1) unsigned NOT NULL DEFAULT '1',
  1943.   prompt text NOT NULL,
  1944.   nest tinyint(3) unsigned NOT NULL DEFAULT '1',
  1945.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  1946.   perm text NOT NULL,
  1947.   PRIMARY KEY (id)
  1948. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1949. DROP TABLE IF EXISTS pre_forum_collection;
  1950. CREATE TABLE pre_forum_collection (
  1951.   ctid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1952.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1953.   username varchar(15) NOT NULL DEFAULT '',
  1954.   `name` varchar(50) NOT NULL DEFAULT '',
  1955.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1956.   follownum mediumint(8) unsigned NOT NULL DEFAULT '0',
  1957.   threadnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  1958.   commentnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  1959.   `desc` varchar(255) NOT NULL DEFAULT '',
  1960.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  1961.   rate float NOT NULL DEFAULT '0',
  1962.   ratenum mediumint(8) unsigned NOT NULL DEFAULT '0',
  1963.   lastpost mediumint(8) unsigned NOT NULL DEFAULT '0',
  1964.   lastsubject varchar(80) NOT NULL DEFAULT '',
  1965.   lastposttime int(10) unsigned NOT NULL DEFAULT '0',
  1966.   lastposter varchar(15) NOT NULL DEFAULT '',
  1967.   lastvisit int(10) unsigned NOT NULL DEFAULT '0',
  1968.   keyword varchar(255) NOT NULL DEFAULT '',
  1969.   PRIMARY KEY (ctid),
  1970.   KEY dateline (dateline),
  1971.   KEY hotcollection (threadnum,lastupdate),
  1972.   KEY follownum (follownum),
  1973.   KEY uid (uid)
  1974. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1975. DROP TABLE IF EXISTS pre_forum_collectioncomment;
  1976. CREATE TABLE pre_forum_collectioncomment (
  1977.   cid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  1978.   ctid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1979.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1980.   username varchar(15) NOT NULL DEFAULT '',
  1981.   message text NOT NULL,
  1982.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1983.   useip varchar(16) NOT NULL DEFAULT '',
  1984.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  1985.   rate float NOT NULL DEFAULT '0',
  1986.   PRIMARY KEY (cid),
  1987.   KEY ctid (ctid,dateline),
  1988.   KEY userrate (ctid,uid,rate)
  1989. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  1990. DROP TABLE IF EXISTS pre_forum_collectionfollow;
  1991. CREATE TABLE pre_forum_collectionfollow (
  1992.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1993.   username char(15) NOT NULL DEFAULT '',
  1994.   ctid mediumint(8) unsigned NOT NULL DEFAULT '0',
  1995.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  1996.   lastvisit int(10) unsigned NOT NULL DEFAULT '0',
  1997.   PRIMARY KEY (uid,ctid),
  1998.   KEY ctid (ctid,dateline)
  1999. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2000. DROP TABLE IF EXISTS pre_forum_collectioninvite;
  2001. CREATE TABLE pre_forum_collectioninvite (
  2002.   ctid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2003.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2004.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2005.   PRIMARY KEY (ctid,uid),
  2006.   KEY dateline (dateline)
  2007. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2008. DROP TABLE IF EXISTS pre_forum_collectionrelated;
  2009. CREATE TABLE pre_forum_collectionrelated (
  2010.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2011.   collection text NOT NULL,
  2012.   PRIMARY KEY (tid)
  2013. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2014. DROP TABLE IF EXISTS pre_forum_collectionteamworker;
  2015. CREATE TABLE pre_forum_collectionteamworker (
  2016.   ctid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2017.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2018.   `name` varchar(50) NOT NULL DEFAULT '',
  2019.   username varchar(15) NOT NULL DEFAULT '',
  2020.   lastvisit int(8) unsigned NOT NULL DEFAULT '0',
  2021.   PRIMARY KEY (ctid,uid)
  2022. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2023. DROP TABLE IF EXISTS pre_forum_collectionthread;
  2024. CREATE TABLE pre_forum_collectionthread (
  2025.   ctid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2026.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2027.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2028.   reason varchar(255) NOT NULL DEFAULT '',
  2029.   PRIMARY KEY (ctid,tid),
  2030.   KEY ctid (ctid,dateline)
  2031. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2032. DROP TABLE IF EXISTS pre_forum_creditslog;
  2033. CREATE TABLE pre_forum_creditslog (
  2034.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2035.   fromto char(15) NOT NULL DEFAULT '',
  2036.   sendcredits tinyint(1) NOT NULL DEFAULT '0',
  2037.   receivecredits tinyint(1) NOT NULL DEFAULT '0',
  2038.   send int(10) unsigned NOT NULL DEFAULT '0',
  2039.   receive int(10) unsigned NOT NULL DEFAULT '0',
  2040.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2041.   operation char(3) NOT NULL DEFAULT '',
  2042.   KEY uid (uid,dateline)
  2043. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2044. DROP TABLE IF EXISTS pre_forum_debate;
  2045. CREATE TABLE pre_forum_debate (
  2046.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2047.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2048.   starttime int(10) unsigned NOT NULL DEFAULT '0',
  2049.   endtime int(10) unsigned NOT NULL DEFAULT '0',
  2050.   affirmdebaters mediumint(8) unsigned NOT NULL DEFAULT '0',
  2051.   negadebaters mediumint(8) unsigned NOT NULL DEFAULT '0',
  2052.   affirmvotes mediumint(8) unsigned NOT NULL DEFAULT '0',
  2053.   negavotes mediumint(8) unsigned NOT NULL DEFAULT '0',
  2054.   umpire varchar(15) NOT NULL DEFAULT '',
  2055.   winner tinyint(1) NOT NULL DEFAULT '0',
  2056.   bestdebater varchar(50) NOT NULL DEFAULT '',
  2057.   affirmpoint text NOT NULL,
  2058.   negapoint text NOT NULL,
  2059.   umpirepoint text NOT NULL,
  2060.   affirmvoterids text NOT NULL,
  2061.   negavoterids text NOT NULL,
  2062.   affirmreplies mediumint(8) unsigned NOT NULL,
  2063.   negareplies mediumint(8) unsigned NOT NULL,
  2064.   PRIMARY KEY (tid),
  2065.   KEY uid (uid,starttime)
  2066. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2067. DROP TABLE IF EXISTS pre_forum_debatepost;
  2068. CREATE TABLE pre_forum_debatepost (
  2069.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2070.   stand tinyint(1) NOT NULL DEFAULT '0',
  2071.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2072.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2073.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2074.   voters mediumint(10) unsigned NOT NULL DEFAULT '0',
  2075.   voterids text NOT NULL,
  2076.   PRIMARY KEY (pid),
  2077.   KEY pid (pid,stand),
  2078.   KEY tid (tid,uid)
  2079. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2080. DROP TABLE IF EXISTS pre_forum_faq;
  2081. CREATE TABLE pre_forum_faq (
  2082.   id smallint(6) NOT NULL AUTO_INCREMENT,
  2083.   fpid smallint(6) unsigned NOT NULL DEFAULT '0',
  2084.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2085.   identifier varchar(20) NOT NULL,
  2086.   keyword varchar(50) NOT NULL,
  2087.   title varchar(50) NOT NULL,
  2088.   message text NOT NULL,
  2089.   PRIMARY KEY (id),
  2090.   KEY displayplay (displayorder)
  2091. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2092. DROP TABLE IF EXISTS pre_forum_filter_post;
  2093. CREATE TABLE pre_forum_filter_post (
  2094.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2095.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2096.   postlength int(10) unsigned NOT NULL DEFAULT '0',
  2097.   PRIMARY KEY (tid,pid),
  2098.   KEY tid (tid,postlength)
  2099. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2100. DROP TABLE IF EXISTS pre_forum_forum;
  2101. CREATE TABLE pre_forum_forum (
  2102.   fid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2103.   fup mediumint(8) unsigned NOT NULL DEFAULT '0',
  2104.   `type` enum('group','forum','sub') NOT NULL DEFAULT 'forum',
  2105.   `name` char(50) NOT NULL DEFAULT '',
  2106.   `status` tinyint(1) NOT NULL DEFAULT '0',
  2107.   displayorder smallint(6) NOT NULL DEFAULT '0',
  2108.   styleid smallint(6) unsigned NOT NULL DEFAULT '0',
  2109.   threads mediumint(8) unsigned NOT NULL DEFAULT '0',
  2110.   posts mediumint(8) unsigned NOT NULL DEFAULT '0',
  2111.   todayposts mediumint(8) unsigned NOT NULL DEFAULT '0',
  2112.   yesterdayposts mediumint(8) unsigned NOT NULL DEFAULT '0',
  2113.   `rank` smallint(6) unsigned NOT NULL DEFAULT '0',
  2114.   oldrank smallint(6) unsigned NOT NULL DEFAULT '0',
  2115.   lastpost char(110) NOT NULL DEFAULT '',
  2116.   domain char(15) NOT NULL DEFAULT '',
  2117.   allowsmilies tinyint(1) NOT NULL DEFAULT '0',
  2118.   allowhtml tinyint(1) NOT NULL DEFAULT '0',
  2119.   allowbbcode tinyint(1) NOT NULL DEFAULT '0',
  2120.   allowimgcode tinyint(1) NOT NULL DEFAULT '0',
  2121.   allowmediacode tinyint(1) NOT NULL DEFAULT '0',
  2122.   allowanonymous tinyint(1) NOT NULL DEFAULT '0',
  2123.   allowpostspecial smallint(6) unsigned NOT NULL DEFAULT '0',
  2124.   allowspecialonly tinyint(1) unsigned NOT NULL DEFAULT '0',
  2125.   allowappend tinyint(1) unsigned NOT NULL DEFAULT '0',
  2126.   alloweditrules tinyint(1) NOT NULL DEFAULT '0',
  2127.   allowfeed tinyint(1) NOT NULL DEFAULT '1',
  2128.   allowside tinyint(1) NOT NULL DEFAULT '0',
  2129.   recyclebin tinyint(1) NOT NULL DEFAULT '0',
  2130.   modnewposts tinyint(1) NOT NULL DEFAULT '0',
  2131.   jammer tinyint(1) NOT NULL DEFAULT '0',
  2132.   disablewatermark tinyint(1) NOT NULL DEFAULT '0',
  2133.   inheritedmod tinyint(1) NOT NULL DEFAULT '0',
  2134.   autoclose smallint(6) NOT NULL DEFAULT '0',
  2135.   forumcolumns tinyint(3) unsigned NOT NULL DEFAULT '0',
  2136.   catforumcolumns tinyint(3) unsigned NOT NULL DEFAULT '0',
  2137.   threadcaches tinyint(1) NOT NULL DEFAULT '0',
  2138.   alloweditpost tinyint(1) unsigned NOT NULL DEFAULT '1',
  2139.   `simple` tinyint(1) unsigned NOT NULL DEFAULT '0',
  2140.   modworks tinyint(1) unsigned NOT NULL DEFAULT '0',
  2141.   allowglobalstick tinyint(1) NOT NULL DEFAULT '1',
  2142.   `level` smallint(6) NOT NULL DEFAULT '0',
  2143.   commoncredits int(10) unsigned NOT NULL DEFAULT '0',
  2144.   archive tinyint(1) NOT NULL DEFAULT '0',
  2145.   recommend smallint(6) unsigned NOT NULL DEFAULT '0',
  2146.   favtimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  2147.   sharetimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  2148.   disablethumb tinyint(1) NOT NULL DEFAULT '0',
  2149.   disablecollect tinyint(1) NOT NULL DEFAULT '0',
  2150.   PRIMARY KEY (fid),
  2151.   KEY forum (`status`,`type`,displayorder),
  2152.   KEY fup_type (fup,`type`,displayorder),
  2153.   KEY fup (fup)
  2154. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2155. DROP TABLE IF EXISTS pre_forum_forum_threadtable;
  2156. CREATE TABLE pre_forum_forum_threadtable (
  2157.   fid smallint(6) unsigned NOT NULL,
  2158.   threadtableid smallint(6) unsigned NOT NULL,
  2159.   threads int(11) unsigned NOT NULL DEFAULT '0',
  2160.   posts int(11) unsigned NOT NULL DEFAULT '0',
  2161.   PRIMARY KEY (fid,threadtableid)
  2162. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2163. DROP TABLE IF EXISTS pre_forum_forumfield;
  2164. CREATE TABLE pre_forum_forumfield (
  2165.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2166.   description text NOT NULL,
  2167.   `password` varchar(12) NOT NULL DEFAULT '',
  2168.   icon varchar(255) NOT NULL DEFAULT '',
  2169.   redirect varchar(255) NOT NULL DEFAULT '',
  2170.   attachextensions varchar(255) NOT NULL DEFAULT '',
  2171.   creditspolicy mediumtext NOT NULL,
  2172.   formulaperm text NOT NULL,
  2173.   moderators text NOT NULL,
  2174.   rules text NOT NULL,
  2175.   threadtypes text NOT NULL,
  2176.   threadsorts text NOT NULL,
  2177.   viewperm text NOT NULL,
  2178.   postperm text NOT NULL,
  2179.   replyperm text NOT NULL,
  2180.   getattachperm text NOT NULL,
  2181.   postattachperm text NOT NULL,
  2182.   postimageperm text NOT NULL,
  2183.   spviewperm text NOT NULL,
  2184.   seotitle text NOT NULL,
  2185.   keywords text NOT NULL,
  2186.   seodescription text NOT NULL,
  2187.   supe_pushsetting text NOT NULL,
  2188.   modrecommend text NOT NULL,
  2189.   threadplugin text NOT NULL,
  2190.   replybg text NOT NULL,
  2191.   extra text NOT NULL,
  2192.   jointype tinyint(1) NOT NULL DEFAULT '0',
  2193.   gviewperm tinyint(1) unsigned NOT NULL DEFAULT '0',
  2194.   membernum smallint(6) unsigned NOT NULL DEFAULT '0',
  2195.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2196.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  2197.   activity int(10) unsigned NOT NULL DEFAULT '0',
  2198.   founderuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2199.   foundername varchar(255) NOT NULL DEFAULT '',
  2200.   banner varchar(255) NOT NULL DEFAULT '',
  2201.   groupnum smallint(6) unsigned NOT NULL DEFAULT '0',
  2202.   commentitem text NOT NULL,
  2203.   relatedgroup text NOT NULL,
  2204.   picstyle tinyint(1) NOT NULL DEFAULT '0',
  2205.   widthauto tinyint(1) NOT NULL DEFAULT '0',
  2206.   noantitheft tinyint(1) NOT NULL DEFAULT '0',
  2207.   noforumhidewater tinyint(1) NOT NULL DEFAULT '0',
  2208.   noforumrecommend tinyint(1) NOT NULL DEFAULT '0',
  2209.   livetid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2210.   price mediumint(8) unsigned NOT NULL DEFAULT '0',
  2211.   PRIMARY KEY (fid),
  2212.   KEY membernum (membernum),
  2213.   KEY dateline (dateline),
  2214.   KEY lastupdate (lastupdate),
  2215.   KEY activity (activity)
  2216. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2217. DROP TABLE IF EXISTS pre_forum_forumrecommend;
  2218. CREATE TABLE pre_forum_forumrecommend (
  2219.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2220.   tid mediumint(8) unsigned NOT NULL,
  2221.   typeid smallint(6) NOT NULL,
  2222.   displayorder tinyint(1) NOT NULL,
  2223.   `subject` char(80) NOT NULL,
  2224.   author char(15) NOT NULL,
  2225.   authorid mediumint(8) NOT NULL,
  2226.   moderatorid mediumint(8) NOT NULL,
  2227.   expiration int(10) unsigned NOT NULL,
  2228.   position tinyint(1) NOT NULL DEFAULT '0',
  2229.   highlight tinyint(1) NOT NULL DEFAULT '0',
  2230.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2231.   filename char(100) NOT NULL DEFAULT '',
  2232.   PRIMARY KEY (tid),
  2233.   KEY displayorder (fid,displayorder),
  2234.   KEY position (position)
  2235. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2236. DROP TABLE IF EXISTS pre_forum_groupcreditslog;
  2237. CREATE TABLE pre_forum_groupcreditslog (
  2238.   fid mediumint(8) unsigned NOT NULL,
  2239.   uid mediumint(8) unsigned NOT NULL,
  2240.   logdate int(8) NOT NULL DEFAULT '0',
  2241.   PRIMARY KEY (fid,uid,logdate)
  2242. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2243. DROP TABLE IF EXISTS pre_forum_groupfield;
  2244. CREATE TABLE pre_forum_groupfield (
  2245.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2246.   privacy tinyint(1) unsigned NOT NULL DEFAULT '0',
  2247.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2248.   `type` varchar(255) NOT NULL,
  2249.   `data` text NOT NULL,
  2250.   UNIQUE KEY `types` (fid,`type`),
  2251.   KEY fid (fid),
  2252.   KEY `type` (`type`)
  2253. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2254. DROP TABLE IF EXISTS pre_forum_groupinvite;
  2255. CREATE TABLE pre_forum_groupinvite (
  2256.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2257.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2258.   inviteuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2259.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2260.   UNIQUE KEY ids (fid,inviteuid),
  2261.   KEY dateline (dateline)
  2262. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2263. DROP TABLE IF EXISTS pre_forum_grouplevel;
  2264. CREATE TABLE pre_forum_grouplevel (
  2265.   levelid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  2266.   `type` enum('special','default') NOT NULL DEFAULT 'default',
  2267.   leveltitle varchar(255) NOT NULL DEFAULT '',
  2268.   creditshigher int(10) NOT NULL DEFAULT '0',
  2269.   creditslower int(10) NOT NULL DEFAULT '0',
  2270.   icon varchar(255) NOT NULL DEFAULT '',
  2271.   creditspolicy text NOT NULL,
  2272.   postpolicy text NOT NULL,
  2273.   specialswitch text NOT NULL,
  2274.   PRIMARY KEY (levelid),
  2275.   KEY creditsrange (creditshigher,creditslower)
  2276. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2277. DROP TABLE IF EXISTS pre_forum_groupuser;
  2278. CREATE TABLE pre_forum_groupuser (
  2279.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2280.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2281.   username char(15) NOT NULL,
  2282.   `level` tinyint(3) unsigned NOT NULL DEFAULT '0',
  2283.   threads mediumint(8) unsigned NOT NULL DEFAULT '0',
  2284.   replies mediumint(8) unsigned NOT NULL DEFAULT '0',
  2285.   joindateline int(10) unsigned NOT NULL DEFAULT '0',
  2286.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  2287.   privacy tinyint(1) unsigned NOT NULL DEFAULT '0',
  2288.   PRIMARY KEY (fid,uid),
  2289.   KEY uid_lastupdate (uid,lastupdate),
  2290.   KEY userlist (fid,`level`,lastupdate)
  2291. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2292. DROP TABLE IF EXISTS pre_forum_hotreply_member;
  2293. CREATE TABLE pre_forum_hotreply_member (
  2294.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2295.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2296.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2297.   attitude tinyint(1) unsigned NOT NULL DEFAULT '0',
  2298.   PRIMARY KEY (pid,uid)
  2299. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2300. DROP TABLE IF EXISTS pre_forum_hotreply_number;
  2301. CREATE TABLE pre_forum_hotreply_number (
  2302.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2303.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2304.   support smallint(6) unsigned NOT NULL DEFAULT '0',
  2305.   `against` smallint(6) unsigned NOT NULL DEFAULT '0',
  2306.   total mediumint(8) unsigned NOT NULL DEFAULT '0',
  2307.   PRIMARY KEY (pid),
  2308.   KEY tid (tid,total)
  2309. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2310. DROP TABLE IF EXISTS pre_forum_imagetype;
  2311. CREATE TABLE pre_forum_imagetype (
  2312.   typeid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  2313.   available tinyint(1) NOT NULL DEFAULT '0',
  2314.   `name` char(20) NOT NULL,
  2315.   `type` enum('smiley','icon','avatar') NOT NULL DEFAULT 'smiley',
  2316.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2317.   `directory` char(100) NOT NULL,
  2318.   PRIMARY KEY (typeid)
  2319. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2320. DROP TABLE IF EXISTS pre_forum_medal;
  2321. CREATE TABLE pre_forum_medal (
  2322.   medalid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  2323.   `name` varchar(50) NOT NULL DEFAULT '',
  2324.   available tinyint(1) NOT NULL DEFAULT '0',
  2325.   image varchar(255) NOT NULL DEFAULT '',
  2326.   `type` tinyint(1) NOT NULL DEFAULT '0',
  2327.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2328.   description varchar(255) NOT NULL,
  2329.   expiration smallint(6) unsigned NOT NULL DEFAULT '0',
  2330.   permission mediumtext NOT NULL,
  2331.   credit tinyint(1) unsigned NOT NULL DEFAULT '0',
  2332.   price mediumint(8) unsigned NOT NULL DEFAULT '0',
  2333.   PRIMARY KEY (medalid),
  2334.   KEY displayorder (displayorder),
  2335.   KEY available (available,displayorder)
  2336. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2337. DROP TABLE IF EXISTS pre_forum_medallog;
  2338. CREATE TABLE pre_forum_medallog (
  2339.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2340.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2341.   medalid smallint(6) unsigned NOT NULL DEFAULT '0',
  2342.   `type` tinyint(1) NOT NULL DEFAULT '0',
  2343.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2344.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  2345.   `status` tinyint(1) NOT NULL DEFAULT '0',
  2346.   PRIMARY KEY (id),
  2347.   KEY `type` (`type`),
  2348.   KEY `status` (`status`,expiration),
  2349.   KEY uid (uid,medalid,`type`),
  2350.   KEY dateline (dateline)
  2351. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2352. DROP TABLE IF EXISTS pre_forum_memberrecommend;
  2353. CREATE TABLE pre_forum_memberrecommend (
  2354.   tid mediumint(8) unsigned NOT NULL,
  2355.   recommenduid mediumint(8) unsigned NOT NULL,
  2356.   dateline int(10) unsigned NOT NULL,
  2357.   KEY tid (tid),
  2358.   KEY uid (recommenduid)
  2359. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2360. DROP TABLE IF EXISTS pre_forum_moderator;
  2361. CREATE TABLE pre_forum_moderator (
  2362.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2363.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2364.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2365.   inherited tinyint(1) NOT NULL DEFAULT '0',
  2366.   PRIMARY KEY (uid,fid)
  2367. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2368. DROP TABLE IF EXISTS pre_forum_modwork;
  2369. CREATE TABLE pre_forum_modwork (
  2370.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2371.   modaction char(3) NOT NULL DEFAULT '',
  2372.   dateline date NOT NULL DEFAULT '2006-01-01',
  2373.   count smallint(6) unsigned NOT NULL DEFAULT '0',
  2374.   posts smallint(6) unsigned NOT NULL DEFAULT '0',
  2375.   KEY uid (uid,dateline)
  2376. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2377. DROP TABLE IF EXISTS pre_forum_newthread;
  2378. CREATE TABLE pre_forum_newthread (
  2379.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2380.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2381.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2382.   PRIMARY KEY (tid),
  2383.   KEY fid (fid),
  2384.   KEY dateline (dateline)
  2385. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2386. DROP TABLE IF EXISTS pre_forum_onlinelist;
  2387. CREATE TABLE pre_forum_onlinelist (
  2388.   groupid smallint(6) unsigned NOT NULL DEFAULT '0',
  2389.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2390.   title varchar(30) NOT NULL DEFAULT '',
  2391.   url varchar(30) NOT NULL DEFAULT ''
  2392. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2393. DROP TABLE IF EXISTS pre_forum_order;
  2394. CREATE TABLE pre_forum_order (
  2395.   orderid char(32) NOT NULL DEFAULT '',
  2396.   `status` char(3) NOT NULL DEFAULT '',
  2397.   buyer char(50) NOT NULL DEFAULT '',
  2398.   admin char(15) NOT NULL DEFAULT '',
  2399.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2400.   amount int(10) unsigned NOT NULL DEFAULT '0',
  2401.   price float(7,2) unsigned NOT NULL DEFAULT '0.00',
  2402.   submitdate int(10) unsigned NOT NULL DEFAULT '0',
  2403.   confirmdate int(10) unsigned NOT NULL DEFAULT '0',
  2404.   email char(40) NOT NULL DEFAULT '',
  2405.   ip char(15) NOT NULL DEFAULT '',
  2406.   UNIQUE KEY orderid (orderid),
  2407.   KEY submitdate (submitdate),
  2408.   KEY uid (uid,submitdate)
  2409. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2410. DROP TABLE IF EXISTS pre_forum_poll;
  2411. CREATE TABLE pre_forum_poll (
  2412.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2413.   overt tinyint(1) NOT NULL DEFAULT '0',
  2414.   multiple tinyint(1) NOT NULL DEFAULT '0',
  2415.   visible tinyint(1) NOT NULL DEFAULT '0',
  2416.   maxchoices tinyint(3) unsigned NOT NULL DEFAULT '0',
  2417.   isimage tinyint(1) NOT NULL DEFAULT '0',
  2418.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  2419.   pollpreview varchar(255) NOT NULL DEFAULT '',
  2420.   voters mediumint(8) unsigned NOT NULL DEFAULT '0',
  2421.   PRIMARY KEY (tid)
  2422. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2423. DROP TABLE IF EXISTS pre_forum_polloption;
  2424. CREATE TABLE pre_forum_polloption (
  2425.   polloptionid int(10) unsigned NOT NULL AUTO_INCREMENT,
  2426.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2427.   votes mediumint(8) unsigned NOT NULL DEFAULT '0',
  2428.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2429.   polloption varchar(80) NOT NULL DEFAULT '',
  2430.   voterids mediumtext NOT NULL,
  2431.   PRIMARY KEY (polloptionid),
  2432.   KEY tid (tid,displayorder)
  2433. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2434. DROP TABLE IF EXISTS pre_forum_polloption_image;
  2435. CREATE TABLE pre_forum_polloption_image (
  2436.   aid int(10) unsigned NOT NULL AUTO_INCREMENT,
  2437.   poid int(10) unsigned NOT NULL DEFAULT '0',
  2438.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2439.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2440.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2441.   filename varchar(255) NOT NULL DEFAULT '',
  2442.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  2443.   attachment varchar(255) NOT NULL DEFAULT '',
  2444.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  2445.   width smallint(6) unsigned NOT NULL DEFAULT '0',
  2446.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  2447.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2448.   PRIMARY KEY (aid),
  2449.   KEY poid (poid),
  2450.   KEY tid (tid),
  2451.   KEY uid (uid)
  2452. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2453. DROP TABLE IF EXISTS pre_forum_pollvoter;
  2454. CREATE TABLE pre_forum_pollvoter (
  2455.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2456.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2457.   username varchar(15) NOT NULL DEFAULT '',
  2458.   `options` text NOT NULL,
  2459.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2460.   KEY tid (tid),
  2461.   KEY uid (uid,dateline)
  2462. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2463. DROP TABLE IF EXISTS pre_forum_post;
  2464. CREATE TABLE pre_forum_post (
  2465.   pid int(10) unsigned NOT NULL,
  2466.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2467.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2468.   `first` tinyint(1) NOT NULL DEFAULT '0',
  2469.   author varchar(15) NOT NULL DEFAULT '',
  2470.   authorid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2471.   `subject` varchar(80) NOT NULL DEFAULT '',
  2472.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2473.   message mediumtext NOT NULL,
  2474.   useip varchar(15) NOT NULL DEFAULT '',
  2475.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  2476.   invisible tinyint(1) NOT NULL DEFAULT '0',
  2477.   anonymous tinyint(1) NOT NULL DEFAULT '0',
  2478.   usesig tinyint(1) NOT NULL DEFAULT '0',
  2479.   htmlon tinyint(1) NOT NULL DEFAULT '0',
  2480.   bbcodeoff tinyint(1) NOT NULL DEFAULT '0',
  2481.   smileyoff tinyint(1) NOT NULL DEFAULT '0',
  2482.   parseurloff tinyint(1) NOT NULL DEFAULT '0',
  2483.   attachment tinyint(1) NOT NULL DEFAULT '0',
  2484.   rate smallint(6) NOT NULL DEFAULT '0',
  2485.   ratetimes tinyint(3) unsigned NOT NULL DEFAULT '0',
  2486.   `status` int(10) NOT NULL DEFAULT '0',
  2487.   tags varchar(255) NOT NULL DEFAULT '0',
  2488.   `comment` tinyint(1) NOT NULL DEFAULT '0',
  2489.   replycredit int(10) NOT NULL DEFAULT '0',
  2490.   position int(8) unsigned NOT NULL AUTO_INCREMENT,
  2491.   PRIMARY KEY (position),
  2492.   KEY tid(tid),
  2493.   UNIQUE KEY pid (pid),
  2494.   KEY fid (fid),
  2495.   KEY authorid (authorid,invisible),
  2496.   KEY dateline (dateline),
  2497.   KEY invisible (invisible),
  2498.   KEY displayorder (tid,invisible,dateline),
  2499.   KEY `first` (tid,`first`)
  2500. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2501. DROP TABLE IF EXISTS pre_forum_post_location;
  2502. CREATE TABLE pre_forum_post_location (
  2503.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2504.   tid mediumint(8) unsigned DEFAULT '0',
  2505.   uid mediumint(8) unsigned DEFAULT '0',
  2506.   mapx varchar(255) NOT NULL,
  2507.   mapy varchar(255) NOT NULL,
  2508.   location varchar(255) NOT NULL,
  2509.   PRIMARY KEY (pid),
  2510.   KEY tid (tid),
  2511.   KEY uid (uid)
  2512. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2513. DROP TABLE IF EXISTS pre_forum_post_moderate;
  2514. CREATE TABLE pre_forum_post_moderate (
  2515.   id int(10) unsigned NOT NULL DEFAULT '0',
  2516.   `status` tinyint(3) NOT NULL DEFAULT '0',
  2517.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2518.   PRIMARY KEY (id),
  2519.   KEY `status` (`status`,dateline)
  2520. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2521. DROP TABLE IF EXISTS pre_forum_post_tableid;
  2522. CREATE TABLE pre_forum_post_tableid (
  2523.   pid int(10) unsigned NOT NULL AUTO_INCREMENT,
  2524.   PRIMARY KEY (pid)
  2525. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2526. DROP TABLE IF EXISTS pre_forum_postcache;
  2527. CREATE TABLE pre_forum_postcache (
  2528.   pid int(10) unsigned NOT NULL,
  2529.   `comment` text NOT NULL,
  2530.   rate text NOT NULL,
  2531.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2532.   PRIMARY KEY (pid),
  2533.   KEY dateline (dateline)
  2534. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2535. DROP TABLE IF EXISTS pre_forum_postcomment;
  2536. CREATE TABLE pre_forum_postcomment (
  2537.   id int(10) unsigned NOT NULL AUTO_INCREMENT,
  2538.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2539.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2540.   author varchar(15) NOT NULL DEFAULT '',
  2541.   authorid mediumint(8) NOT NULL DEFAULT '0',
  2542.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2543.   `comment` varchar(255) NOT NULL DEFAULT '',
  2544.   score tinyint(1) NOT NULL DEFAULT '0',
  2545.   useip varchar(15) NOT NULL DEFAULT '',
  2546.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  2547.   rpid int(10) unsigned NOT NULL DEFAULT '0',
  2548.   PRIMARY KEY (id),
  2549.   KEY tid (tid),
  2550.   KEY authorid (authorid),
  2551.   KEY score (score),
  2552.   KEY rpid (rpid),
  2553.   KEY pid (pid,dateline)
  2554. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2555. DROP TABLE IF EXISTS pre_forum_postlog;
  2556. CREATE TABLE pre_forum_postlog (
  2557.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2558.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2559.   fid smallint(6) unsigned NOT NULL DEFAULT '0',
  2560.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2561.   `action` char(10) NOT NULL DEFAULT '',
  2562.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2563.   PRIMARY KEY (pid,tid),
  2564.   KEY fid (fid),
  2565.   KEY uid (uid),
  2566.   KEY dateline (dateline)
  2567. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2568. DROP TABLE IF EXISTS pre_forum_poststick;
  2569. CREATE TABLE pre_forum_poststick (
  2570.   tid mediumint(8) unsigned NOT NULL,
  2571.   pid int(10) unsigned NOT NULL,
  2572.   position int(10) unsigned NOT NULL,
  2573.   dateline int(10) unsigned NOT NULL,
  2574.   PRIMARY KEY (tid,pid),
  2575.   KEY dateline (tid,dateline)
  2576. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2577. DROP TABLE IF EXISTS pre_forum_promotion;
  2578. CREATE TABLE pre_forum_promotion (
  2579.   ip char(15) NOT NULL DEFAULT '',
  2580.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2581.   username char(15) NOT NULL DEFAULT '',
  2582.   PRIMARY KEY (ip)
  2583. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2584. DROP TABLE IF EXISTS pre_forum_ratelog;
  2585. CREATE TABLE pre_forum_ratelog (
  2586.   pid int(10) unsigned NOT NULL DEFAULT '0',
  2587.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2588.   username char(15) NOT NULL DEFAULT '',
  2589.   extcredits tinyint(1) unsigned NOT NULL DEFAULT '0',
  2590.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2591.   score smallint(6) NOT NULL DEFAULT '0',
  2592.   reason char(40) NOT NULL DEFAULT '',
  2593.   KEY pid (pid,dateline),
  2594.   KEY dateline (dateline),
  2595.   KEY uid (uid)
  2596. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2597. DROP TABLE IF EXISTS pre_forum_relatedthread;
  2598. CREATE TABLE pre_forum_relatedthread (
  2599.   tid mediumint(8) NOT NULL DEFAULT '0',
  2600.   `type` enum('general','trade') NOT NULL DEFAULT 'general',
  2601.   expiration int(10) NOT NULL DEFAULT '0',
  2602.   keywords varchar(255) NOT NULL DEFAULT '',
  2603.   relatedthreads text NOT NULL,
  2604.   PRIMARY KEY (tid,`type`)
  2605. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2606. DROP TABLE IF EXISTS pre_forum_replycredit;
  2607. CREATE TABLE pre_forum_replycredit (
  2608.   tid mediumint(6) unsigned NOT NULL,
  2609.   extcredits mediumint(6) unsigned NOT NULL DEFAULT '0',
  2610.   extcreditstype tinyint(1) NOT NULL DEFAULT '0',
  2611.   times smallint(6) unsigned NOT NULL DEFAULT '0',
  2612.   membertimes smallint(6) unsigned NOT NULL DEFAULT '0',
  2613.   random tinyint(1) NOT NULL DEFAULT '0',
  2614.   PRIMARY KEY (tid)
  2615. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2616. DROP TABLE IF EXISTS pre_forum_rsscache;
  2617. CREATE TABLE pre_forum_rsscache (
  2618.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  2619.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2620.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2621.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2622.   forum char(50) NOT NULL DEFAULT '',
  2623.   author char(15) NOT NULL DEFAULT '',
  2624.   `subject` char(80) NOT NULL DEFAULT '',
  2625.   description char(255) NOT NULL DEFAULT '',
  2626.   guidetype char(10) NOT NULL DEFAULT '',
  2627.   UNIQUE KEY tid (tid),
  2628.   KEY fid (fid,dateline)
  2629. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2630. DROP TABLE IF EXISTS pre_forum_sofa;
  2631. CREATE TABLE pre_forum_sofa (
  2632.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2633.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2634.   PRIMARY KEY (tid),
  2635.   KEY ftid (fid,tid)
  2636. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2637. DROP TABLE IF EXISTS pre_forum_spacecache;
  2638. CREATE TABLE pre_forum_spacecache (
  2639.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2640.   variable varchar(20) NOT NULL,
  2641.   `value` text NOT NULL,
  2642.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  2643.   PRIMARY KEY (uid,variable)
  2644. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2645. DROP TABLE IF EXISTS pre_forum_statlog;
  2646. CREATE TABLE pre_forum_statlog (
  2647.   logdate date NOT NULL,
  2648.   fid mediumint(8) unsigned NOT NULL,
  2649.   `type` smallint(5) unsigned NOT NULL DEFAULT '0',
  2650.   `value` int(10) unsigned NOT NULL DEFAULT '0',
  2651.   PRIMARY KEY (logdate,fid)
  2652. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2653. DROP TABLE IF EXISTS pre_forum_thread;
  2654. CREATE TABLE pre_forum_thread (
  2655.   tid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2656.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2657.   posttableid smallint(6) unsigned NOT NULL DEFAULT '0',
  2658.   typeid smallint(6) unsigned NOT NULL DEFAULT '0',
  2659.   sortid smallint(6) unsigned NOT NULL DEFAULT '0',
  2660.   readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
  2661.   price smallint(6) NOT NULL DEFAULT '0',
  2662.   author char(15) NOT NULL DEFAULT '',
  2663.   authorid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2664.   `subject` char(80) NOT NULL DEFAULT '',
  2665.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2666.   lastpost int(10) unsigned NOT NULL DEFAULT '0',
  2667.   lastposter char(15) NOT NULL DEFAULT '',
  2668.   views int(10) unsigned NOT NULL DEFAULT '0',
  2669.   replies mediumint(8) unsigned NOT NULL DEFAULT '0',
  2670.   displayorder tinyint(1) NOT NULL DEFAULT '0',
  2671.   highlight tinyint(1) NOT NULL DEFAULT '0',
  2672.   digest tinyint(1) NOT NULL DEFAULT '0',
  2673.   rate tinyint(1) NOT NULL DEFAULT '0',
  2674.   special tinyint(1) NOT NULL DEFAULT '0',
  2675.   attachment tinyint(1) NOT NULL DEFAULT '0',
  2676.   moderated tinyint(1) NOT NULL DEFAULT '0',
  2677.   closed mediumint(8) unsigned NOT NULL DEFAULT '0',
  2678.   stickreply tinyint(1) unsigned NOT NULL DEFAULT '0',
  2679.   recommends smallint(6) NOT NULL DEFAULT '0',
  2680.   recommend_add smallint(6) NOT NULL DEFAULT '0',
  2681.   recommend_sub smallint(6) NOT NULL DEFAULT '0',
  2682.   heats int(10) unsigned NOT NULL DEFAULT '0',
  2683.   `status` smallint(6) unsigned NOT NULL DEFAULT '0',
  2684.   isgroup tinyint(1) NOT NULL DEFAULT '0',
  2685.   favtimes mediumint(8) NOT NULL DEFAULT '0',
  2686.   sharetimes mediumint(8) NOT NULL DEFAULT '0',
  2687.   stamp tinyint(3) NOT NULL DEFAULT '-1',
  2688.   icon tinyint(3) NOT NULL DEFAULT '-1',
  2689.   pushedaid mediumint(8) NOT NULL DEFAULT '0',
  2690.   cover smallint(6) NOT NULL DEFAULT '0',
  2691.   replycredit smallint(6) NOT NULL DEFAULT '0',
  2692.   relatebytag char(255) NOT NULL DEFAULT '0',
  2693.   maxposition int(8) unsigned NOT NULL DEFAULT '0',
  2694.   bgcolor char(8) NOT NULL DEFAULT '',
  2695.   comments int(10) unsigned NOT NULL DEFAULT '0',
  2696.   hidden smallint(6) unsigned NOT NULL DEFAULT '0',
  2697.   PRIMARY KEY (tid),
  2698.   KEY digest (digest),
  2699.   KEY sortid (sortid),
  2700.   KEY displayorder (fid,displayorder,lastpost),
  2701.   KEY typeid (fid,typeid,displayorder,lastpost),
  2702.   KEY recommends (recommends),
  2703.   KEY heats (heats),
  2704.   KEY authorid (authorid),
  2705.   KEY isgroup (isgroup,lastpost),
  2706.   KEY special (special)
  2707. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2708. DROP TABLE IF EXISTS pre_forum_thread_moderate;
  2709. CREATE TABLE pre_forum_thread_moderate (
  2710.   id int(10) unsigned NOT NULL DEFAULT '0',
  2711.   `status` tinyint(3) NOT NULL DEFAULT '0',
  2712.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2713.   PRIMARY KEY (id),
  2714.   KEY `status` (`status`,dateline)
  2715. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2716. DROP TABLE IF EXISTS pre_forum_threadaddviews;
  2717. CREATE TABLE pre_forum_threadaddviews (
  2718.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2719.   addviews int(10) unsigned NOT NULL DEFAULT '0',
  2720.   PRIMARY KEY (tid)
  2721. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2722. DROP TABLE IF EXISTS pre_forum_threadcalendar;
  2723. CREATE TABLE pre_forum_threadcalendar (
  2724.   cid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2725.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2726.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2727.   hotnum int(10) unsigned NOT NULL DEFAULT '0',
  2728.   PRIMARY KEY (cid),
  2729.   KEY fid (fid,dateline)
  2730. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2731. DROP TABLE IF EXISTS pre_forum_threadclass;
  2732. CREATE TABLE pre_forum_threadclass (
  2733.   typeid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2734.   fid mediumint(8) unsigned NOT NULL,
  2735.   `name` varchar(255) NOT NULL,
  2736.   displayorder mediumint(9) NOT NULL,
  2737.   icon varchar(255) NOT NULL,
  2738.   moderators tinyint(1) NOT NULL DEFAULT '0',
  2739.   PRIMARY KEY (typeid),
  2740.   KEY fid (fid,displayorder)
  2741. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2742. DROP TABLE IF EXISTS pre_forum_threadclosed;
  2743. CREATE TABLE pre_forum_threadclosed (
  2744.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2745.   redirect mediumint(8) unsigned NOT NULL DEFAULT '0',
  2746.   PRIMARY KEY (tid)
  2747. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2748. DROP TABLE IF EXISTS pre_forum_threaddisablepos;
  2749. CREATE TABLE pre_forum_threaddisablepos (
  2750.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2751.   PRIMARY KEY (tid)
  2752. ) ENGINE=HEAP;

  2753. DROP TABLE IF EXISTS pre_forum_threadhidelog;
  2754. CREATE TABLE pre_forum_threadhidelog (
  2755.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2756.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2757.   UNIQUE KEY uid (tid,uid)
  2758. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2759. DROP TABLE IF EXISTS pre_forum_threadhot;
  2760. CREATE TABLE pre_forum_threadhot (
  2761.   cid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2762.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2763.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2764.   PRIMARY KEY (cid,tid),
  2765.   KEY fid (fid)
  2766. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2767. DROP TABLE IF EXISTS pre_forum_threadimage;
  2768. CREATE TABLE pre_forum_threadimage (
  2769.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2770.   attachment varchar(255) NOT NULL DEFAULT '',
  2771.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  2772.   KEY tid (tid)
  2773. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2774. DROP TABLE IF EXISTS pre_forum_threadlog;
  2775. CREATE TABLE pre_forum_threadlog (
  2776.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2777.   fid smallint(6) unsigned NOT NULL DEFAULT '0',
  2778.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2779.   otherid smallint(6) unsigned NOT NULL DEFAULT '0',
  2780.   `action` char(10) NOT NULL,
  2781.   expiry int(10) unsigned NOT NULL DEFAULT '0',
  2782.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2783.   PRIMARY KEY (tid,fid,uid),
  2784.   KEY dateline (dateline)
  2785. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2786. DROP TABLE IF EXISTS pre_forum_threadmod;
  2787. CREATE TABLE pre_forum_threadmod (
  2788.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2789.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2790.   username char(15) NOT NULL DEFAULT '',
  2791.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2792.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  2793.   `action` char(5) NOT NULL DEFAULT '',
  2794.   `status` tinyint(1) NOT NULL DEFAULT '0',
  2795.   magicid smallint(6) unsigned NOT NULL,
  2796.   stamp tinyint(3) NOT NULL,
  2797.   reason char(40) NOT NULL DEFAULT '',
  2798.   KEY tid (tid,dateline),
  2799.   KEY expiration (expiration,`status`)
  2800. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2801. DROP TABLE IF EXISTS pre_forum_threadpartake;
  2802. CREATE TABLE pre_forum_threadpartake (
  2803.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2804.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2805.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2806.   KEY tid (tid,uid)
  2807. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2808. DROP TABLE IF EXISTS pre_forum_threadpreview;
  2809. CREATE TABLE pre_forum_threadpreview (
  2810.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2811.   `relay` int(10) unsigned NOT NULL DEFAULT '0',
  2812.   content text NOT NULL,
  2813.   PRIMARY KEY (tid)
  2814. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2815. DROP TABLE IF EXISTS pre_forum_threadprofile;
  2816. CREATE TABLE pre_forum_threadprofile (
  2817.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  2818.   `name` char(100) NOT NULL DEFAULT '',
  2819.   template text NOT NULL,
  2820.   `global` tinyint(1) NOT NULL DEFAULT '0',
  2821.   PRIMARY KEY (id),
  2822.   KEY `global` (`global`)
  2823. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2824. DROP TABLE IF EXISTS pre_forum_threadprofile_group;
  2825. CREATE TABLE pre_forum_threadprofile_group (
  2826.   gid mediumint(8) NOT NULL,
  2827.   tpid mediumint(8) unsigned NOT NULL,
  2828.   PRIMARY KEY (gid)
  2829. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2830. DROP TABLE IF EXISTS pre_forum_threadrush;
  2831. CREATE TABLE pre_forum_threadrush (
  2832.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2833.   stopfloor mediumint(8) unsigned NOT NULL DEFAULT '0',
  2834.   starttimefrom int(10) unsigned NOT NULL DEFAULT '0',
  2835.   starttimeto int(10) unsigned NOT NULL DEFAULT '0',
  2836.   rewardfloor text NOT NULL,
  2837.   creditlimit int(10) NOT NULL DEFAULT '-996',
  2838.   replylimit smallint(6) NOT NULL DEFAULT '0',
  2839.   PRIMARY KEY (tid)
  2840. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2841. DROP TABLE IF EXISTS pre_forum_threadtype;
  2842. CREATE TABLE pre_forum_threadtype (
  2843.   typeid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  2844.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2845.   displayorder smallint(6) NOT NULL DEFAULT '0',
  2846.   `name` varchar(255) NOT NULL DEFAULT '',
  2847.   description varchar(255) NOT NULL DEFAULT '',
  2848.   icon varchar(255) NOT NULL DEFAULT '',
  2849.   special smallint(6) NOT NULL DEFAULT '0',
  2850.   modelid smallint(6) unsigned NOT NULL DEFAULT '0',
  2851.   expiration tinyint(1) NOT NULL DEFAULT '0',
  2852.   template text NOT NULL,
  2853.   stemplate text NOT NULL,
  2854.   ptemplate text NOT NULL,
  2855.   btemplate text NOT NULL,
  2856.   PRIMARY KEY (typeid)
  2857. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2858. DROP TABLE IF EXISTS pre_forum_trade;
  2859. CREATE TABLE pre_forum_trade (
  2860.   tid mediumint(8) unsigned NOT NULL,
  2861.   pid int(10) unsigned NOT NULL,
  2862.   typeid smallint(6) unsigned NOT NULL,
  2863.   sellerid mediumint(8) unsigned NOT NULL,
  2864.   seller char(15) NOT NULL,
  2865.   account char(50) NOT NULL,
  2866.   tenpayaccount char(20) NOT NULL DEFAULT '',
  2867.   `subject` char(100) NOT NULL,
  2868.   price decimal(8,2) NOT NULL,
  2869.   amount smallint(6) unsigned NOT NULL DEFAULT '1',
  2870.   quality tinyint(1) unsigned NOT NULL DEFAULT '0',
  2871.   locus char(20) NOT NULL,
  2872.   transport tinyint(1) NOT NULL DEFAULT '0',
  2873.   ordinaryfee smallint(4) unsigned NOT NULL DEFAULT '0',
  2874.   expressfee smallint(4) unsigned NOT NULL DEFAULT '0',
  2875.   emsfee smallint(4) unsigned NOT NULL DEFAULT '0',
  2876.   itemtype tinyint(1) NOT NULL DEFAULT '0',
  2877.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  2878.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  2879.   lastbuyer char(15) NOT NULL,
  2880.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  2881.   totalitems smallint(5) unsigned NOT NULL DEFAULT '0',
  2882.   tradesum decimal(8,2) NOT NULL DEFAULT '0.00',
  2883.   closed tinyint(1) NOT NULL DEFAULT '0',
  2884.   aid mediumint(8) unsigned NOT NULL,
  2885.   displayorder tinyint(1) NOT NULL,
  2886.   costprice decimal(8,2) NOT NULL,
  2887.   credit int(10) unsigned NOT NULL DEFAULT '0',
  2888.   costcredit int(10) unsigned NOT NULL DEFAULT '0',
  2889.   credittradesum int(10) unsigned NOT NULL DEFAULT '0',
  2890.   PRIMARY KEY (tid,pid),
  2891.   KEY pid (pid),
  2892.   KEY sellerid (sellerid),
  2893.   KEY totalitems (totalitems),
  2894.   KEY tradesum (tradesum),
  2895.   KEY displayorder (tid,displayorder),
  2896.   KEY sellertrades (sellerid,tradesum,totalitems),
  2897.   KEY typeid (typeid),
  2898.   KEY credittradesum (credittradesum),
  2899.   KEY expiration (expiration)
  2900. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2901. DROP TABLE IF EXISTS pre_forum_tradecomment;
  2902. CREATE TABLE pre_forum_tradecomment (
  2903.   id mediumint(8) NOT NULL AUTO_INCREMENT,
  2904.   orderid char(32) NOT NULL,
  2905.   pid int(10) unsigned NOT NULL,
  2906.   `type` tinyint(1) NOT NULL,
  2907.   raterid mediumint(8) unsigned NOT NULL,
  2908.   rater char(15) NOT NULL,
  2909.   rateeid mediumint(8) unsigned NOT NULL,
  2910.   ratee char(15) NOT NULL,
  2911.   message char(200) NOT NULL,
  2912.   explanation char(200) NOT NULL,
  2913.   score tinyint(1) NOT NULL,
  2914.   dateline int(10) unsigned NOT NULL,
  2915.   PRIMARY KEY (id),
  2916.   KEY raterid (raterid,`type`,dateline),
  2917.   KEY rateeid (rateeid,`type`,dateline),
  2918.   KEY orderid (orderid)
  2919. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2920. DROP TABLE IF EXISTS pre_forum_tradelog;
  2921. CREATE TABLE pre_forum_tradelog (
  2922.   tid mediumint(8) unsigned NOT NULL,
  2923.   pid int(10) unsigned NOT NULL,
  2924.   orderid varchar(32) NOT NULL,
  2925.   tradeno varchar(32) NOT NULL,
  2926.   paytype tinyint(1) unsigned NOT NULL DEFAULT '0',
  2927.   `subject` varchar(100) NOT NULL,
  2928.   price decimal(8,2) NOT NULL DEFAULT '0.00',
  2929.   quality tinyint(1) unsigned NOT NULL DEFAULT '0',
  2930.   itemtype tinyint(1) NOT NULL DEFAULT '0',
  2931.   number smallint(5) unsigned NOT NULL DEFAULT '0',
  2932.   tax decimal(6,2) unsigned NOT NULL DEFAULT '0.00',
  2933.   locus varchar(100) NOT NULL,
  2934.   sellerid mediumint(8) unsigned NOT NULL,
  2935.   seller varchar(15) NOT NULL,
  2936.   selleraccount varchar(50) NOT NULL,
  2937.   tenpayaccount varchar(20) NOT NULL DEFAULT '0',
  2938.   buyerid mediumint(8) unsigned NOT NULL,
  2939.   buyer varchar(15) NOT NULL,
  2940.   buyercontact varchar(50) NOT NULL,
  2941.   buyercredits smallint(5) unsigned NOT NULL DEFAULT '0',
  2942.   buyermsg varchar(200) DEFAULT NULL,
  2943.   `status` tinyint(1) NOT NULL DEFAULT '0',
  2944.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  2945.   offline tinyint(1) NOT NULL DEFAULT '0',
  2946.   buyername varchar(50) NOT NULL,
  2947.   buyerzip varchar(10) NOT NULL,
  2948.   buyerphone varchar(20) NOT NULL,
  2949.   buyermobile varchar(20) NOT NULL,
  2950.   transport tinyint(1) NOT NULL DEFAULT '0',
  2951.   transportfee smallint(6) unsigned NOT NULL DEFAULT '0',
  2952.   baseprice decimal(8,2) NOT NULL,
  2953.   discount tinyint(1) NOT NULL DEFAULT '0',
  2954.   ratestatus tinyint(1) NOT NULL DEFAULT '0',
  2955.   message text NOT NULL,
  2956.   credit int(10) unsigned NOT NULL DEFAULT '0',
  2957.   basecredit int(10) unsigned NOT NULL DEFAULT '0',
  2958.   UNIQUE KEY orderid (orderid),
  2959.   KEY sellerid (sellerid),
  2960.   KEY buyerid (buyerid),
  2961.   KEY `status` (`status`),
  2962.   KEY buyerlog (buyerid,`status`,lastupdate),
  2963.   KEY sellerlog (sellerid,`status`,lastupdate),
  2964.   KEY tid (tid,pid),
  2965.   KEY pid (pid)
  2966. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2967. DROP TABLE IF EXISTS pre_forum_typeoption;
  2968. CREATE TABLE pre_forum_typeoption (
  2969.   optionid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  2970.   classid smallint(6) unsigned NOT NULL DEFAULT '0',
  2971.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  2972.   expiration tinyint(1) NOT NULL,
  2973.   protect varchar(255) NOT NULL,
  2974.   title varchar(255) NOT NULL DEFAULT '',
  2975.   description varchar(255) NOT NULL DEFAULT '',
  2976.   identifier varchar(255) NOT NULL DEFAULT '',
  2977.   `type` varchar(255) NOT NULL DEFAULT '',
  2978.   unit varchar(255) NOT NULL,
  2979.   rules mediumtext NOT NULL,
  2980.   permprompt mediumtext NOT NULL,
  2981.   PRIMARY KEY (optionid),
  2982.   KEY classid (classid)
  2983. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2984. DROP TABLE IF EXISTS pre_forum_typeoptionvar;
  2985. CREATE TABLE pre_forum_typeoptionvar (
  2986.   sortid smallint(6) unsigned NOT NULL DEFAULT '0',
  2987.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2988.   fid mediumint(8) unsigned NOT NULL DEFAULT '0',
  2989.   optionid smallint(6) unsigned NOT NULL DEFAULT '0',
  2990.   expiration int(10) unsigned NOT NULL DEFAULT '0',
  2991.   `value` mediumtext NOT NULL,
  2992.   KEY sortid (sortid),
  2993.   KEY tid (tid),
  2994.   KEY fid (fid)
  2995. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  2996. DROP TABLE IF EXISTS pre_forum_typevar;
  2997. CREATE TABLE pre_forum_typevar (
  2998.   sortid smallint(6) NOT NULL DEFAULT '0',
  2999.   optionid smallint(6) NOT NULL DEFAULT '0',
  3000.   available tinyint(1) NOT NULL DEFAULT '0',
  3001.   required tinyint(1) NOT NULL DEFAULT '0',
  3002.   unchangeable tinyint(1) NOT NULL DEFAULT '0',
  3003.   search tinyint(1) NOT NULL DEFAULT '0',
  3004.   displayorder tinyint(3) NOT NULL DEFAULT '0',
  3005.   subjectshow tinyint(1) NOT NULL DEFAULT '0',
  3006.   UNIQUE KEY optionid (sortid,optionid),
  3007.   KEY sortid (sortid)
  3008. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3009. DROP TABLE IF EXISTS pre_forum_warning;
  3010. CREATE TABLE pre_forum_warning (
  3011.   wid int(10) unsigned NOT NULL AUTO_INCREMENT,
  3012.   pid int(10) unsigned NOT NULL,
  3013.   operatorid mediumint(8) unsigned NOT NULL,
  3014.   operator char(15) NOT NULL,
  3015.   authorid mediumint(8) unsigned NOT NULL,
  3016.   author char(15) NOT NULL,
  3017.   dateline int(10) unsigned NOT NULL,
  3018.   reason char(40) NOT NULL,
  3019.   PRIMARY KEY (wid),
  3020.   UNIQUE KEY pid (pid),
  3021.   KEY authorid (authorid)
  3022. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3023. DROP TABLE IF EXISTS pre_home_album;
  3024. CREATE TABLE pre_home_album (
  3025.   albumid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3026.   albumname varchar(50) NOT NULL DEFAULT '',
  3027.   catid smallint(6) unsigned NOT NULL DEFAULT '0',
  3028.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3029.   username varchar(15) NOT NULL DEFAULT '',
  3030.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3031.   updatetime int(10) unsigned NOT NULL DEFAULT '0',
  3032.   picnum smallint(6) unsigned NOT NULL DEFAULT '0',
  3033.   pic varchar(255) NOT NULL DEFAULT '',
  3034.   picflag tinyint(1) NOT NULL DEFAULT '0',
  3035.   friend tinyint(1) NOT NULL DEFAULT '0',
  3036.   `password` varchar(10) NOT NULL DEFAULT '',
  3037.   target_ids text NOT NULL,
  3038.   favtimes mediumint(8) unsigned NOT NULL,
  3039.   sharetimes mediumint(8) unsigned NOT NULL,
  3040.   depict text NOT NULL,
  3041.   PRIMARY KEY (albumid),
  3042.   KEY uid (uid,updatetime),
  3043.   KEY updatetime (updatetime)
  3044. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3045. DROP TABLE IF EXISTS pre_home_album_category;
  3046. CREATE TABLE pre_home_album_category (
  3047.   catid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3048.   upid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3049.   catname varchar(255) NOT NULL DEFAULT '',
  3050.   num mediumint(8) unsigned NOT NULL DEFAULT '0',
  3051.   displayorder smallint(6) NOT NULL DEFAULT '0',
  3052.   PRIMARY KEY (catid)
  3053. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3054. DROP TABLE IF EXISTS pre_home_appcreditlog;
  3055. CREATE TABLE pre_home_appcreditlog (
  3056.   logid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3057.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3058.   appid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3059.   appname varchar(60) NOT NULL DEFAULT '',
  3060.   `type` tinyint(1) NOT NULL DEFAULT '0',
  3061.   credit mediumint(8) unsigned NOT NULL DEFAULT '0',
  3062.   note text NOT NULL,
  3063.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3064.   PRIMARY KEY (logid),
  3065.   KEY uid (uid,dateline),
  3066.   KEY appid (appid)
  3067. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3068. DROP TABLE IF EXISTS pre_home_blacklist;
  3069. CREATE TABLE pre_home_blacklist (
  3070.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3071.   buid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3072.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3073.   PRIMARY KEY (uid,buid),
  3074.   KEY uid (uid,dateline)
  3075. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3076. DROP TABLE IF EXISTS pre_home_blog;
  3077. CREATE TABLE pre_home_blog (
  3078.   blogid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3079.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3080.   username char(15) NOT NULL DEFAULT '',
  3081.   `subject` char(80) NOT NULL DEFAULT '',
  3082.   classid smallint(6) unsigned NOT NULL DEFAULT '0',
  3083.   catid smallint(6) unsigned NOT NULL DEFAULT '0',
  3084.   viewnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  3085.   replynum mediumint(8) unsigned NOT NULL DEFAULT '0',
  3086.   hot mediumint(8) unsigned NOT NULL DEFAULT '0',
  3087.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3088.   picflag tinyint(1) NOT NULL DEFAULT '0',
  3089.   noreply tinyint(1) NOT NULL DEFAULT '0',
  3090.   friend tinyint(1) NOT NULL DEFAULT '0',
  3091.   `password` char(10) NOT NULL DEFAULT '',
  3092.   favtimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  3093.   sharetimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  3094.   `status` tinyint(1) NOT NULL DEFAULT '0',
  3095.   click1 smallint(6) unsigned NOT NULL DEFAULT '0',
  3096.   click2 smallint(6) unsigned NOT NULL DEFAULT '0',
  3097.   click3 smallint(6) unsigned NOT NULL DEFAULT '0',
  3098.   click4 smallint(6) unsigned NOT NULL DEFAULT '0',
  3099.   click5 smallint(6) unsigned NOT NULL DEFAULT '0',
  3100.   click6 smallint(6) unsigned NOT NULL DEFAULT '0',
  3101.   click7 smallint(6) unsigned NOT NULL DEFAULT '0',
  3102.   click8 smallint(6) unsigned NOT NULL DEFAULT '0',
  3103.   PRIMARY KEY (blogid),
  3104.   KEY uid (uid,dateline),
  3105.   KEY hot (hot),
  3106.   KEY dateline (dateline)
  3107. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3108. DROP TABLE IF EXISTS pre_home_blog_category;
  3109. CREATE TABLE pre_home_blog_category (
  3110.   catid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3111.   upid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3112.   catname varchar(255) NOT NULL DEFAULT '',
  3113.   num mediumint(8) unsigned NOT NULL DEFAULT '0',
  3114.   displayorder smallint(6) NOT NULL DEFAULT '0',
  3115.   PRIMARY KEY (catid)
  3116. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3117. DROP TABLE IF EXISTS pre_home_blog_moderate;
  3118. CREATE TABLE pre_home_blog_moderate (
  3119.   id int(10) unsigned NOT NULL DEFAULT '0',
  3120.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3121.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3122.   PRIMARY KEY (id),
  3123.   KEY `status` (`status`,dateline)
  3124. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3125. DROP TABLE IF EXISTS pre_home_blogfield;
  3126. CREATE TABLE pre_home_blogfield (
  3127.   blogid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3128.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3129.   pic varchar(255) NOT NULL DEFAULT '',
  3130.   tag varchar(255) NOT NULL DEFAULT '',
  3131.   message mediumtext NOT NULL,
  3132.   postip varchar(255) NOT NULL DEFAULT '',
  3133.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  3134.   related text NOT NULL,
  3135.   relatedtime int(10) unsigned NOT NULL DEFAULT '0',
  3136.   target_ids text NOT NULL,
  3137.   hotuser text NOT NULL,
  3138.   magiccolor tinyint(6) NOT NULL DEFAULT '0',
  3139.   magicpaper tinyint(6) NOT NULL DEFAULT '0',
  3140.   pushedaid mediumint(8) NOT NULL DEFAULT '0',
  3141.   PRIMARY KEY (blogid),
  3142.   KEY uid (uid)
  3143. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3144. DROP TABLE IF EXISTS pre_home_class;
  3145. CREATE TABLE pre_home_class (
  3146.   classid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3147.   classname char(40) NOT NULL DEFAULT '',
  3148.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3149.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3150.   PRIMARY KEY (classid),
  3151.   KEY uid (uid)
  3152. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3153. DROP TABLE IF EXISTS pre_home_click;
  3154. CREATE TABLE pre_home_click (
  3155.   clickid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  3156.   `name` char(50) NOT NULL DEFAULT '',
  3157.   icon char(100) NOT NULL DEFAULT '',
  3158.   idtype char(15) NOT NULL DEFAULT '',
  3159.   available tinyint(1) unsigned NOT NULL DEFAULT '0',
  3160.   displayorder tinyint(6) unsigned NOT NULL DEFAULT '0',
  3161.   PRIMARY KEY (clickid),
  3162.   KEY idtype (idtype,displayorder)
  3163. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3164. DROP TABLE IF EXISTS pre_home_clickuser;
  3165. CREATE TABLE pre_home_clickuser (
  3166.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3167.   username varchar(15) NOT NULL DEFAULT '',
  3168.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  3169.   idtype varchar(15) NOT NULL DEFAULT '',
  3170.   clickid smallint(6) unsigned NOT NULL DEFAULT '0',
  3171.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3172.   KEY id (id,idtype,dateline),
  3173.   KEY uid (uid,idtype,dateline)
  3174. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3175. DROP TABLE IF EXISTS pre_home_comment;
  3176. CREATE TABLE pre_home_comment (
  3177.   cid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3178.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3179.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  3180.   idtype varchar(20) NOT NULL DEFAULT '',
  3181.   authorid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3182.   author varchar(15) NOT NULL DEFAULT '',
  3183.   ip varchar(20) NOT NULL DEFAULT '',
  3184.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  3185.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3186.   message text NOT NULL,
  3187.   magicflicker tinyint(1) NOT NULL DEFAULT '0',
  3188.   `status` tinyint(1) NOT NULL DEFAULT '0',
  3189.   PRIMARY KEY (cid),
  3190.   KEY authorid (authorid,idtype),
  3191.   KEY id (id,idtype,dateline)
  3192. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3193. DROP TABLE IF EXISTS pre_home_comment_moderate;
  3194. CREATE TABLE pre_home_comment_moderate (
  3195.   id int(10) unsigned NOT NULL DEFAULT '0',
  3196.   idtype varchar(15) NOT NULL DEFAULT '',
  3197.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3198.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3199.   PRIMARY KEY (id),
  3200.   KEY idtype (idtype,`status`,dateline)
  3201. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3202. DROP TABLE IF EXISTS pre_home_docomment;
  3203. CREATE TABLE pre_home_docomment (
  3204.   id int(10) unsigned NOT NULL AUTO_INCREMENT,
  3205.   upid int(10) unsigned NOT NULL DEFAULT '0',
  3206.   doid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3207.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3208.   username varchar(15) NOT NULL DEFAULT '',
  3209.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3210.   message text NOT NULL,
  3211.   ip varchar(20) NOT NULL DEFAULT '',
  3212.   grade smallint(6) unsigned NOT NULL DEFAULT '0',
  3213.   PRIMARY KEY (id),
  3214.   KEY doid (doid,dateline),
  3215.   KEY dateline (dateline)
  3216. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3217. DROP TABLE IF EXISTS pre_home_doing;
  3218. CREATE TABLE pre_home_doing (
  3219.   doid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3220.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3221.   username varchar(15) NOT NULL DEFAULT '',
  3222.   `from` varchar(20) NOT NULL DEFAULT '',
  3223.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3224.   message text NOT NULL,
  3225.   ip varchar(20) NOT NULL DEFAULT '',
  3226.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  3227.   replynum int(10) unsigned NOT NULL DEFAULT '0',
  3228.   `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  3229.   PRIMARY KEY (doid),
  3230.   KEY uid (uid,dateline),
  3231.   KEY dateline (dateline)
  3232. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3233. DROP TABLE IF EXISTS pre_home_doing_moderate;
  3234. CREATE TABLE pre_home_doing_moderate (
  3235.   id int(10) unsigned NOT NULL DEFAULT '0',
  3236.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3237.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3238.   PRIMARY KEY (id),
  3239.   KEY `status` (`status`,dateline)
  3240. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3241. DROP TABLE IF EXISTS pre_home_favorite;
  3242. CREATE TABLE pre_home_favorite (
  3243.   favid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3244.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3245.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  3246.   idtype varchar(255) NOT NULL DEFAULT '',
  3247.   spaceuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3248.   title varchar(255) NOT NULL DEFAULT '',
  3249.   description text NOT NULL,
  3250.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3251.   PRIMARY KEY (favid),
  3252.   KEY idtype (id,idtype),
  3253.   KEY uid (uid,idtype,dateline)
  3254. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3255. DROP TABLE IF EXISTS pre_home_feed;
  3256. CREATE TABLE pre_home_feed (
  3257.   feedid int(10) unsigned NOT NULL AUTO_INCREMENT,
  3258.   appid smallint(6) unsigned NOT NULL DEFAULT '0',
  3259.   icon varchar(30) NOT NULL DEFAULT '',
  3260.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3261.   username varchar(15) NOT NULL DEFAULT '',
  3262.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3263.   friend tinyint(1) NOT NULL DEFAULT '0',
  3264.   hash_template varchar(32) NOT NULL DEFAULT '',
  3265.   hash_data varchar(32) NOT NULL DEFAULT '',
  3266.   title_template text NOT NULL,
  3267.   title_data text NOT NULL,
  3268.   body_template text NOT NULL,
  3269.   body_data text NOT NULL,
  3270.   body_general text NOT NULL,
  3271.   image_1 varchar(255) NOT NULL DEFAULT '',
  3272.   image_1_link varchar(255) NOT NULL DEFAULT '',
  3273.   image_2 varchar(255) NOT NULL DEFAULT '',
  3274.   image_2_link varchar(255) NOT NULL DEFAULT '',
  3275.   image_3 varchar(255) NOT NULL DEFAULT '',
  3276.   image_3_link varchar(255) NOT NULL DEFAULT '',
  3277.   image_4 varchar(255) NOT NULL DEFAULT '',
  3278.   image_4_link varchar(255) NOT NULL DEFAULT '',
  3279.   target_ids text NOT NULL,
  3280.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  3281.   idtype varchar(15) NOT NULL DEFAULT '',
  3282.   hot mediumint(8) unsigned NOT NULL DEFAULT '0',
  3283.   PRIMARY KEY (feedid),
  3284.   KEY uid (uid,dateline),
  3285.   KEY dateline (dateline),
  3286.   KEY hot (hot),
  3287.   KEY id (id,idtype)
  3288. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3289. DROP TABLE IF EXISTS pre_home_feed_app;
  3290. CREATE TABLE pre_home_feed_app (
  3291.   feedid int(10) unsigned NOT NULL AUTO_INCREMENT,
  3292.   appid smallint(6) unsigned NOT NULL DEFAULT '0',
  3293.   icon varchar(30) NOT NULL DEFAULT '',
  3294.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3295.   username varchar(15) NOT NULL DEFAULT '',
  3296.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3297.   friend tinyint(1) NOT NULL DEFAULT '0',
  3298.   hash_template varchar(32) NOT NULL DEFAULT '',
  3299.   hash_data varchar(32) NOT NULL DEFAULT '',
  3300.   title_template text NOT NULL,
  3301.   title_data text NOT NULL,
  3302.   body_template text NOT NULL,
  3303.   body_data text NOT NULL,
  3304.   body_general text NOT NULL,
  3305.   image_1 varchar(255) NOT NULL DEFAULT '',
  3306.   image_1_link varchar(255) NOT NULL DEFAULT '',
  3307.   image_2 varchar(255) NOT NULL DEFAULT '',
  3308.   image_2_link varchar(255) NOT NULL DEFAULT '',
  3309.   image_3 varchar(255) NOT NULL DEFAULT '',
  3310.   image_3_link varchar(255) NOT NULL DEFAULT '',
  3311.   image_4 varchar(255) NOT NULL DEFAULT '',
  3312.   image_4_link varchar(255) NOT NULL DEFAULT '',
  3313.   target_ids text NOT NULL,
  3314.   PRIMARY KEY (feedid),
  3315.   KEY uid (uid,dateline),
  3316.   KEY dateline (dateline)
  3317. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3318. DROP TABLE IF EXISTS pre_home_follow;
  3319. CREATE TABLE pre_home_follow (
  3320.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3321.   username char(15) NOT NULL DEFAULT '',
  3322.   followuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3323.   fusername char(15) NOT NULL DEFAULT '',
  3324.   bkname varchar(255) NOT NULL DEFAULT '',
  3325.   `status` tinyint(1) NOT NULL DEFAULT '0',
  3326.   mutual tinyint(1) NOT NULL DEFAULT '0',
  3327.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3328.   PRIMARY KEY (uid,followuid)
  3329. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3330. DROP TABLE IF EXISTS pre_home_follow_feed;
  3331. CREATE TABLE pre_home_follow_feed (
  3332.   feedid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3333.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3334.   username varchar(15) NOT NULL DEFAULT '',
  3335.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3336.   note text NOT NULL,
  3337.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3338.   PRIMARY KEY (feedid),
  3339.   KEY uid (uid,dateline)
  3340. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3341. DROP TABLE IF EXISTS pre_home_follow_feed_archiver;
  3342. CREATE TABLE pre_home_follow_feed_archiver (
  3343.   feedid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3344.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3345.   username varchar(15) NOT NULL DEFAULT '',
  3346.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3347.   note text NOT NULL,
  3348.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3349.   PRIMARY KEY (feedid),
  3350.   KEY uid (uid,dateline)
  3351. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3352. DROP TABLE IF EXISTS pre_home_friend;
  3353. CREATE TABLE pre_home_friend (
  3354.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3355.   fuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3356.   fusername varchar(15) NOT NULL DEFAULT '',
  3357.   gid smallint(6) unsigned NOT NULL DEFAULT '0',
  3358.   num mediumint(8) unsigned NOT NULL DEFAULT '0',
  3359.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3360.   note varchar(255) NOT NULL DEFAULT '',
  3361.   PRIMARY KEY (uid,fuid),
  3362.   KEY fuid (fuid),
  3363.   KEY uid (uid,num,dateline)
  3364. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3365. DROP TABLE IF EXISTS pre_home_friend_request;
  3366. CREATE TABLE pre_home_friend_request (
  3367.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3368.   fuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3369.   fusername char(15) NOT NULL DEFAULT '',
  3370.   gid smallint(6) unsigned NOT NULL DEFAULT '0',
  3371.   note char(60) NOT NULL DEFAULT '',
  3372.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3373.   PRIMARY KEY (uid,fuid),
  3374.   KEY fuid (fuid),
  3375.   KEY dateline (uid,dateline)
  3376. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3377. DROP TABLE IF EXISTS pre_home_friendlog;
  3378. CREATE TABLE pre_home_friendlog (
  3379.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3380.   fuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3381.   `action` varchar(10) NOT NULL DEFAULT '',
  3382.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3383.   PRIMARY KEY (uid,fuid)
  3384. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3385. DROP TABLE IF EXISTS pre_home_notification;
  3386. CREATE TABLE pre_home_notification (
  3387.   id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3388.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3389.   `type` varchar(20) NOT NULL DEFAULT '',
  3390.   `new` tinyint(1) NOT NULL DEFAULT '0',
  3391.   authorid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3392.   author varchar(15) NOT NULL DEFAULT '',
  3393.   note text NOT NULL,
  3394.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3395.   from_id mediumint(8) unsigned NOT NULL DEFAULT '0',
  3396.   from_idtype varchar(20) NOT NULL DEFAULT '',
  3397.   from_num mediumint(8) unsigned NOT NULL DEFAULT '0',
  3398.   category tinyint(1) NOT NULL DEFAULT '0',
  3399.   PRIMARY KEY (id),
  3400.   KEY uid (uid,`new`),
  3401.   KEY category (uid,category,dateline),
  3402.   KEY by_type (uid,`type`,dateline),
  3403.   KEY from_id (from_id,from_idtype)
  3404. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3405. DROP TABLE IF EXISTS pre_home_pic;
  3406. CREATE TABLE pre_home_pic (
  3407.   picid mediumint(8) NOT NULL AUTO_INCREMENT,
  3408.   albumid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3409.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3410.   username varchar(15) NOT NULL DEFAULT '',
  3411.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3412.   postip varchar(255) NOT NULL DEFAULT '',
  3413.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  3414.   filename varchar(255) NOT NULL DEFAULT '',
  3415.   title varchar(255) NOT NULL DEFAULT '',
  3416.   `type` varchar(255) NOT NULL DEFAULT '',
  3417.   size int(10) unsigned NOT NULL DEFAULT '0',
  3418.   filepath varchar(255) NOT NULL DEFAULT '',
  3419.   thumb tinyint(1) NOT NULL DEFAULT '0',
  3420.   remote tinyint(1) NOT NULL DEFAULT '0',
  3421.   hot mediumint(8) unsigned NOT NULL DEFAULT '0',
  3422.   sharetimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  3423.   click1 smallint(6) unsigned NOT NULL DEFAULT '0',
  3424.   click2 smallint(6) unsigned NOT NULL DEFAULT '0',
  3425.   click3 smallint(6) unsigned NOT NULL DEFAULT '0',
  3426.   click4 smallint(6) unsigned NOT NULL DEFAULT '0',
  3427.   click5 smallint(6) unsigned NOT NULL DEFAULT '0',
  3428.   click6 smallint(6) unsigned NOT NULL DEFAULT '0',
  3429.   click7 smallint(6) unsigned NOT NULL DEFAULT '0',
  3430.   click8 smallint(6) unsigned NOT NULL DEFAULT '0',
  3431.   magicframe tinyint(6) NOT NULL DEFAULT '0',
  3432.   `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  3433.   PRIMARY KEY (picid),
  3434.   KEY uid (uid),
  3435.   KEY albumid (albumid,dateline)
  3436. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3437. DROP TABLE IF EXISTS pre_home_pic_moderate;
  3438. CREATE TABLE pre_home_pic_moderate (
  3439.   id int(10) unsigned NOT NULL DEFAULT '0',
  3440.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3441.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3442.   PRIMARY KEY (id),
  3443.   KEY `status` (`status`,dateline)
  3444. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3445. DROP TABLE IF EXISTS pre_home_picfield;
  3446. CREATE TABLE pre_home_picfield (
  3447.   picid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3448.   hotuser text NOT NULL,
  3449.   PRIMARY KEY (picid)
  3450. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3451. DROP TABLE IF EXISTS pre_home_poke;
  3452. CREATE TABLE pre_home_poke (
  3453.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3454.   fromuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3455.   fromusername varchar(15) NOT NULL DEFAULT '',
  3456.   note varchar(255) NOT NULL DEFAULT '',
  3457.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3458.   iconid smallint(6) unsigned NOT NULL DEFAULT '0',
  3459.   PRIMARY KEY (uid,fromuid),
  3460.   KEY uid (uid,dateline)
  3461. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3462. DROP TABLE IF EXISTS pre_home_pokearchive;
  3463. CREATE TABLE pre_home_pokearchive (
  3464.   pid mediumint(8) NOT NULL AUTO_INCREMENT,
  3465.   pokeuid int(10) unsigned NOT NULL DEFAULT '0',
  3466.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3467.   fromuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3468.   note varchar(255) NOT NULL DEFAULT '',
  3469.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3470.   iconid smallint(6) unsigned NOT NULL DEFAULT '0',
  3471.   PRIMARY KEY (pid),
  3472.   KEY pokeuid (pokeuid)
  3473. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3474. DROP TABLE IF EXISTS pre_home_share;
  3475. CREATE TABLE pre_home_share (
  3476.   sid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3477.   itemid mediumint(8) unsigned NOT NULL,
  3478.   `type` varchar(30) NOT NULL DEFAULT '',
  3479.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3480.   username varchar(15) NOT NULL DEFAULT '',
  3481.   fromuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3482.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3483.   title_template text NOT NULL,
  3484.   body_template text NOT NULL,
  3485.   body_data text NOT NULL,
  3486.   body_general text NOT NULL,
  3487.   image varchar(255) NOT NULL DEFAULT '',
  3488.   image_link varchar(255) NOT NULL DEFAULT '',
  3489.   hot mediumint(8) unsigned NOT NULL DEFAULT '0',
  3490.   hotuser text NOT NULL,
  3491.   `status` tinyint(1) NOT NULL,
  3492.   PRIMARY KEY (sid),
  3493.   KEY uid (uid,dateline),
  3494.   KEY hot (hot),
  3495.   KEY dateline (dateline)
  3496. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3497. DROP TABLE IF EXISTS pre_home_share_moderate;
  3498. CREATE TABLE pre_home_share_moderate (
  3499.   id int(10) unsigned NOT NULL DEFAULT '0',
  3500.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3501.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3502.   PRIMARY KEY (id),
  3503.   KEY `status` (`status`,dateline)
  3504. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3505. DROP TABLE IF EXISTS pre_home_show;
  3506. CREATE TABLE pre_home_show (
  3507.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3508.   username varchar(15) NOT NULL DEFAULT '',
  3509.   unitprice int(10) unsigned NOT NULL DEFAULT '1',
  3510.   credit int(10) unsigned NOT NULL DEFAULT '0',
  3511.   note varchar(100) NOT NULL DEFAULT '',
  3512.   PRIMARY KEY (uid),
  3513.   KEY unitprice (unitprice),
  3514.   KEY credit (credit)
  3515. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3516. DROP TABLE IF EXISTS pre_home_specialuser;
  3517. CREATE TABLE pre_home_specialuser (
  3518.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3519.   username varchar(15) NOT NULL DEFAULT '',
  3520.   `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  3521.   dateline int(10) NOT NULL DEFAULT '0',
  3522.   reason text NOT NULL,
  3523.   opuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3524.   opusername varchar(15) NOT NULL DEFAULT '',
  3525.   displayorder mediumint(8) unsigned NOT NULL DEFAULT '0',
  3526.   KEY uid (uid,`status`),
  3527.   KEY displayorder (`status`,displayorder)
  3528. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3529. DROP TABLE IF EXISTS pre_home_userapp;
  3530. CREATE TABLE pre_home_userapp (
  3531.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3532.   appid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3533.   appname varchar(60) NOT NULL DEFAULT '',
  3534.   privacy tinyint(1) NOT NULL DEFAULT '0',
  3535.   allowsidenav tinyint(1) NOT NULL DEFAULT '0',
  3536.   allowfeed tinyint(1) NOT NULL DEFAULT '0',
  3537.   allowprofilelink tinyint(1) NOT NULL DEFAULT '0',
  3538.   narrow tinyint(1) NOT NULL DEFAULT '0',
  3539.   menuorder smallint(6) NOT NULL DEFAULT '0',
  3540.   displayorder smallint(6) NOT NULL DEFAULT '0',
  3541.   KEY uid (uid,appid),
  3542.   KEY menuorder (uid,menuorder),
  3543.   KEY displayorder (uid,displayorder)
  3544. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3545. DROP TABLE IF EXISTS pre_home_userappfield;
  3546. CREATE TABLE pre_home_userappfield (
  3547.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3548.   appid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3549.   profilelink text NOT NULL,
  3550.   myml text NOT NULL,
  3551.   KEY uid (uid,appid)
  3552. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3553. DROP TABLE IF EXISTS pre_home_visitor;
  3554. CREATE TABLE pre_home_visitor (
  3555.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3556.   vuid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3557.   vusername char(15) NOT NULL DEFAULT '',
  3558.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3559.   PRIMARY KEY (uid,vuid),
  3560.   KEY vuid (vuid),
  3561.   KEY dateline (dateline)
  3562. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3563. DROP TABLE IF EXISTS pre_mobile_setting;
  3564. CREATE TABLE pre_mobile_setting (
  3565.   skey varchar(255) NOT NULL DEFAULT '',
  3566.   svalue text NOT NULL,
  3567.   PRIMARY KEY (skey)
  3568. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3569. DROP TABLE IF EXISTS pre_portal_article_content;
  3570. CREATE TABLE pre_portal_article_content (
  3571.   cid int(10) unsigned NOT NULL AUTO_INCREMENT,
  3572.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3573.   id int(10) unsigned NOT NULL DEFAULT '0',
  3574.   idtype varchar(255) NOT NULL DEFAULT '',
  3575.   title varchar(255) NOT NULL DEFAULT '',
  3576.   content text NOT NULL,
  3577.   pageorder smallint(6) unsigned NOT NULL DEFAULT '0',
  3578.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3579.   PRIMARY KEY (cid),
  3580.   KEY aid (aid,pageorder),
  3581.   KEY pageorder (pageorder)
  3582. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3583. DROP TABLE IF EXISTS pre_portal_article_count;
  3584. CREATE TABLE pre_portal_article_count (
  3585.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3586.   catid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3587.   viewnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  3588.   commentnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  3589.   favtimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  3590.   sharetimes mediumint(8) unsigned NOT NULL DEFAULT '0',
  3591.   PRIMARY KEY (aid)
  3592. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3593. DROP TABLE IF EXISTS pre_portal_article_moderate;
  3594. CREATE TABLE pre_portal_article_moderate (
  3595.   id int(10) unsigned NOT NULL DEFAULT '0',
  3596.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3597.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3598.   PRIMARY KEY (id),
  3599.   KEY `status` (`status`,dateline)
  3600. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3601. DROP TABLE IF EXISTS pre_portal_article_related;
  3602. CREATE TABLE pre_portal_article_related (
  3603.   aid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3604.   raid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3605.   displayorder mediumint(8) unsigned NOT NULL DEFAULT '0',
  3606.   PRIMARY KEY (aid,raid),
  3607.   KEY aid (aid,displayorder)
  3608. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3609. DROP TABLE IF EXISTS pre_portal_article_title;
  3610. CREATE TABLE pre_portal_article_title (
  3611.   aid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3612.   catid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3613.   bid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3614.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3615.   username varchar(255) NOT NULL DEFAULT '',
  3616.   title varchar(255) NOT NULL DEFAULT '',
  3617.   highlight varchar(255) NOT NULL DEFAULT '',
  3618.   author varchar(255) NOT NULL DEFAULT '',
  3619.   `from` varchar(255) NOT NULL DEFAULT '',
  3620.   fromurl varchar(255) NOT NULL DEFAULT '',
  3621.   url varchar(255) NOT NULL DEFAULT '',
  3622.   summary varchar(255) NOT NULL DEFAULT '',
  3623.   pic varchar(255) NOT NULL DEFAULT '',
  3624.   thumb tinyint(1) NOT NULL DEFAULT '0',
  3625.   remote tinyint(1) NOT NULL DEFAULT '0',
  3626.   id int(10) unsigned NOT NULL DEFAULT '0',
  3627.   idtype varchar(255) NOT NULL DEFAULT '',
  3628.   contents smallint(6) NOT NULL DEFAULT '0',
  3629.   allowcomment tinyint(1) NOT NULL DEFAULT '0',
  3630.   owncomment tinyint(1) NOT NULL DEFAULT '0',
  3631.   click1 smallint(6) unsigned NOT NULL DEFAULT '0',
  3632.   click2 smallint(6) unsigned NOT NULL DEFAULT '0',
  3633.   click3 smallint(6) unsigned NOT NULL DEFAULT '0',
  3634.   click4 smallint(6) unsigned NOT NULL DEFAULT '0',
  3635.   click5 smallint(6) unsigned NOT NULL DEFAULT '0',
  3636.   click6 smallint(6) unsigned NOT NULL DEFAULT '0',
  3637.   click7 smallint(6) unsigned NOT NULL DEFAULT '0',
  3638.   click8 smallint(6) unsigned NOT NULL DEFAULT '0',
  3639.   tag tinyint(8) unsigned NOT NULL DEFAULT '0',
  3640.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3641.   `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  3642.   showinnernav tinyint(1) unsigned NOT NULL DEFAULT '0',
  3643.   preaid mediumint(8) unsigned NOT NULL,
  3644.   nextaid mediumint(8) unsigned NOT NULL,
  3645.   htmlmade tinyint(1) unsigned NOT NULL DEFAULT '0',
  3646.   htmlname varchar(255) NOT NULL DEFAULT '',
  3647.   htmldir varchar(255) NOT NULL DEFAULT '',
  3648.   PRIMARY KEY (aid),
  3649.   KEY catid (catid,dateline)
  3650. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3651. DROP TABLE IF EXISTS pre_portal_article_trash;
  3652. CREATE TABLE pre_portal_article_trash (
  3653.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3654.   content text NOT NULL,
  3655.   PRIMARY KEY (aid)
  3656. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3657. DROP TABLE IF EXISTS pre_portal_attachment;
  3658. CREATE TABLE pre_portal_attachment (
  3659.   attachid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3660.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3661.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3662.   filename varchar(255) NOT NULL DEFAULT '',
  3663.   filetype varchar(255) NOT NULL DEFAULT '',
  3664.   filesize int(10) unsigned NOT NULL DEFAULT '0',
  3665.   attachment varchar(255) NOT NULL DEFAULT '',
  3666.   isimage tinyint(1) NOT NULL DEFAULT '0',
  3667.   thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
  3668.   remote tinyint(1) unsigned NOT NULL DEFAULT '0',
  3669.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3670.   PRIMARY KEY (attachid),
  3671.   KEY aid (aid,attachid)
  3672. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3673. DROP TABLE IF EXISTS pre_portal_category;
  3674. CREATE TABLE pre_portal_category (
  3675.   catid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3676.   upid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3677.   catname varchar(255) NOT NULL DEFAULT '',
  3678.   articles mediumint(8) unsigned NOT NULL DEFAULT '0',
  3679.   allowcomment tinyint(1) NOT NULL DEFAULT '1',
  3680.   displayorder smallint(6) NOT NULL DEFAULT '0',
  3681.   notinheritedarticle tinyint(1) NOT NULL DEFAULT '0',
  3682.   notinheritedblock tinyint(1) NOT NULL DEFAULT '0',
  3683.   domain varchar(255) NOT NULL DEFAULT '',
  3684.   url varchar(255) NOT NULL DEFAULT '',
  3685.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3686.   username varchar(255) NOT NULL DEFAULT '',
  3687.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3688.   closed tinyint(1) NOT NULL DEFAULT '0',
  3689.   shownav tinyint(1) NOT NULL DEFAULT '0',
  3690.   description text NOT NULL,
  3691.   seotitle text NOT NULL,
  3692.   keyword text NOT NULL,
  3693.   primaltplname varchar(255) NOT NULL DEFAULT '',
  3694.   articleprimaltplname varchar(255) NOT NULL DEFAULT '',
  3695.   disallowpublish tinyint(1) NOT NULL DEFAULT '0',
  3696.   foldername varchar(255) NOT NULL DEFAULT '',
  3697.   notshowarticlesummay varchar(255) NOT NULL DEFAULT '',
  3698.   perpage smallint(6) NOT NULL DEFAULT '0',
  3699.   maxpages smallint(6) NOT NULL DEFAULT '0',
  3700.   noantitheft tinyint(1) NOT NULL DEFAULT '0',
  3701.   lastpublish int(10) unsigned NOT NULL DEFAULT '0',
  3702.   PRIMARY KEY (catid)
  3703. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3704. DROP TABLE IF EXISTS pre_portal_category_permission;
  3705. CREATE TABLE pre_portal_category_permission (
  3706.   catid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3707.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3708.   allowpublish tinyint(1) NOT NULL DEFAULT '0',
  3709.   allowmanage tinyint(1) NOT NULL DEFAULT '0',
  3710.   inheritedcatid mediumint(8) NOT NULL DEFAULT '0',
  3711.   PRIMARY KEY (catid,uid),
  3712.   KEY uid (uid)
  3713. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3714. DROP TABLE IF EXISTS pre_portal_comment;
  3715. CREATE TABLE pre_portal_comment (
  3716.   cid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3717.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3718.   username varchar(255) NOT NULL DEFAULT '',
  3719.   id mediumint(8) unsigned NOT NULL DEFAULT '0',
  3720.   idtype varchar(20) NOT NULL DEFAULT '',
  3721.   postip varchar(255) NOT NULL DEFAULT '',
  3722.   `port` smallint(6) unsigned NOT NULL DEFAULT '0',
  3723.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3724.   `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  3725.   message text NOT NULL,
  3726.   PRIMARY KEY (cid),
  3727.   KEY idtype (id,idtype,dateline)
  3728. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3729. DROP TABLE IF EXISTS pre_portal_comment_moderate;
  3730. CREATE TABLE pre_portal_comment_moderate (
  3731.   id int(10) unsigned NOT NULL DEFAULT '0',
  3732.   idtype varchar(15) NOT NULL DEFAULT '',
  3733.   `status` tinyint(3) NOT NULL DEFAULT '0',
  3734.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3735.   PRIMARY KEY (id),
  3736.   KEY idtype (idtype,`status`,dateline)
  3737. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3738. DROP TABLE IF EXISTS pre_portal_rsscache;
  3739. CREATE TABLE pre_portal_rsscache (
  3740.   lastupdate int(10) unsigned NOT NULL DEFAULT '0',
  3741.   catid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3742.   aid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3743.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3744.   catname char(50) NOT NULL DEFAULT '',
  3745.   author char(15) NOT NULL DEFAULT '',
  3746.   `subject` char(80) NOT NULL DEFAULT '',
  3747.   description char(255) NOT NULL DEFAULT '',
  3748.   UNIQUE KEY aid (aid),
  3749.   KEY catid (catid,dateline)
  3750. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3751. DROP TABLE IF EXISTS pre_portal_topic;
  3752. CREATE TABLE pre_portal_topic (
  3753.   topicid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  3754.   title varchar(255) NOT NULL DEFAULT '',
  3755.   `name` varchar(255) NOT NULL DEFAULT '',
  3756.   domain varchar(255) NOT NULL DEFAULT '',
  3757.   summary text NOT NULL,
  3758.   keyword text NOT NULL,
  3759.   cover varchar(255) NOT NULL DEFAULT '',
  3760.   picflag tinyint(1) NOT NULL DEFAULT '0',
  3761.   primaltplname varchar(255) NOT NULL DEFAULT '',
  3762.   useheader tinyint(1) NOT NULL DEFAULT '0',
  3763.   usefooter tinyint(1) NOT NULL DEFAULT '0',
  3764.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3765.   username varchar(255) NOT NULL DEFAULT '',
  3766.   viewnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  3767.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3768.   closed tinyint(1) NOT NULL DEFAULT '0',
  3769.   allowcomment tinyint(1) NOT NULL DEFAULT '0',
  3770.   commentnum mediumint(8) unsigned NOT NULL DEFAULT '0',
  3771.   htmlmade tinyint(1) unsigned NOT NULL DEFAULT '0',
  3772.   htmldir varchar(255) NOT NULL DEFAULT '',
  3773.   PRIMARY KEY (topicid),
  3774.   KEY `name` (`name`)
  3775. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3776. DROP TABLE IF EXISTS pre_portal_topic_pic;
  3777. CREATE TABLE pre_portal_topic_pic (
  3778.   picid mediumint(8) NOT NULL AUTO_INCREMENT,
  3779.   topicid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3780.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3781.   username varchar(15) NOT NULL DEFAULT '',
  3782.   dateline int(10) unsigned NOT NULL DEFAULT '0',
  3783.   filename varchar(255) NOT NULL DEFAULT '',
  3784.   title varchar(255) NOT NULL DEFAULT '',
  3785.   size int(10) unsigned NOT NULL DEFAULT '0',
  3786.   filepath varchar(255) NOT NULL DEFAULT '',
  3787.   thumb tinyint(1) NOT NULL DEFAULT '0',
  3788.   remote tinyint(1) NOT NULL DEFAULT '0',
  3789.   PRIMARY KEY (picid),
  3790.   KEY topicid (topicid)
  3791. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3792. DROP TABLE IF EXISTS pre_security_evilpost;
  3793. CREATE TABLE pre_security_evilpost (
  3794.   pid int(10) unsigned NOT NULL,
  3795.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  3796.   `type` tinyint(1) NOT NULL DEFAULT '0',
  3797.   evilcount int(10) NOT NULL DEFAULT '0',
  3798.   eviltype mediumint(8) unsigned NOT NULL DEFAULT '0',
  3799.   createtime int(10) unsigned NOT NULL DEFAULT '0',
  3800.   operateresult tinyint(1) unsigned NOT NULL DEFAULT '0',
  3801.   isreported tinyint(1) NOT NULL DEFAULT '0',
  3802.   censorword char(50) NOT NULL,
  3803.   PRIMARY KEY (pid),
  3804.   KEY `type` (tid,`type`),
  3805.   KEY operateresult (operateresult,createtime)
  3806. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3807. DROP TABLE IF EXISTS pre_security_eviluser;
  3808. CREATE TABLE pre_security_eviluser (
  3809.   uid int(10) unsigned NOT NULL,
  3810.   evilcount int(10) NOT NULL DEFAULT '0',
  3811.   eviltype mediumint(8) unsigned NOT NULL DEFAULT '0',
  3812.   createtime int(10) unsigned NOT NULL DEFAULT '0',
  3813.   operateresult tinyint(1) unsigned NOT NULL DEFAULT '0',
  3814.   isreported tinyint(1) NOT NULL DEFAULT '0',
  3815.   PRIMARY KEY (uid),
  3816.   KEY operateresult (operateresult,createtime)
  3817. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

  3818. DROP TABLE IF EXISTS pre_security_failedlog;
  3819. CREATE TABLE pre_security_failedlog (
  3820.   id int(11) NOT NULL AUTO_INCREMENT,
  3821.   reporttype char(20) NOT NULL,
  3822.   tid int(10) unsigned NOT NULL DEFAULT '0',
  3823.   pid int(10) unsigned NOT NULL DEFAULT '0',
  3824.   uid int(10) unsigned NOT NULL DEFAULT '0',
  3825.   failcount int(10) unsigned NOT NULL DEFAULT '0',
  3826.   createtime int(10) unsigned NOT NULL DEFAULT '0',
  3827.   posttime int(10) unsigned NOT NULL DEFAULT '0',
  3828.   delreason char(255) NOT NULL,
  3829.   scheduletime int(10) unsigned NOT NULL DEFAULT '0',
  3830.   lastfailtime int(10) unsigned NOT NULL DEFAULT '0',
  3831.   extra1 int(10) unsigned NOT NULL,
  3832.   extra2 char(255) NOT NULL DEFAULT '0',
  3833.   PRIMARY KEY (id),
  3834.   KEY pid (pid),
  3835.   KEY uid (uid)
  3836. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

复制代码


如遇到导入innodb数据库报错
  1. ALTER TABLE pre_common_member_grouppm DROP PRIMARY KEY,ADD PRIMARY KEY(gpmid,uid);
  2. ALTER TABLE pre_forum_post DROP PRIMARY KEY,ADD PRIMARY KEY(position,tid);
  3. ALTER TABLE `pre_forum_post` ENGINE = InnoDB
  4. ALTER TABLE `pre_common_member_grouppm` ENGINE = InnoDB
复制代码


执行后再导入

本教程由无限星辰工作室CRX349独家整理和提供,转载请注明地址,谢谢。本文地址:https://www.xmspace.net/thread-820-1-1.html
无限星辰工作室 www.xmspace.net 星辰云擎 monitor.xmwxxc.com 星辰加密 phpjm.xmwxxc.com
服务Discuz!建站|搬家|运维|挂马防护|Win Linux网站环境(lanmp)架设优化|服务器安全维护|解决CPU100|解决论坛卡顿|Thinkphp定制开发|App开发|微擎运维|小程序开发|Cms/Cmf二开
服务理念:专业 诚信 友好QQ842062626 服务项目 http://www.xmspace.net/service.php Discuz!交流群 315524225
发表于 2020-3-28 00:52:24 | 显示全部楼层 |阅读模式

回复 | 使用道具 举报

该帖共收到 0 条回复!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

美图秀

    • VsCode下Python 报python from import 错误
    • modoer 3.6搬家并更换域名
    • 阿里云Centos8 Error: Failed to synchroni
    • Win2019下VirtualBox虚拟环境开机自动运行
    • Discuz! 贴内通栏广告修改
拖动客服框
Online Service
点击这里给我发消息
点击这里联系我们
微信扫一扫
在线客服
快速回复 返回顶部 返回列表