3.0.0升级到3.1.0增量脚本sql 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- 第三方用户表应该加上创建人,创建时间、修改人、修改时间
  2. ALTER TABLE `sys_third_account`
  3. ADD COLUMN `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称' AFTER `third_user_id`,
  4. ADD COLUMN `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期' AFTER `create_by`,
  5. ADD COLUMN `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称' AFTER `create_time`,
  6. ADD COLUMN `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新日期' AFTER `update_by`;
  7. -- online 表单字段db类型,区分年月日和年月日时分秒
  8. UPDATE onl_cgform_field SET db_type = 'Datetime' where db_type = 'Date';
  9. -- 对象存储字段太短
  10. ALTER TABLE `oss_file`
  11. MODIFY COLUMN `url` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件地址' AFTER `file_name`;
  12. -- 地址获取到多个地址, 地址过长导致权限菜单修改失败
  13. ALTER TABLE `sys_role_permission`
  14. MODIFY COLUMN `operate_ip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作ip' AFTER `operate_date`;
  15. -- 修改 sys_permission 下的两个字段为 tinyint 类型
  16. ALTER TABLE `sys_permission`
  17. MODIFY COLUMN `hidden` tinyint(1) NULL DEFAULT 0 COMMENT '是否隐藏路由: 0否,1是' AFTER `keep_alive`,
  18. MODIFY COLUMN `hide_tab` tinyint(1) NULL DEFAULT NULL COMMENT '是否隐藏tab: 0否,1是' AFTER `hidden`;
  19. -- 默认示例,内嵌百度改成jeecg.com官网
  20. UPDATE sys_permission SET name = 'JEECG官方网站' , url = 'http://www.jeecg.com' WHERE id = 'a400e4f4d54f79bf5ce160ae432231af';
  21. -- 菜单名和代码改名 erp风格
  22. UPDATE `sys_permission` SET `parent_id` = '2a470fc0c3954d9dbb61de6d80846549', `name` = '一对多erp风格示例', `url` = '/jeecg/tablist/JeecgOrderDMainList', `component` = 'jeecg/tablist/JeecgOrderDMainList', `component_name` = NULL, `redirect` = NULL, `menu_type` = 1, `perms` = NULL, `perms_type` = NULL, `sort_no` = 2.00, `always_show` = 0, `icon` = NULL, `is_route` = 1, `is_leaf` = 1, `keep_alive` = 0, `hidden` = 0, `description` = NULL, `status` = NULL, `del_flag` = 0, `rule_flag` = 0, `create_by` = 'admin', `create_time` = '2019-02-20 14:45:09', `update_by` = 'admin', `update_time` = '2022-01-17 17:02:51', `internal_or_external` = 0, `hide_tab` = '0' WHERE `id` = '6ad53fd1b220989a8b71ff482d683a5a';
  23. -- 分类字典 列表页 显示数据id
  24. UPDATE sys_category SET code='B01-2-3' WHERE id='1404629269499936770';
  25. UPDATE sys_category SET code='B01-2-2' WHERE id='937fd2e9aa13b8bab1da1ca36d3fd344';
  26. -- 新的表格合计菜单
  27. INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `status`, `del_flag`, `rule_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `internal_or_external`, `hide_tab`) VALUES ('1494641317580423169', '2a470fc0c3954d9dbb61de6d80846549', '表格合计News', '/jeecg/tableOrderTotal', 'jeecg/TableOrderTotal', NULL, NULL, 1, NULL, '1', 3.00, 0, NULL, 1, 1, 0, 0, NULL, '1', 0, 0, 'admin', '2022-02-18 19:53:54', 'admin', '2022-02-18 19:55:04', 0, '0');
  28. -- online老数据,存在字符串类型key值不一致的情况,String改为string
  29. UPDATE onl_cgform_field SET db_type = 'string' where binary db_type = 'String';