WeCenter4.0.2之前版本缺失sql补充下载

技术-安辰
技术-安辰 这家伙很懒,还没有设置简介

1 人点赞了该文章 · 1014 浏览

后台升级的用户需手动执行以下sql,

注意若您的数据库前缀不为aws_请更改aws_ 为你数据库的前缀


/*20220601*/
UPDATE `aws_config` SET `name` = 'url_rewrite', `group` = '1', `title` = 'URL规则', `tips` = '一行一条规则,使用规则\"重写规则===实际url\",具体配置可查看<a href=\"https://www.kancloud.cn/manual/thinkphp6_0/1037495\" target=\"_blank\">TP6路由</a>', `type` = 'textarea', `value` = 'explore/[:sort]===index/index\r\nquestion/:id-[:answer][:sort]===question/detail\r\nquestions/[:sort]-[:category_id]===question/index\r\narticle/:id===article/detail\r\narticles/[:sort]-[:category_id]===article/index\r\npublish/question/[:id]===question/publish\r\npublish/article/[:id]===article/publish\r\ncolumns/[:page]===column/index\r\ncolumn/detail/:id===column/detail\r\nc/collect/:id===column/collect\r\ntopics/[:type]-[:page]===topic/index\r\ntopic/:id-[:type]-[:sort]===topic/detail\r\nactions/logs===topic/logs\r\nselect/topic===topic/select\r\nremove/topic/[:id]===topic/remove_topic\r\nmanager/topic/[:id]===topic/manager\r\npeople/:name/[:type]===people/index\r\npeoples/[:page]===people/lists\r\ncreator/===creator/index\r\nactions/article/[:article_id]-[:type]-[:is_recommend]===article/action\r\nremove/article/[:id]===article/remove_article\r\npreview/article===article/preview\r\nanswer/save===question/save_answer\r\nremove/question/[:id]===question/remove_question\r\nactions/question/[:id]-[:type]===question/manager', `option` = '[]', `sort` = 51, `settings` = NULL, `system` = 1 WHERE `id` = 54;

/*20220602*/
UPDATE `aws_verify_field` SET `name` = 'real_name', `verify_type` = 'personal', `title` = '真实姓名', `tips` = '填写您的真实姓名', `type` = 'text', `value` = '', `option` = '[]', `sort` = 0, `create_time` = 1621141649, `update_time` = 0 WHERE `id` = 1;
UPDATE `aws_verify_field` SET `name` = 'card', `verify_type` = 'personal', `title` = '身份证', `tips` = '填写身份证号码', `type` = 'text', `value` = '', `option` = '[]', `sort` = 0, `create_time` = 1621141718, `update_time` = 0 WHERE `id` = 2;
UPDATE `aws_verify_field` SET `name` = 'mobile', `verify_type` = 'personal', `title` = '联系方式', `tips` = '', `type` = 'text', `value` = '', `option` = '[]', `sort` = 0, `create_time` = 1621141759, `update_time` = 0 WHERE `id` = 3;
UPDATE `aws_verify_field` SET `name` = 'remark', `verify_type` = 'personal', `title` = '认证说明', `tips` = '', `type` = 'textarea', `value` = '', `option` = '[]', `sort` = 0, `create_time` = 1621141784, `update_time` = 0 WHERE `id` = 4;

INSERT INTO `aws_users_notify_setting` (`name`, `title`, `group`, `subject`, `message`, `type`, `user_setting`, `extends`, `status`, `system`) VALUES ('DIY_NOTIFY', '自定义通知', 'TYPE_SYSTEM_NOTIFY', '', '', 'site', 0, NULL, 1, 1);

/*20220605*/
ALTER TABLE `aws_question`
ADD COLUMN `url_token` varchar(255) NULL;

ALTER TABLE `aws_article`
ADD COLUMN `url_token` varchar(255) NULL;

/*20220608*/
DELETE FROM `aws_config` where `name`='upload_url';

ALTER TABLE `aws_users` ADD COLUMN `forbidden_ip` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1-已封禁ip';
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`)
VALUES (3, 'forbidden', '封禁管理', 1, 1, '', 0, 1, 'fa fa-ban', 0, 0, '', 'system');
SET @pid=LAST_INSERT_ID();
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`)
VALUES (@pid, 'member.Forbidden/ips', '封禁IP', 1, 1, '', 0, 1, 'fa fa-ban', 0, 0, '', 'system');

CREATE TABLE IF NOT EXISTS `aws_wechat_account` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(60) NOT NULL DEFAULT '' COMMENT '公众号名称',
`app_id` varchar(50) NOT NULL DEFAULT '' COMMENT 'appID',
`app_secret` varchar(50) NOT NULL DEFAULT '' COMMENT 'appSecret',
`origin_id` varchar(64) NOT NULL DEFAULT '' COMMENT '公众号原始ID',
`aes_key` varchar(100) NOT NULL DEFAULT '' COMMENT 'EncodingAESKey,兼容与安全模式下请一定要填写!!!',
`logo` char(255) NOT NULL COMMENT '公众号LOGO',
`token` char(255) NOT NULL COMMENT 'token',
`related` varchar(200) NOT NULL DEFAULT '' COMMENT '微信对接地址',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型 1 普通订阅号2认证订阅号 3普通服务号 4认证服务号/认证媒体/政府订阅号',
`qrcode` varchar(200) NOT NULL DEFAULT '' COMMENT '公众号二维码',
`status` tinyint(1) DEFAULT '1' COMMENT '微信接入状态,0待接入1已接入',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`update_time` int(11) NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='微信公众帐号';

INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (5, 'wechat', '微信管理', 1, 1, '', 0, 1, 'fab fa-weixin', 0, 0, '', 'system');
SET @parent_pid=LAST_INSERT_ID();
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@parent_pid, 'wechat.Account/index', '账号管理', 1, 1, '', 0, 1, 'fas fa-users', 0, 0, '', 'system');
SET @pid=LAST_INSERT_ID();
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@pid, 'wechat.Account/add', '操作-添加', 1, 0, '', 0, 1, 'fa fa-folder', 0, 0, '', 'system');
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@pid, 'wechat.Account/edit', '操作-编辑', 1, 0, '', 0, 1, 'fa fa-folder', 0, 0, '', 'system');
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@pid, 'wechat.Account/delete', '操作-删除', 1, 0, '', 0, 1, 'fa fa-folder', 0, 0, '', 'system');

UPDATE `aws_users_notify_setting` SET `name` = 'TYPE_SYSTEM_NOTIFY', `title` = '新用户注册欢迎', `group` = 'TYPE_SYSTEM_NOTIFY', `subject` = '亲爱的用户您好,欢迎注册[#site_name#]', `message` = '尊敬的[#user_name#],您已经注册成为[#site_name#]的会员,请您在发表言论时,遵守当地法律法规。如果您有什么疑问可以联系管理员。', `type` = 'site,email', `user_setting` = 0, `extends` = NULL, `status` = 1, `system` = NULL WHERE `id` = 3;

INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (4, 'extend.Token/index', '接口请求', 1, 1, '', 61, 1, 'fa fa-anchor', 0, 0, '', 'system');
SET @pid=LAST_INSERT_ID();
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@pid, 'extend.Token/delete', '操作-删除', 0, 0, '', 5, 1, '', 0, 0, '', 'system');
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@pid, 'extend.Token/add', '操作-添加', 1, 0, '', 7, 1, '', 0, 0, '', 'system');
INSERT INTO `aws_admin_auth` (`pid`, `name`, `title`, `type`, `status`, `condition`, `sort`, `auth_open`, `icon`, `create_time`, `update_time`, `param`, `group`) VALUES (@pid, 'extend.Token/edit', '操作-删除', 1, 0, '', 61, 1, 'fa fa-link', 0, 0, '', 'system');

ALTER TABLE `aws_topic`
ADD COLUMN `is_parent` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否是根话题';

UPDATE `aws_config` SET `group` = '8' WHERE `name` = 'topic_enable';
INSERT INTO `aws_config` (`name`, `group`, `title`, `tips`, `type`, `value`, `option`, `sort`, `settings`, `system`) VALUES ('max_topic_select', '9', '话题最多选择数量', '话题最多选择数量', 'number', '5', '', 51, '', 1);

ALTER TABLE `aws_users` ADD COLUMN `client` varchar(32) NOT NULL DEFAULT 'pc';



发布于 2022-07-02 17:41

免责声明:

本文由 技术-安辰 原创发布于 WeCenter ,著作权归作者所有。

登录一下,更多精彩内容等你发现,贡献精彩回答,参与评论互动

登录! 还没有账号?去注册

暂无评论