--- fenglin/TODO/sql/db_stru.sql	2025/03/01 08:51:25	1.3
+++ fenglin/TODO/sql/db_stru.sql	2025/10/16 03:56:59	1.22
@@ -1,1085 +1,563 @@
-# Host: localhost
-# Database: leafok
-# Table: 'admin_config'
-# 
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET time_zone = "+00:00";
+
 CREATE TABLE `admin_config` (
-  `AID` smallint(6) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `begin_dt` datetime default NULL,
-  `end_dt` datetime default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `major` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`AID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'ban_ip_list'
-# 
-CREATE TABLE `ban_ip_list` (
-  `BID` smallint(6) NOT NULL auto_increment,
-  `begin_ip` varchar(20) default NULL,
-  `end_ip` varchar(20) default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  PRIMARY KEY  (`BID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'ban_user_list'
-# 
+  `AID` smallint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `begin_dt` datetime DEFAULT NULL,
+  `end_dt` datetime DEFAULT NULL,
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `major` tinyint UNSIGNED NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+CREATE TABLE `article_favorite` (
+  `UID` mediumint NOT NULL,
+  `AID` int NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `ban_user_list` (
-  `BID` smallint(6) NOT NULL auto_increment,
-  `SID` smallint(6) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `day` smallint(6) NOT NULL default '0',
-  `ban_UID` mediumint(9) NOT NULL default '0',
-  `ban_dt` datetime default NULL,
-  `ban_ip` varchar(20) default NULL,
-  `unban_UID` mediumint(9) NOT NULL default '0',
-  `unban_dt` datetime default NULL,
-  `unban_ip` varchar(20) default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `reason` text,
-  PRIMARY KEY  (`BID`),
-  KEY `ban_UID` (`ban_UID`),
-  KEY `SID` (`SID`),
-  KEY `day` (`day`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs'
-# 
+  `BID` smallint NOT NULL,
+  `SID` smallint NOT NULL DEFAULT '0',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `day` smallint NOT NULL DEFAULT '0',
+  `ban_UID` mediumint NOT NULL DEFAULT '0',
+  `ban_dt` datetime DEFAULT NULL,
+  `ban_ip` varchar(20) DEFAULT NULL,
+  `unban_UID` mediumint NOT NULL DEFAULT '0',
+  `unban_dt` datetime DEFAULT NULL,
+  `unban_ip` varchar(20) DEFAULT NULL,
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `reason` mediumtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `bbs` (
-  `AID` mediumint(9) NOT NULL auto_increment,
-  `SID` smallint(6) NOT NULL default '0',
-  `TID` mediumint(9) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `username` varchar(20) default '',
-  `nickname` varchar(20) default NULL,
-  `title` varchar(80) default NULL,
-  `CID` mediumint(9) NOT NULL default '0',
-  `sub_dt` datetime default NULL,
-  `sub_ip` varchar(20) default NULL,
-  `reply_note` tinyint(1) unsigned NOT NULL default '0',
-  `visible` tinyint(1) unsigned NOT NULL default '1',
-  `view_count` smallint(6) NOT NULL default '0',
-  `exp` mediumint(9) NOT NULL default '0',
-  `last_reply_dt` datetime default NULL,
-  `last_reply_UID` mediumint(9) NOT NULL default '0',
-  `last_reply_username` varchar(20) default '',
-  `last_reply_nickname` varchar(20) default NULL,
-  `transship` tinyint(1) unsigned NOT NULL default '0',
-  `lock` tinyint(1) unsigned NOT NULL default '0',
-  `reply_count` smallint(6) NOT NULL default '0',
-  `icon` smallint(6) default NULL,
-  `length` mediumint(9) NOT NULL default '0',
-  `excerption` tinyint(1) unsigned NOT NULL default '0',
-  `ontop` tinyint(1) unsigned NOT NULL default '0',
-  `static` tinyint(1) unsigned NOT NULL default '0',
-  `cached` tinyint(3) unsigned NOT NULL default '0',
-  `recommend` tinyint(1) unsigned NOT NULL default '0',
-  `gen_ex` tinyint(1) unsigned NOT NULL default '0',
-  `m_del` tinyint(1) unsigned NOT NULL default '0',
-  `old_SID` smallint(6) NOT NULL default '0',
-  `old_TID` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`AID`),
-  UNIQUE KEY `CID` (`CID`),
-  KEY `UID` (`UID`),
-  KEY `reply_count` (`reply_count`),
-  KEY `last_reply_dt` (`last_reply_dt`),
-  KEY `view_count` (`view_count`),
-  KEY `sub_dt` (`sub_dt`),
-  KEY `title` (`title`(10)),
-  KEY `old_SID` (`old_SID`),
-  KEY `SID` (`SID`),
-  KEY `old_TID` (`old_TID`),
-  KEY `TID` (`TID`),
-  KEY `last_reply_UID` (`last_reply_UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_article_op'
-# 
+  `AID` int NOT NULL,
+  `SID` smallint NOT NULL DEFAULT '0',
+  `TID` mediumint NOT NULL DEFAULT '0',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `username` varchar(20) DEFAULT NULL,
+  `nickname` varchar(20) DEFAULT NULL,
+  `title` varchar(80) DEFAULT NULL,
+  `CID` mediumint NOT NULL DEFAULT '0',
+  `sub_dt` datetime DEFAULT NULL,
+  `sub_ip` varchar(20) DEFAULT NULL,
+  `reply_note` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `visible` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `view_count` smallint NOT NULL DEFAULT '0',
+  `exp` mediumint NOT NULL DEFAULT '0',
+  `last_reply_dt` datetime DEFAULT NULL,
+  `last_reply_UID` mediumint NOT NULL DEFAULT '0',
+  `last_reply_username` varchar(20) DEFAULT NULL,
+  `last_reply_nickname` varchar(20) DEFAULT NULL,
+  `transship` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `lock` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `reply_count` smallint NOT NULL DEFAULT '0',
+  `icon` smallint DEFAULT NULL,
+  `length` mediumint NOT NULL DEFAULT '0',
+  `excerption` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `ontop` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `static` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `gen_ex` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `m_del` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `old_SID` smallint NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `bbs_article_op` (
-  `MID` mediumint(9) NOT NULL auto_increment,
-  `AID` mediumint(9) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `type` char(1) NOT NULL default '',
-  `op_dt` datetime default NULL,
-  `op_ip` varchar(20) default NULL,
-  `complete` tinyint(1) unsigned NOT NULL default '1',
-  PRIMARY KEY  (`MID`),
-  KEY `AID` (`AID`),
-  KEY `UID` (`UID`),
-  KEY `type` (`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_content'
-# 
+  `MID` int NOT NULL,
+  `AID` int NOT NULL DEFAULT '0',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `type` char(1) NOT NULL DEFAULT '',
+  `op_dt` datetime DEFAULT NULL,
+  `op_ip` varchar(20) DEFAULT NULL,
+  `complete` tinyint UNSIGNED NOT NULL DEFAULT '1'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `bbs_content` (
-  `CID` mediumint(9) NOT NULL auto_increment,
-  `AID` mediumint(9) NOT NULL default '0',
-  `content` longtext,
-  PRIMARY KEY  (`CID`),
-  KEY `AID` (`AID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_ex_dl'
-# 
-CREATE TABLE `bbs_ex_dl` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `SID` smallint(6) NOT NULL default '0',
-  `url` varchar(255) default NULL,
-  `dl_count` mediumint(9) NOT NULL default '0',
-  `dl_type` char(1) NOT NULL default 'C',
-  `filename` varchar(50) default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  PRIMARY KEY  (`ID`),
-  UNIQUE KEY `SID` (`SID`),
-  KEY `dl_type` (`dl_type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_msg'
-# 
+  `CID` int NOT NULL,
+  `AID` int NOT NULL DEFAULT '0',
+  `content` longtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `bbs_msg` (
-  `MID` mediumint(9) NOT NULL auto_increment,
-  `fromUID` mediumint(9) NOT NULL default '0',
-  `toUID` mediumint(9) NOT NULL default '0',
-  `content` text,
-  `send_dt` datetime NOT NULL default '0000-00-00 00:00:00',
-  `send_ip` varchar(20) NOT NULL default '',
-  `new` tinyint(1) unsigned NOT NULL default '1',
-  `deleted` tinyint(1) unsigned NOT NULL default '0',
-  `s_deleted` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`MID`),
-  KEY `fromUID` (`fromUID`),
-  KEY `toUID` (`toUID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_prize'
-# 
-CREATE TABLE `bbs_prize` (
-  `PID` smallint(6) NOT NULL auto_increment,
-  `title` varchar(50) default NULL,
-  `description` varchar(50) default NULL,
-  `score` mediumint(9) NOT NULL default '0',
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `count_left` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`PID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_recommend'
-# 
-CREATE TABLE `bbs_recommend` (
-  `RID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `TID` mediumint(9) NOT NULL default '0',
-  `type` char(1) NOT NULL default 'D',
-  `dt` datetime default NULL,
-  `email` varchar(50) NOT NULL default '',
-  `ip` varchar(20) default NULL,
-  PRIMARY KEY  (`RID`),
-  KEY `UID` (`UID`),
-  KEY `TID` (`TID`),
-  KEY `type` (`type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'bbs_top_list'
-# 
-CREATE TABLE `bbs_top_list` (
-  `AID` mediumint(9) NOT NULL default '0',
-  `bbs_title` varchar(80) NOT NULL default '',
-  `section_title` varchar(20) NOT NULL default ''
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'email'
-# 
+  `MID` int NOT NULL,
+  `fromUID` mediumint NOT NULL DEFAULT '0',
+  `toUID` mediumint NOT NULL DEFAULT '0',
+  `content` longtext,
+  `send_dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `send_ip` varchar(20) NOT NULL DEFAULT '',
+  `new` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `deleted` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `s_deleted` tinyint UNSIGNED NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `email` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `fromemail` varchar(30) default NULL,
-  `fromname` varchar(30) default NULL,
-  `toemail` varchar(30) default NULL,
-  `toname` varchar(30) default NULL,
-  `subject` varchar(80) default NULL,
-  `body` text,
-  `set_dt` datetime default NULL,
-  `send_dt` datetime default NULL,
-  `complete` tinyint(1) unsigned NOT NULL default '0',
-  `error` tinyint(1) unsigned NOT NULL default '0',
-  `error_msg` varchar(255) default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `complete` (`complete`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'ex_dir'
-# 
+  `ID` int NOT NULL,
+  `fromemail` varchar(30) DEFAULT NULL,
+  `fromname` varchar(30) DEFAULT NULL,
+  `toemail` varchar(30) DEFAULT NULL,
+  `toname` varchar(30) DEFAULT NULL,
+  `subject` varchar(80) DEFAULT NULL,
+  `body` longtext,
+  `set_dt` datetime DEFAULT NULL,
+  `send_dt` datetime DEFAULT NULL,
+  `complete` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `error` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `error_msg` varchar(255) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `ex_dir` (
-  `FID` mediumint(9) NOT NULL auto_increment,
-  `dir` varchar(255) default '',
-  `name` varchar(50) default '',
-  `SID` smallint(6) NOT NULL default '0',
-  `enable` tinyint(1) unsigned NOT NULL default '0',
-  `dt` datetime default '0000-00-00 00:00:00',
-  PRIMARY KEY  (`FID`),
-  UNIQUE KEY `dir` (`dir`,`SID`),
-  KEY `SID` (`SID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'ex_file'
-# 
+  `FID` mediumint NOT NULL,
+  `dir` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
+  `SID` smallint NOT NULL DEFAULT '0',
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `dt` datetime DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `ex_file` (
-  `AID` mediumint(9) NOT NULL default '0',
-  `FID` smallint(6) NOT NULL default '0',
-  PRIMARY KEY  (`AID`),
-  KEY `FID` (`FID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'exam_question_lib'
-# 
-CREATE TABLE `exam_question_lib` (
-  `QID` mediumint(9) NOT NULL auto_increment,
-  `type` enum('S','M','B','C') NOT NULL default 'S',
-  `class` smallint(6) NOT NULL default '0',
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `time_limit` smallint(6) NOT NULL default '120',
-  `score` smallint(6) NOT NULL default '1',
-  `A_count` smallint(6) NOT NULL default '0',
-  `Q` varchar(255) default '',
-  `A1` varchar(255) default '',
-  `E1` tinyint(1) unsigned NOT NULL default '0',
-  `A2` varchar(100) default '',
-  `E2` tinyint(1) unsigned NOT NULL default '0',
-  `A3` varchar(255) default '',
-  `E3` tinyint(3) unsigned NOT NULL default '0',
-  `A4` varchar(255) default '',
-  `E4` tinyint(1) unsigned NOT NULL default '0',
-  `A5` varchar(255) default '',
-  `E5` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`QID`),
-  KEY `type` (`type`),
-  KEY `class` (`class`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'exam_user_list'
-# 
-CREATE TABLE `exam_user_list` (
-  `TID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `class` smallint(6) NOT NULL default '0',
-  `voucher` varchar(10) default '',
-  `enable` tinyint(1) unsigned NOT NULL default '0',
-  `done` enum('N','B','E') NOT NULL default 'N',
-  `tm_limit` smallint(6) NOT NULL default '120',
-  `begin_tm` datetime default '0000-00-00 00:00:00',
-  `end_tm` datetime default '0000-00-00 00:00:00',
-  `ip` varchar(20) default '',
-  `score` smallint(6) NOT NULL default '0',
-  `pass` enum('P','F','N') NOT NULL default 'N',
-  `Q_S` smallint(6) NOT NULL default '0',
-  `Q_M` smallint(6) NOT NULL default '0',
-  `Q_B` smallint(6) NOT NULL default '0',
-  `Q_C` smallint(6) NOT NULL default '0',
-  `user_comment` text,
-  PRIMARY KEY  (`TID`),
-  UNIQUE KEY `voucher` (`voucher`),
-  KEY `class` (`class`),
-  KEY `UID` (`UID`),
-  KEY `score` (`score`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'exam_user_question'
-# 
-CREATE TABLE `exam_user_question` (
-  `ID` int(11) NOT NULL auto_increment,
-  `TID` mediumint(9) NOT NULL default '0',
-  `QID` mediumint(9) NOT NULL default '0',
-  `answer_order` varchar(10) default '',
-  `user_answer` varchar(10) default '',
-  `done` enum('N','B','E') NOT NULL default 'N',
-  `begin_tm` datetime default '0000-00-00 00:00:00',
-  `end_tm` datetime default '0000-00-00 00:00:00',
-  `score` smallint(6) NOT NULL default '0',
-  `user_answer_text` text,
-  PRIMARY KEY  (`ID`),
-  KEY `QID` (`QID`),
-  KEY `TID` (`TID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'friend_list'
-# 
+  `AID` int NOT NULL DEFAULT '0',
+  `FID` smallint NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `friend_list` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `fUID` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`ID`),
-  KEY `fUID` (`fUID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'jk_log'
-# 
-CREATE TABLE `jk_log` (
-  `ID` int(11) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `dt` datetime NOT NULL default '0000-00-00 00:00:00',
-  `ip` varchar(20) NOT NULL default '',
-  `process` tinyint(1) unsigned NOT NULL default '0',
-  `complete` tinyint(1) NOT NULL default '0',
-  `anonymous` tinyint(1) unsigned NOT NULL default '0',
-  `amount` mediumint(9) NOT NULL default '0',
-  `pay_type` enum('CASH','POST','BANK','PAYPAL','OTHER') NOT NULL default 'OTHER',
-  `comment` text NOT NULL,
-  `reward` enum('NONE','SCORE','MAIL','BOTH') NOT NULL default 'NONE',
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`),
-  KEY `amount` (`amount`),
-  KEY `process` (`process`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'journal_data'
-# 
-CREATE TABLE `journal_data` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `JID` smallint(6) NOT NULL default '0',
-  `AID` mediumint(9) NOT NULL default '0',
-  `abstract` text NOT NULL,
-  PRIMARY KEY  (`ID`),
-  UNIQUE KEY `AID` (`AID`),
-  KEY `JID` (`JID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'journal_index'
-# 
-CREATE TABLE `journal_index` (
-  `JID` smallint(6) NOT NULL auto_increment,
-  `dt` datetime NOT NULL default '0000-00-00 00:00:00',
-  `enable` tinyint(1) NOT NULL default '0',
-  PRIMARY KEY  (`JID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'mng_err_login_log'
-# 
-CREATE TABLE `mng_err_login_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `username` varchar(14) default NULL,
-  `password` varchar(12) default NULL,
-  `login_dt` datetime default NULL,
-  `login_ip` varchar(20) default NULL,
-  PRIMARY KEY  (`ID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'mng_login_log'
-# 
-CREATE TABLE `mng_login_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `login_dt` datetime default NULL,
-  `login_ip` varchar(20) default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`),
-  KEY `login_dt` (`login_dt`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'mng_priv_list'
-# 
-CREATE TABLE `mng_priv_list` (
-  `PID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `ch_passwd` tinyint(1) unsigned NOT NULL default '1',
-  `db_cleanup` tinyint(1) unsigned NOT NULL default '0',
-  `score_cacl` tinyint(1) unsigned NOT NULL default '0',
-  `auth_user_op` tinyint(1) unsigned NOT NULL default '0',
-  `section_op` tinyint(1) unsigned NOT NULL default '0',
-  `master_op` tinyint(2) unsigned NOT NULL default '0',
-  `photo_check` tinyint(1) unsigned NOT NULL default '0',
-  `prize_op` tinyint(1) unsigned NOT NULL default '0',
-  `db_op` tinyint(1) unsigned NOT NULL default '0',
-  `file_op` tinyint(1) unsigned NOT NULL default '0',
-  `article_audit` tinyint(1) unsigned NOT NULL default '0',
-  `gen_ex` tinyint(1) unsigned NOT NULL default '0',
-  `jk_op` tinyint(1) unsigned NOT NULL default '0',
-  `upload_check` tinyint(1) unsigned NOT NULL default '0',
-  `article_recommend` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`PID`),
-  UNIQUE KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'mng_user_list'
-# 
-CREATE TABLE `mng_user_list` (
-  `UID` mediumint(9) NOT NULL auto_increment,
-  `username` varchar(14) NOT NULL default '',
-  `password` varchar(32) NOT NULL default '',
-  `enable` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`UID`),
-  UNIQUE KEY `username` (`username`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 's_e'
-# 
-CREATE TABLE `s_e` (
-  `ID` int(11) NOT NULL auto_increment,
-  `sitename` varchar(40) NOT NULL default '',
-  `url` varchar(255) NOT NULL default '',
-  `class` enum('WWW','FTP','TELNET','BC','MMS') NOT NULL default 'WWW',
-  `description` varchar(255) default '',
-  `location` enum('INTERNET','LAN') NOT NULL default 'INTERNET',
-  `enable` tinyint(1) NOT NULL default '0',
-  `process` tinyint(1) NOT NULL default '0',
-  `name` varchar(10) NOT NULL default '',
-  `email` varchar(30) NOT NULL default '',
-  `ip` varchar(20) NOT NULL default '',
-  PRIMARY KEY  (`ID`),
-  KEY `location` (`location`),
-  KEY `class` (`class`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_apply_log'
-# 
-CREATE TABLE `section_apply_log` (
-  `AID` smallint(6) NOT NULL auto_increment,
-  `SID` smallint(6) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `process_dt` datetime default NULL,
-  `memo` tinytext,
-  PRIMARY KEY  (`AID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_class'
-# 
+  `ID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `fUID` mediumint NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `section_class` (
-  `CID` smallint(6) NOT NULL auto_increment,
-  `cname` varchar(20) default NULL,
-  `title` varchar(20) default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `sort_order` smallint(6) NOT NULL default '10',
-  PRIMARY KEY  (`CID`),
-  KEY `sort_order` (`sort_order`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_class_master'
-# 
-CREATE TABLE `section_class_master` (
-  `MID` smallint(6) NOT NULL auto_increment,
-  `CID` smallint(6) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `begin_dt` datetime default NULL,
-  `end_dt` datetime default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `memo` tinytext,
-  `major` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`MID`),
-  KEY `UID` (`UID`),
-  KEY `CID` (`CID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_config'
-# 
+  `CID` smallint NOT NULL,
+  `cname` varchar(20) DEFAULT NULL,
+  `title` varchar(20) DEFAULT NULL,
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `sort_order` smallint NOT NULL DEFAULT '10'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `section_config` (
-  `SID` smallint(6) NOT NULL auto_increment,
-  `sname` varchar(20) default NULL,
-  `CID` smallint(6) NOT NULL default '0',
-  `title` varchar(20) default NULL,
-  `comment` varchar(255) default NULL,
-  `topic_max_count` smallint(6) NOT NULL default '0',
-  `announcement` text,
-  `bgsound` smallint(6) NOT NULL default '0',
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `exp_get` tinyint(1) unsigned NOT NULL default '0',
-  `recommend` tinyint(1) unsigned NOT NULL default '0',
-  `transship_ratio` float NOT NULL default '0.5',
-  `set_UID` mediumint(9) default '0',
-  `set_dt` datetime default NULL,
-  `set_ip` varchar(20) default NULL,
-  `sort_order` smallint(6) NOT NULL default '10',
-  `ex_gen_tm` datetime default '0000-00-00 00:00:00',
-  `ex_pack_tm` datetime default '0000-00-00 00:00:00',
-  `ex_update` tinyint(1) unsigned NOT NULL default '0',
-  `read_user_level` smallint(6) NOT NULL default '0',
-  `write_user_level` smallint(6) NOT NULL default '0',
-  PRIMARY KEY  (`SID`),
-  KEY `CID` (`CID`),
-  KEY `write_user_level` (`write_user_level`),
-  KEY `sort_order` (`sort_order`),
-  KEY `read_user_level` (`read_user_level`),
-  KEY `sname` (`sname`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_favorite'
-# 
+  `SID` smallint NOT NULL,
+  `sname` varchar(20) DEFAULT NULL,
+  `CID` smallint NOT NULL DEFAULT '0',
+  `title` varchar(20) DEFAULT NULL,
+  `comment` varchar(255) DEFAULT NULL,
+  `topic_retention` smallint NOT NULL DEFAULT '0',
+  `announcement` longtext,
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `exp_get` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `recommend` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `set_UID` mediumint DEFAULT '0',
+  `set_dt` datetime DEFAULT NULL,
+  `set_ip` varchar(20) DEFAULT NULL,
+  `sort_order` smallint NOT NULL DEFAULT '10',
+  `ex_gen_tm` datetime DEFAULT NULL,
+  `ex_update` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `ex_menu_tm` datetime DEFAULT NULL,
+  `ex_menu_update` tinyint NOT NULL DEFAULT '0',
+  `read_user_level` smallint NOT NULL DEFAULT '0',
+  `write_user_level` smallint NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `section_favorite` (
-  `ID` int(11) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `SID` smallint(6) NOT NULL default '0',
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_master'
-# 
+  `ID` int NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `SID` smallint NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `section_master` (
-  `MID` smallint(6) NOT NULL auto_increment,
-  `SID` smallint(6) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `begin_dt` datetime default NULL,
-  `end_dt` datetime default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `major` tinyint(1) unsigned NOT NULL default '0',
-  `formal` tinyint(1) unsigned NOT NULL default '0',
-  `memo` tinytext,
-  PRIMARY KEY  (`MID`),
-  KEY `SID` (`SID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_master_apply'
-# 
-CREATE TABLE `section_master_apply` (
-  `AID` smallint(6) NOT NULL auto_increment,
-  `SID` smallint(6) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `apply_dt` datetime default NULL,
-  `process` tinyint(1) unsigned NOT NULL default '0',
-  `process_dt` datetime default NULL,
-  `permit` tinyint(1) unsigned NOT NULL default '0',
-  `major` tinyint(1) unsigned NOT NULL default '0',
-  `memo` tinytext,
-  PRIMARY KEY  (`AID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'section_user_priv'
-# 
-CREATE TABLE `section_user_priv` (
-  `SID` smallint(6) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `read` tinyint(1) unsigned NOT NULL default '0',
-  `write` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`SID`,`UID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'send_pass_log'
-# 
+  `MID` smallint NOT NULL,
+  `SID` smallint NOT NULL DEFAULT '0',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `begin_dt` datetime DEFAULT NULL,
+  `end_dt` datetime DEFAULT NULL,
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `major` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `memo` text
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `send_pass_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `dt` datetime NOT NULL default '0000-00-00 00:00:00',
-  `ip` varchar(20) NOT NULL default '',
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'upload_file'
-# 
+  `ID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `ip` varchar(20) NOT NULL DEFAULT ''
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `upload_file` (
-  `AID` mediumint(9) NOT NULL auto_increment,
-  `ref_AID` mediumint(9) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `size` mediumint(9) NOT NULL default '0',
-  `filename` varchar(255) NOT NULL default '',
-  `check` tinyint(1) unsigned NOT NULL default '0',
-  `deny` tinyint(1) unsigned NOT NULL default '0',
-  `deleted` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`AID`),
-  KEY `check` (`check`),
-  KEY `UID` (`UID`),
-  KEY `ref_AID` (`ref_AID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_auth'
-# 
-CREATE TABLE `user_auth` (
-  `AUID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `pid` varchar(18) default NULL,
-  `name` varchar(10) default NULL,
-  `email` varchar(30) default NULL,
-  `expire_dt` datetime default NULL,
-  `photo_enable` tinyint(1) unsigned NOT NULL default '1',
-  `photo_ext` varchar(5) NOT NULL default '',
-  `enable` tinyint(1) unsigned NOT NULL default '0',
-  `process` tinyint(1) unsigned NOT NULL default '0',
-  `auth_type` enum('PID','EMAIL','TRUST','SCORE') NOT NULL default 'TRUST',
-  PRIMARY KEY  (`AUID`),
-  KEY `UID` (`UID`),
-  KEY `expire_dt` (`expire_dt`),
-  KEY `auth_type` (`auth_type`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_elect'
-# 
-CREATE TABLE `user_elect` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `attend` tinyint(1) unsigned NOT NULL default '0',
-  `invalid` tinyint(1) unsigned NOT NULL default '0',
-  `voted` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_elect_vote'
-# 
-CREATE TABLE `user_elect_vote` (
-  `elect_UID` mediumint(9) NOT NULL default '0',
-  `vote_UID` mediumint(9) NOT NULL default '0',
-  KEY `elect_UID` (`elect_UID`),
-  KEY `vote_UID` (`vote_UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_err_login_log'
-# 
+  `AID` mediumint NOT NULL,
+  `ref_AID` mediumint NOT NULL DEFAULT '0',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `size` mediumint NOT NULL DEFAULT '0',
+  `filename` varchar(255) NOT NULL DEFAULT '',
+  `check` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `deny` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `deleted` tinyint UNSIGNED NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_err_login_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `username` varchar(14) default NULL,
-  `password` varchar(12) default NULL,
-  `login_dt` datetime default NULL,
-  `login_ip` varchar(20) default NULL,
-  PRIMARY KEY  (`ID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_life_log'
-# 
+  `ID` int NOT NULL,
+  `username` varchar(14) DEFAULT NULL,
+  `password` varchar(12) DEFAULT NULL,
+  `login_dt` datetime DEFAULT NULL,
+  `login_ip` varchar(20) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_life_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `set_UID` mediumint(9) NOT NULL default '0',
-  `life` smallint(6) NOT NULL default '0',
-  `dt` datetime NOT NULL default '0000-00-00 00:00:00',
-  `ip` varchar(20) NOT NULL default '',
-  PRIMARY KEY  (`ID`),
-  KEY `set_UID` (`set_UID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_list'
-# 
+  `ID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `set_UID` mediumint NOT NULL DEFAULT '0',
+  `life` smallint NOT NULL DEFAULT '0',
+  `dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `ip` varchar(20) NOT NULL DEFAULT ''
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_list` (
-  `UID` mediumint(9) NOT NULL auto_increment,
-  `username` varchar(20) NOT NULL default '',
-  `password` varchar(32) NOT NULL default '',
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  `verified` tinyint(1) unsigned NOT NULL default '0',
-  `p_login` tinyint(1) unsigned NOT NULL default '1',
-  `p_post` tinyint(1) unsigned NOT NULL default '1',
-  `p_msg` tinyint(1) unsigned NOT NULL default '1',
-  `p_mail` tinyint(1) unsigned NOT NULL default '1',
-  PRIMARY KEY  (`UID`),
-  UNIQUE KEY `username` (`username`),
-  KEY `verified` (`verified`),
-  KEY `enable` (`enable`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_login_log'
-# 
+  `UID` mediumint NOT NULL,
+  `username` varchar(20) NOT NULL DEFAULT '',
+  `password` varchar(64) NOT NULL DEFAULT '',
+  `temp_password` varchar(20) NOT NULL DEFAULT '',
+  `enable` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `verified` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `p_login` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `p_post` tinyint UNSIGNED NOT NULL DEFAULT '1',
+  `p_msg` tinyint UNSIGNED NOT NULL DEFAULT '1'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_login_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `login_dt` datetime default NULL,
-  `login_ip` varchar(20) default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`),
-  KEY `login_dt` (`login_dt`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_modify_email_verify'
-# 
+  `ID` int NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `login_dt` datetime DEFAULT NULL,
+  `login_ip` varchar(20) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_modify_email_verify` (
-  `MID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `email` varchar(30) default NULL,
-  `verify_code` varchar(10) NOT NULL default '',
-  `complete` tinyint(1) unsigned NOT NULL default '0',
-  `dt` datetime default NULL,
-  `ip` varchar(20) default NULL,
-  PRIMARY KEY  (`MID`),
-  UNIQUE KEY `verify_code` (`verify_code`),
-  KEY `UID` (`UID`),
-  KEY `complete` (`complete`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_modify_log'
-# 
+  `MID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `email` varchar(30) DEFAULT NULL,
+  `verify_code` varchar(10) NOT NULL DEFAULT '',
+  `complete` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `dt` datetime DEFAULT NULL,
+  `ip` varchar(20) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_modify_log` (
-  `MID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `modify_dt` datetime default NULL,
-  `modify_ip` varchar(20) default NULL,
-  `complete` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`MID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_nickname'
-# 
+  `MID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `modify_dt` datetime DEFAULT NULL,
+  `modify_ip` varchar(20) DEFAULT NULL,
+  `complete` tinyint UNSIGNED NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_nickname` (
-  `NID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `nickname` varchar(20) NOT NULL default '',
-  `begin_dt` datetime default NULL,
-  `begin_reason` char(1) default NULL,
-  `end_dt` datetime default NULL,
-  `end_reason` char(1) default NULL,
-  PRIMARY KEY  (`NID`),
-  KEY `UID` (`UID`),
-  KEY `nickname` (`nickname`),
-  KEY `begin_dt` (`begin_dt`),
-  KEY `end_dt` (`end_dt`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_online'
-# 
+  `NID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `nickname` varchar(20) NOT NULL DEFAULT '',
+  `begin_dt` datetime DEFAULT NULL,
+  `begin_reason` char(1) DEFAULT NULL,
+  `end_dt` datetime DEFAULT NULL,
+  `end_reason` char(1) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_online` (
-  `ID` int(9) NOT NULL auto_increment,
-  `SID` varchar(32) NOT NULL default '',
-  `UID` mediumint(9) NOT NULL default '0',
-  `ip` varchar(20) NOT NULL default '',
-  `current_SID` smallint(6) NOT NULL default '0',
-  `current_action` varchar(20) NOT NULL default '',
-  `login_tm` datetime NOT NULL default '0000-00-00 00:00:00',
-  `last_tm` datetime default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `login_tm` (`login_tm`),
-  KEY `UID` (`UID`),
-  KEY `last_tm` (`last_tm`),
-  KEY `SID` (`SID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_prize'
-# 
-CREATE TABLE `user_prize` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `PID` smallint(6) NOT NULL default '0',
-  `dt` datetime default NULL,
-  `ip` varchar(20) default NULL,
-  `process` tinyint(1) unsigned NOT NULL default '0',
-  `complete` tinyint(1) unsigned NOT NULL default '0',
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`),
-  KEY `PID` (`PID`),
-  KEY `process` (`process`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_pubinfo'
-# 
+  `SID` varchar(32) NOT NULL DEFAULT '',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `ip` varchar(20) NOT NULL DEFAULT '',
+  `current_action` varchar(20) NOT NULL DEFAULT '',
+  `login_tm` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `last_tm` datetime DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_pubinfo` (
-  `UID` mediumint(9) NOT NULL default '0',
-  `nickname` varchar(20) default NULL,
-  `email` varchar(30) default NULL,
-  `gender` char(1) NOT NULL default 'M',
-  `oicq` varchar(10) default NULL,
-  `icq` varchar(10) default NULL,
-  `homepage` varchar(80) default NULL,
-  `introduction` text,
-  `photo` smallint(6) default '0',
-  `life` smallint(6) NOT NULL default '15',
-  `exp` mediumint(9) default '0',
-  `visit_count` mediumint(9) NOT NULL default '0',
-  `email_pub` tinyint(1) unsigned NOT NULL default '0',
-  `oicq_pub` tinyint(1) unsigned NOT NULL default '0',
-  `icq_pub` tinyint(1) unsigned NOT NULL default '0',
-  `homepage_pub` tinyint(1) unsigned NOT NULL default '0',
-  `gender_pub` tinyint(1) unsigned NOT NULL default '0',
-  `last_login_dt` datetime default NULL,
-  `sign_1` text,
-  `sign_2` text,
-  `sign_3` text,
-  `sub_permission` tinyint(1) unsigned NOT NULL default '1',
-  `upload_limit` int(11) NOT NULL default '1048576',
-  `login_notify_dt` datetime default '0000-00-00 00:00:00',
-  `subscribe_jid` smallint(6) NOT NULL default '-1',
-  `bgsound` tinyint(1) NOT NULL default '1',
-  PRIMARY KEY  (`UID`),
-  UNIQUE KEY `nickname` (`nickname`),
-  KEY `life` (`life`),
-  KEY `login_notify_dt` (`login_notify_dt`),
-  KEY `exp` (`exp`),
-  KEY `last_login_dt` (`last_login_dt`),
-  KEY `subscribe_jid` (`subscribe_jid`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_reginfo'
-# 
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `nickname` varchar(20) DEFAULT NULL,
+  `email` varchar(30) DEFAULT NULL,
+  `gender` char(1) NOT NULL DEFAULT 'M',
+  `qq` varchar(10) DEFAULT NULL,
+  `introduction` mediumtext,
+  `photo` smallint DEFAULT '0',
+  `photo_enable` tinyint(1) NOT NULL DEFAULT '0',
+  `photo_ext` varchar(5) NOT NULL DEFAULT '',
+  `life` smallint NOT NULL DEFAULT '15',
+  `exp` mediumint DEFAULT '0',
+  `visit_count` mediumint NOT NULL DEFAULT '0',
+  `gender_pub` tinyint UNSIGNED NOT NULL DEFAULT '0',
+  `last_login_dt` datetime DEFAULT NULL,
+  `last_logout_dt` datetime DEFAULT NULL,
+  `sign_1` mediumtext,
+  `sign_2` mediumtext,
+  `sign_3` mediumtext,
+  `upload_limit` int NOT NULL DEFAULT '1048576',
+  `login_notify_dt` datetime DEFAULT NULL,
+  `user_timezone` varchar(50) NOT NULL DEFAULT '',
+  `game_money` int NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_reginfo` (
-  `UID` mediumint(9) NOT NULL default '0',
-  `name` varchar(10) default NULL,
-  `birthday` datetime default NULL,
-  `address` varchar(80) default NULL,
-  `tel` varchar(20) default NULL,
-  `postcode` varchar(6) default NULL,
-  `pid` varchar(18) default NULL,
-  `country` varchar(10) default NULL,
-  `province` varchar(10) default NULL,
-  `city` varchar(10) default NULL,
-  `signup_dt` datetime default NULL,
-  `signup_ip` varchar(20) default NULL,
-  `memo` text,
-  PRIMARY KEY  (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_reginfo_log'
-# 
-CREATE TABLE `user_reginfo_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `name` varchar(10) default NULL,
-  `birthday` date default NULL,
-  `address` varchar(80) default NULL,
-  `tel` varchar(20) default NULL,
-  `postcode` varchar(6) default NULL,
-  `pid` varchar(18) default NULL,
-  `country` varchar(10) default NULL,
-  `province` varchar(10) default NULL,
-  `city` varchar(10) default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_regverify'
-# 
-CREATE TABLE `user_regverify` (
-  `UID` mediumint(9) NOT NULL default '0',
-  `verify_code` varchar(10) NOT NULL default '',
-  `complete` tinyint(1) unsigned NOT NULL default '0',
-  `set_dt` datetime default NULL,
-  PRIMARY KEY  (`UID`),
-  UNIQUE KEY `verify_code` (`verify_code`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_relation'
-# 
-CREATE TABLE `user_relation` (
-  `RID` mediumint(9) NOT NULL auto_increment,
-  `pUID` mediumint(9) NOT NULL default '0',
-  `cUID` mediumint(9) NOT NULL default '0',
-  `enable` tinyint(1) unsigned NOT NULL default '0',
-  `last_exp` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`RID`),
-  UNIQUE KEY `cUID` (`cUID`),
-  KEY `pUID` (`pUID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_score'
-# 
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `name` varchar(10) DEFAULT NULL,
+  `birthday` datetime DEFAULT NULL,
+  `signup_dt` datetime DEFAULT NULL,
+  `signup_ip` varchar(20) DEFAULT NULL,
+  `memo` mediumtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_score` (
-  `UID` mediumint(9) NOT NULL default '0',
-  `score` mediumint(9) NOT NULL default '0',
-  `last_exp` mediumint(9) NOT NULL default '0',
-  `exp_left` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`UID`),
-  KEY `score` (`score`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_score_log'
-# 
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `score` mediumint NOT NULL DEFAULT '0',
+  `last_exp` mediumint NOT NULL DEFAULT '0',
+  `exp_left` mediumint NOT NULL DEFAULT '0'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `user_score_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `score_change` mediumint(9) NOT NULL default '0',
-  `reason` varchar(50) default NULL,
-  `dt` datetime default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_switch_list'
-# 
-CREATE TABLE `user_switch_list` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `tUID` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`ID`),
-  KEY `tUID` (`tUID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'user_trust_log'
-# 
-CREATE TABLE `user_trust_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `tUID` mediumint(9) NOT NULL default '0',
-  PRIMARY KEY  (`ID`),
-  KEY `tUID` (`tUID`),
-  KEY `UID` (`UID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'view_article_log'
-# 
+  `ID` mediumint NOT NULL,
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `score_change` mediumint NOT NULL DEFAULT '0',
+  `reason` varchar(50) DEFAULT NULL,
+  `dt` datetime DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `view_article_log` (
-  `AID` mediumint(11) NOT NULL default '0',
-  `UID` mediumint(9) NOT NULL default '0',
-  `dt` datetime NOT NULL default '0000-00-00 00:00:00',
-  PRIMARY KEY  (`AID`,`UID`),
-  KEY `dt` (`dt`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'visit_log'
-# 
+  `AID` int NOT NULL DEFAULT '0',
+  `UID` mediumint NOT NULL DEFAULT '0',
+  `dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
 CREATE TABLE `visit_log` (
-  `VID` mediumint(9) NOT NULL auto_increment,
-  `dt` datetime default NULL,
-  `ip` varchar(20) default NULL,
-  PRIMARY KEY  (`VID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'vote_answer'
-# 
-CREATE TABLE `vote_answer` (
-  `AID` smallint(6) NOT NULL auto_increment,
-  `VID` smallint(6) NOT NULL default '0',
-  `answer` varchar(100) default NULL,
-  `count` smallint(6) NOT NULL default '0',
-  PRIMARY KEY  (`AID`),
-  KEY `VID` (`VID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'vote_config'
-# 
-CREATE TABLE `vote_config` (
-  `VID` smallint(6) NOT NULL auto_increment,
-  `title` varchar(20) default NULL,
-  `question` varchar(100) default NULL,
-  `begin_dt` datetime default NULL,
-  `end_dt` datetime default NULL,
-  `enable` tinyint(1) unsigned NOT NULL default '1',
-  PRIMARY KEY  (`VID`),
-  KEY `begin_dt` (`begin_dt`),
-  KEY `end_dt` (`end_dt`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
-
-# Host: localhost
-# Database: leafok
-# Table: 'vote_log'
-# 
-CREATE TABLE `vote_log` (
-  `ID` mediumint(9) NOT NULL auto_increment,
-  `UID` mediumint(9) NOT NULL default '0',
-  `VID` smallint(6) NOT NULL default '0',
-  `AID` smallint(6) NOT NULL default '0',
-  `vote_dt` datetime default NULL,
-  `vote_ip` varchar(20) default NULL,
-  PRIMARY KEY  (`ID`),
-  KEY `UID` (`UID`),
-  KEY `VID` (`VID`),
-  KEY `AID` (`AID`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1; 
+  `VID` int NOT NULL,
+  `dt` datetime DEFAULT NULL,
+  `ip` varchar(20) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+
+
+ALTER TABLE `admin_config`
+  ADD PRIMARY KEY (`AID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `article_favorite`
+  ADD PRIMARY KEY (`UID`,`AID`),
+  ADD KEY `AID` (`AID`);
+
+ALTER TABLE `ban_user_list`
+  ADD PRIMARY KEY (`BID`),
+  ADD KEY `ban_UID` (`ban_UID`),
+  ADD KEY `SID` (`SID`),
+  ADD KEY `day` (`day`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `bbs`
+  ADD PRIMARY KEY (`AID`),
+  ADD UNIQUE KEY `CID` (`CID`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `reply_count` (`reply_count`),
+  ADD KEY `last_reply_dt` (`last_reply_dt`),
+  ADD KEY `view_count` (`view_count`),
+  ADD KEY `sub_dt` (`sub_dt`),
+  ADD KEY `title` (`title`(10)),
+  ADD KEY `old_SID` (`old_SID`),
+  ADD KEY `SID` (`SID`),
+  ADD KEY `TID` (`TID`),
+  ADD KEY `last_reply_UID` (`last_reply_UID`);
+
+ALTER TABLE `bbs_article_op`
+  ADD PRIMARY KEY (`MID`),
+  ADD KEY `AID` (`AID`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `type` (`type`);
+
+ALTER TABLE `bbs_content`
+  ADD PRIMARY KEY (`CID`),
+  ADD KEY `AID` (`AID`);
+
+ALTER TABLE `bbs_msg`
+  ADD PRIMARY KEY (`MID`),
+  ADD KEY `fromUID` (`fromUID`),
+  ADD KEY `toUID` (`toUID`);
+
+ALTER TABLE `email`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `complete` (`complete`);
+
+ALTER TABLE `ex_dir`
+  ADD PRIMARY KEY (`FID`),
+  ADD KEY `SID` (`SID`),
+  ADD KEY `dir` (`dir`(50));
+
+ALTER TABLE `ex_file`
+  ADD PRIMARY KEY (`AID`),
+  ADD KEY `FID` (`FID`);
+
+ALTER TABLE `friend_list`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `fUID` (`fUID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `section_class`
+  ADD PRIMARY KEY (`CID`),
+  ADD KEY `sort_order` (`sort_order`);
+
+ALTER TABLE `section_config`
+  ADD PRIMARY KEY (`SID`),
+  ADD KEY `CID` (`CID`),
+  ADD KEY `write_user_level` (`write_user_level`),
+  ADD KEY `sort_order` (`sort_order`),
+  ADD KEY `read_user_level` (`read_user_level`),
+  ADD KEY `sname` (`sname`);
+
+ALTER TABLE `section_favorite`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `section_master`
+  ADD PRIMARY KEY (`MID`),
+  ADD KEY `SID` (`SID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `send_pass_log`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `upload_file`
+  ADD PRIMARY KEY (`AID`),
+  ADD KEY `check` (`check`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `ref_AID` (`ref_AID`);
+
+ALTER TABLE `user_err_login_log`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `login_dt` (`login_dt`,`login_ip`);
+
+ALTER TABLE `user_life_log`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `set_UID` (`set_UID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `user_list`
+  ADD PRIMARY KEY (`UID`),
+  ADD UNIQUE KEY `username` (`username`),
+  ADD KEY `verified` (`verified`),
+  ADD KEY `enable` (`enable`);
+
+ALTER TABLE `user_login_log`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `login_dt` (`login_dt`);
+
+ALTER TABLE `user_modify_email_verify`
+  ADD PRIMARY KEY (`MID`),
+  ADD UNIQUE KEY `verify_code` (`verify_code`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `complete` (`complete`);
+
+ALTER TABLE `user_modify_log`
+  ADD PRIMARY KEY (`MID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `user_nickname`
+  ADD PRIMARY KEY (`NID`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `nickname` (`nickname`),
+  ADD KEY `begin_dt` (`begin_dt`),
+  ADD KEY `end_dt` (`end_dt`);
+
+ALTER TABLE `user_online`
+  ADD PRIMARY KEY (`SID`) USING BTREE,
+  ADD KEY `login_tm` (`login_tm`),
+  ADD KEY `UID` (`UID`),
+  ADD KEY `last_tm` (`last_tm`);
+
+ALTER TABLE `user_pubinfo`
+  ADD PRIMARY KEY (`UID`),
+  ADD UNIQUE KEY `nickname` (`nickname`),
+  ADD KEY `life` (`life`),
+  ADD KEY `login_notify_dt` (`login_notify_dt`),
+  ADD KEY `exp` (`exp`),
+  ADD KEY `last_login_dt` (`last_login_dt`);
+
+ALTER TABLE `user_reginfo`
+  ADD PRIMARY KEY (`UID`);
+
+ALTER TABLE `user_score`
+  ADD PRIMARY KEY (`UID`),
+  ADD KEY `score` (`score`);
+
+ALTER TABLE `user_score_log`
+  ADD PRIMARY KEY (`ID`),
+  ADD KEY `UID` (`UID`);
+
+ALTER TABLE `view_article_log`
+  ADD PRIMARY KEY (`AID`,`UID`),
+  ADD UNIQUE KEY `UID` (`UID`,`AID`),
+  ADD KEY `dt` (`dt`);
+
+ALTER TABLE `visit_log`
+  ADD PRIMARY KEY (`VID`);
+
+
+ALTER TABLE `admin_config`
+  MODIFY `AID` smallint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `ban_user_list`
+  MODIFY `BID` smallint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `bbs`
+  MODIFY `AID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `bbs_article_op`
+  MODIFY `MID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `bbs_content`
+  MODIFY `CID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `bbs_msg`
+  MODIFY `MID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `email`
+  MODIFY `ID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `ex_dir`
+  MODIFY `FID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `friend_list`
+  MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `section_class`
+  MODIFY `CID` smallint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `section_config`
+  MODIFY `SID` smallint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `section_favorite`
+  MODIFY `ID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `section_master`
+  MODIFY `MID` smallint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `send_pass_log`
+  MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `upload_file`
+  MODIFY `AID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_err_login_log`
+  MODIFY `ID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_life_log`
+  MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_list`
+  MODIFY `UID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_login_log`
+  MODIFY `ID` int NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_modify_email_verify`
+  MODIFY `MID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_modify_log`
+  MODIFY `MID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_nickname`
+  MODIFY `NID` mediumint NOT NULL AUTO_INCREMENT;
+
+ALTER TABLE `user_score_log`
+  MODIFY `ID` mediumint NOT NULL AUTO_INCREMENT;
 
+ALTER TABLE `visit_log`
+  MODIFY `VID` int NOT NULL AUTO_INCREMENT;
