数据库表结构去掉自增主键:sys_config、sys_notice、sys_post、sys_dict_type、sys_dict_data、sys_dept

This commit is contained in:
dataprince 2023-10-01 11:23:08 +08:00
parent 50da2f8224
commit c23d23159a

View File

@ -537,5 +537,21 @@ ALTER TABLE `sys_user` CHANGE COLUMN `sex` `gender` CHAR(1) NULL DEFAULT '0' COM
ALTER TABLE `sys_dept` ALTER TABLE `sys_dept`
CHANGE COLUMN `del_flag` `del_flag` CHAR(1) NULL DEFAULT '0' COMMENT '删除标志0代表存在 1代表删除' COLLATE 'utf8mb4_bin' AFTER `status`; CHANGE COLUMN `del_flag` `del_flag` CHAR(1) NULL DEFAULT '0' COMMENT '删除标志0代表存在 1代表删除' COLLATE 'utf8mb4_bin' AFTER `status`;
-- 数据库表去掉自增主键:
ALTER TABLE `sys_role` ALTER TABLE `sys_role`
CHANGE COLUMN `role_id` `role_id` BIGINT(19) NOT NULL COMMENT '角色ID' FIRST; 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`;