diff --git a/sql/update.sql b/sql/update.sql index f7685cc..f54ba71 100644 --- a/sql/update.sql +++ b/sql/update.sql @@ -537,5 +537,21 @@ ALTER TABLE `sys_user` CHANGE COLUMN `sex` `gender` CHAR(1) NULL DEFAULT '0' COM ALTER TABLE `sys_dept` CHANGE COLUMN `del_flag` `del_flag` CHAR(1) NULL DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)' COLLATE 'utf8mb4_bin' AFTER `status`; +-- 数据库表去掉自增主键: ALTER TABLE `sys_role` CHANGE COLUMN `role_id` `role_id` BIGINT(19) NOT NULL COMMENT '角色ID' FIRST; +ALTER TABLE `sys_config` + CHANGE COLUMN `config_id` `config_id` BIGINT(19) NOT NULL COMMENT '参数主键' FIRST; +ALTER TABLE `sys_notice` + CHANGE COLUMN `notice_id` `notice_id` BIGINT(19) NOT NULL COMMENT '公告ID' FIRST; +ALTER TABLE `sys_post` + CHANGE COLUMN `post_id` `post_id` BIGINT(19) NOT NULL COMMENT '岗位ID' FIRST; +ALTER TABLE `sys_dict_type` + CHANGE COLUMN `dict_id` `dict_id` BIGINT(19) NOT NULL COMMENT '字典主键' FIRST; +ALTER TABLE `sys_dict_data` + CHANGE COLUMN `dict_code` `dict_code` BIGINT(19) NOT NULL COMMENT '字典编码' FIRST; +ALTER TABLE `sys_dept` + CHANGE COLUMN `dept_id` `dept_id` BIGINT(19) NOT NULL COMMENT '部门id' FIRST; +ALTER TABLE `sys_dept` + CHANGE COLUMN `ancestors` `ancestors` VARCHAR(760) NULL DEFAULT '' COMMENT '祖级列表' COLLATE 'utf8mb4_bin' AFTER `parent_id`; +