[TOC] ## 2.05升级到2.0.6 替换/woo目录 替换/public/static/woo目录 替换/public/static/layui目录 模型中找到`Import`模型,把`model`字段改为`model_id int not null defualt 0` ,如图: ![](https://img.kancloud.cn/d6/7e/d67e268f2ba0e1b0943d36f5e71da132_1578x317.png) ## 2.0.4升级到2.0.5 替换/woo目录 替换/public/static/woo目录 替换/config/woo.php文件 替换/config/wooauth.php文件 新增/config/api.php 文件 SQL执行,前缀请自行修改(把`woo_`替换为你的前缀): ``` ALTER TABLE `woo_application` ADD `is_api` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否API'; ALTER TABLE `woo_user` ADD `truename` varchar(64) NOT NULL DEFAULT '' COMMENT '真实姓名'; ALTER TABLE `woo_user` ADD `pay_password` varchar(32) NOT NULL DEFAULT '' COMMENT '支付密码'; ALTER TABLE `woo_user` ADD `is_bind_mobile` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '手机绑定'; ALTER TABLE `woo_user` ADD `is_bind_email` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '邮箱绑定'; ALTER TABLE `woo_user` ADD `region` varchar(64) NOT NULL DEFAULT '' COMMENT '所在地区'; ALTER TABLE `woo_user` ADD `address` varchar(64) NOT NULL DEFAULT '' COMMENT '详细地址'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'is_api', '是否API', 27, 'checker', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'is_verify', 1, 1617286206, 1617286206), (NULL, 'truename', '真实姓名', 19, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'status', 1, 1616239865, 1616239865), (NULL, 'pay_password', '支付密码', 19, 'password', '', '{"tip":"不修改请保持为空"}', '', '', '', '', '0', '', '', '', '', '0', '', '', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 0, '', 'password', 1, 1616243950, 1616251407), (NULL, 'is_bind_email', '邮箱绑定', 19, 'checker', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'email', 1, 1616248002, 1616248002), (NULL, 'is_bind_mobile', '手机绑定', 19, 'checker', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'mobile', 1, 1616248041, 1616306181), (NULL, 'region', '所在地区', 19, 'cascader', 'Region', '', '{"data-url":"true"}', '', '', '', '', '', 'cascader', '{}', '{"data-url":"true"}', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'birthday', 1, 1616248210, 1616251042), (NULL, 'address', '详细地址', 19, 'text', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'region', 1, 1616248240, 1616248240); CREATE TABLE IF NOT EXISTS `woo_user_login` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `ip` varchar(32) NOT NULL DEFAULT '' COMMENT '登录IP', `user_agent` varchar(256) NOT NULL DEFAULT '' COMMENT '客户端', `region` varchar(128) NOT NULL DEFAULT '' COMMENT '登录地址', `summary` varchar(128) NOT NULL DEFAULT '' COMMENT '描述', `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='登录日志' AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS `woo_certification` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID', `truename` varchar(64) NOT NULL DEFAULT '' COMMENT '姓名', `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机', `id_card` varchar(32) NOT NULL DEFAULT '' COMMENT '身份证', `id_card_front` varchar(128) NOT NULL DEFAULT '' COMMENT '身份证正面', `id_card_back` varchar(128) NOT NULL DEFAULT '' COMMENT '身份证背面', `is_cert` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '通过', `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改日期', `delete_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除日期', PRIMARY KEY (`id`), KEY `user_id` (`user_id`), KEY `delete_time` (`delete_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='实名认证' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `woo_antispam` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '审核模型', `foreign_id` int(11) NOT NULL DEFAULT '0' COMMENT '模型ID', `is_verify` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '审核状态', `content` mediumtext NOT NULL COMMENT '审核内容', `result` text NOT NULL COMMENT '返回结果', `msg` text NOT NULL COMMENT '内容提示', `words` text NOT NULL COMMENT '不合格字符', `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID', `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文本审核' AUTO_INCREMENT=1 ; // 如果你的模型数据表添加不能用29,30,31你要手动修改下id 且后面的`woo_field`也要手动修改下对应的模型id: INSERT INTO `woo_model` (`id`, `model`, `cname`, `addon`, `full_table`, `order_type`, `tree_level`, `custom_data`, `list_config`, `suffix`, `pk`, `connection`, `is_import`, `parent_model`, `display`, `form_group`, `relation_link`, `admin_id`, `is_controller`, `create_time`, `update_time`) VALUES (29, 'UserLogin', '登录日志', '', '', '', 0, '', 'batch_delete,delete,detail', '', '', '', 0, '', 'username', '', '[{"key":"User","foreign":"","type":"belongsTo","foreign_key":"","more":""}]', 1, 1, 1616240855, 1616336766), (30, 'Certification', '实名认证', '', '', '', 0, '', 'create,batch_delete,modify,delete,detail', '', '', '', 0, 'User', 'truename', '', '[{"key":"User","foreign":"","type":"belongsTo","foreign_key":"","more":""}]', 1, 1, 1616258937, 1616258937), (31, 'Antispam', '文本审核', '', '', '', 0, '', 'batch_delete,modify,delete,detail', '', '', '', 0, '', 'title', '', '[{"key":"Admin","foreign":"","type":"","foreign_key":"","more":""}]', 1, 1, 1618039195, 1618039195); INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'id', 'ID', 29, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 1, '', '', 0, 1616240855, 1617776507), (NULL, 'username', '用户名', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 1, '', '', 0, 1616240855, 1617801788), (NULL, 'user_id', '会员ID', 29, 'relation', 'User', '', '', '', '', '', 'relation', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 1, 'index', '', 0, 1616240855, 1617776511), (NULL, 'create_time', '创建日期', 29, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616240855, 1617776534), (NULL, 'update_time', '修改日期', 29, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616240855, 1616240855), (NULL, 'ip', '登录IP', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 1, '', 'user_id', 1, 1616241012, 1617776514), (NULL, 'user_agent', '客户端', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '256', '', 1, 0, 0, 1, 1, '', 'ip', 1, 1616241087, 1617776516), (NULL, 'region', '登录地址', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 1, '', 'user_agent', 1, 1616241160, 1617776518), (NULL, 'summary', '描述', 29, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 1, '', 'region', 1, 1616241220, 1617776520), (NULL, 'id', 'ID', 30, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1616258937, 1616258937), (NULL, 'user_id', '会员ID', 30, 'relation', 'User', '', '', '', '', '', 'relation', '', '', '', '', '', '', '[{"rule":"require","args":"","on":"0","message":""},{"rule":"egt","args":"1","on":"0","message":""},{"rule":"unique","args":"certification","on":"0","message":""}]', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1616258938, 1616259490), (NULL, 'create_time', '创建日期', 30, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616258938, 1616258938), (NULL, 'update_time', '修改日期', 30, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1616258938, 1616258938), (NULL, 'delete_time', '删除日期', 30, '', '', '', '', '', '', '', '0', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1616258938, 1616258938), (NULL, 'truename', '姓名', 30, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '[{"rule":"require","args":"","on":"","message":""}]', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'user_id', 1, 1616259019, 1616259019), (NULL, 'mobile', '手机', 30, 'text', '', '', '', '', '', '', '', '', '1', '', '', '', '', '[{"rule":"require","args":"","on":"0","message":""},{"rule":"mobile","args":"","on":"0","message":""},{"rule":"unique","args":"certification","on":"","message":""}]', 1, 'VARCHAR', '16', '', 1, 0, 0, 1, 0, '', 'truename', 1, 1616259055, 1616335161), (NULL, 'id_card', '身份证', 30, 'text', '', '', '', '', '', '', '', '{"width":"200"}', '1', '', '', '', '', '[{"rule":"require","args":"","on":"0","message":""},{"rule":"idCard","args":"","on":"0","message":""}]', 1, 'VARCHAR', '32', '', 1, 0, 0, 1, 0, '', 'mobile', 1, 1616259104, 1616331356), (NULL, 'id_card_front', '身份证正面', 30, 'image', '', '', '', '', '', '', 'file', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'id_card', 1, 1616259199, 1616259199), (NULL, 'id_card_back', '身份证背面', 30, 'image', '', '', '', '', '', '', 'file', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'id_card_front', 1, 1616259237, 1616259237), (NULL, 'is_cert', '通过', 30, 'none', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'id_card_back', 1, 1616259382, 1616331219), (NULL, 'id', 'ID', 31, 'hidden', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '10', 'none', 1, 1, 1, 1, 0, '', '', 0, 1618039195, 1618039195), (NULL, 'title', '审核模型', 31, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', '', 0, 1618039195, 1618039214), (NULL, 'content', '审核内容', 31, 'textarea', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'MEDIUMTEXT', '', '', 1, 0, 0, 1, 0, '', 'is_verify', 0, 1618039195, 1618039296), (NULL, 'admin_id', '管理员ID', 31, '', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, 'index', '', 0, 1618039195, 1618039195), (NULL, 'create_time', '创建日期', 31, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1618039195, 1618039195), (NULL, 'update_time', '修改日期', 31, '', '', '', '', '', '', '', '', '{"width":"144"}', '', '', '', '', '', '', 1, 'INT', '10', '0', 1, 1, 0, 1, 0, '', '', 0, 1618039195, 1618039195), (NULL, 'foreign_id', '模型ID', 31, 'number', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'INT', '', '0', 1, 0, 0, 1, 0, '', 'title', 1, 1618039239, 1618039239), (NULL, 'is_verify', '审核状态', 31, 'checker', '', '', '', '', '', '', 'checker.show', '', '', '', '', '', '', '', 1, 'TINYINT', '1', '0', 1, 1, 0, 1, 0, '', 'foreign_id', 1, 1618039264, 1618039264), (NULL, 'msg', '内容提示', 31, 'textarea', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'result', 1, 1618039323, 1618039393), (NULL, 'words', '不合格字符', 31, 'textarea', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'msg', 1, 1618039345, 1618039345), (NULL, 'result', '返回结果', 31, 'textarea', '', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'TEXT', '', 'none', 1, 0, 0, 1, 0, '', 'content', 1, 1618039385, 1618039385); ~~~ ## 2.0.3升级到2.0.4 替换/woo目录 替换/public/static/woo目录 替换/config/woo.php文件(重要) 替换/config/wooauth.php文件 复制/app/common/builder目录(重要) composer依赖,请自行composer update升级 升级前做好备份 SQL执行,前缀请自行修改(把`woo_`替换为你的前缀): ``` CREATE TABLE `woo_sensitive` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否审核', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', `delete_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '删除日期', PRIMARY KEY (`id`), KEY `admin_id` (`admin_id`), KEY `delete_time` (`delete_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='敏感词' AUTO_INCREMENT=1 ; CREATE TABLE `woo_addon` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `name` varchar(64) NOT NULL DEFAULT '' COMMENT '插件目录', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `author` varchar(64) NOT NULL DEFAULT '' COMMENT '作者', `version` varchar(64) NOT NULL DEFAULT '' COMMENT '版本', `is_verify` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否审核', `is_disuninstall` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '禁止卸载', `describe` text NOT NULL COMMENT '插件描述', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `is_verify` (`is_verify`), KEY `admin_id` (`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='插件'; CREATE TABLE `woo_addon_setting` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID', `title` varchar(128) NOT NULL DEFAULT '' COMMENT '标题', `addon_id` int(11) NOT NULL DEFAULT '0' COMMENT '插件ID', `var` varchar(64) NOT NULL DEFAULT '' COMMENT '变量名', `value` text NOT NULL COMMENT '数据', `type` varchar(64) NOT NULL DEFAULT '' COMMENT '输入类型', `options` varchar(512) NOT NULL DEFAULT '' COMMENT '选项', `tip` varchar(128) NOT NULL DEFAULT '' COMMENT '提示', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`), KEY `list_order` (`list_order`), KEY `addon_id` (`addon_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='插件配置'; DROP TABLE `woo_region`; CREATE TABLE IF NOT EXISTS `woo_region` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父级', `title` varchar(64) NOT NULL DEFAULT '' COMMENT '名称', `code` int(11) NOT NULL DEFAULT '0' COMMENT '代码编号', `pinyin` varchar(64) NOT NULL DEFAULT '' COMMENT '拼音', `jianpin` varchar(64) NOT NULL DEFAULT '' COMMENT '简拼', `first` char(2) NOT NULL DEFAULT '' COMMENT '首字母', `list_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序权重', `children_count` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下级数', `family` varchar(128) NOT NULL DEFAULT '' COMMENT '家族', `level` tinyint(4) NOT NULL DEFAULT '0' COMMENT '层级', `lng` decimal(9,6) NOT NULL DEFAULT '0.000000' COMMENT '经度', `lat` decimal(9,6) NOT NULL DEFAULT '0.000000' COMMENT '纬度', PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地区' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `woo_request_log` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID', `appname` varchar(32) NOT NULL DEFAULT '' COMMENT '应用/插件名', `admin_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '管理员ID', `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '会员ID', `controller` varchar(64) NOT NULL DEFAULT '' COMMENT '控制器', `action` varchar(64) NOT NULL DEFAULT '' COMMENT '方法', `url` varchar(255) NOT NULL DEFAULT '' COMMENT 'URL地址', `method` varchar(32) NOT NULL DEFAULT '' COMMENT '请求方法', `args` varchar(10240) NOT NULL DEFAULT '' COMMENT '数据', `ip` varchar(64) NOT NULL DEFAULT '' COMMENT 'IP地址', `region` varchar(128) NOT NULL DEFAULT '' COMMENT '请求地址', `isp` varchar(64) NOT NULL DEFAULT '' COMMENT '网络ISP', `user_agent` varchar(255) NOT NULL DEFAULT '' COMMENT '客户端', `referer` varchar(255) NOT NULL DEFAULT '' COMMENT '来源', `code` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态码', `create_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建日期', `update_time` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '修改日期', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='请求日志' AUTO_INCREMENT=1 ; ALTER TABLE `woo_field` CHANGE `is_contribute` `is_contribute` TINYINT NOT NULL DEFAULT '0'; ALTER TABLE `woo_admin_group` ADD `dashboard` VARCHAR(128) NOT NULL DEFAULT '' COMMENT '主面板URL' AFTER `title` ; ALTER TABLE `woo_admin_group` ADD `data_allow` tinyint(4) NOT NULL DEFAULT '0' COMMENT '数据权限' AFTER `dashboard`; ALTER TABLE `woo_admin_group` ADD `custom_data_allow` varchar(128) NOT NULL DEFAULT '' COMMENT '自定义权限' AFTER `dashboard`; ALTER TABLE `woo_admin_login` ADD `region` varchar(128) NOT NULL DEFAULT '' COMMENT '登录地址'; ALTER TABLE `woo_log` ADD `region` varchar(128) NOT NULL DEFAULT '' COMMENT '操作地址'; ALTER TABLE `woo_log` ADD `isp` varchar(64) NOT NULL DEFAULT '' COMMENT '网络ISP'; INSERT INTO `woo_field` (`id`, `field`, `name`, `model_id`, `form`, `form_foreign`, `form_item_attrs`, `form_tag_attrs`, `form_options`, `form_upload`, `form_trigger`, `list`, `list_attrs`, `list_filter`, `list_filter_attrs`, `list_filter_tag_attrs`, `detail`, `detail_attrs`, `validate`, `is_field`, `type`, `length`, `default`, `is_not_null`, `is_unsigned`, `is_ai`, `is_system`, `is_contribute`, `index`, `after`, `admin_id`, `create_time`, `update_time`) VALUES (NULL, 'dashboard', '主面板URL', 5, 'text', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'title', 1, 1607440781, 1607440781), (NULL, 'data_allow', '数据权限', 5, 'select', '', '', '', '{\"0\":\"全部数据权限\",\"1\":\"仅本人数据权限\",\"2\":\"本部门数据权限\",\"3\":\"部门及以下数据权限\",\"4\":\"自定义数据权限\"}', '', '{\"4\":\"custom_data_allow\"}', '', '', '', '', '', '', '', '', 1, 'TINYINT', '', '0', 1, 0, 0, 1, 0, '', 'dashboard', 1, 1607517554, 1607527051), (NULL, 'custom_data_allow', '自定义权限', 5, 'xmtree', 'Department', '', '', '', '', '', '0', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'data_allow', 1, 1607517722, 1607519501), (NULL, 'region', '登录地址', 8, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'user_agent', 1, 1608974680, 1608974680), (NULL, 'region', '操作地址', 9, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '128', '', 1, 0, 0, 1, 0, '', 'ip', 1, 1608974735, 1608974735), (NULL, 'isp', '网络ISP', 9, 'none', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, 'VARCHAR', '64', '', 1, 0, 0, 1, 0, '', 'region', 1, 1608974827, 1608974827); ``` 插件栏目自行添加: ![](https://img.kancloud.cn/0c/a0/0ca01102a482cb66cde49c65a00b8684_921x481.png) 如果需要使用地区数据,请导入新版中的data/region.sql文件 ## 2.0.1升级到2.0.2 替换/woo目录,替换/public/woo目录 composer依赖,请自行composer update升级 升级前做好备份