public function create_tables(){
return false;
$tablename = config('database.prefix').'tables';
$isTable= Db::query('SHOW TABLES LIKE '."'".$tablename."'");
if(!$isTable){
Db::execute("CREATE TABLE `".$tablename."` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '姓名',
`age` int(11) NOT NULL DEFAULT 0 COMMENT '年齡',
`sex` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '性別',
`cardid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份證',
`card` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '準考證',
`tel` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '電話',
`createtime` int(11) DEFAULT NULL COMMENT '录入时间',
`status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '審批',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `cardid`(`cardid`) USING BTREE,
INDEX `card`(`card`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT = 1 DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_general_ci COMMENT='表'");
}
}
public function create_parentir(){
Db::execute("ALTER TABLE `usezan_cate` CHANGE `parentdir` `parentdir` CHAR(50) CHARACTER SET utf8mb4 NULL DEFAULT NULL COMMENT '父级路径'");
}