rt-sim-training-service/sql/20210607-sheng.sql

20 lines
845 B
MySQL
Raw Normal View History

ALTER TABLE `sys_user` RENAME `sys_account`;
ALTER TABLE `sys_user_login` RENAME `sys_account_login`;
ALTER TABLE `sys_account`
ADD COLUMN `type` varchar(2) NOT NULL DEFAULT 1 COMMENT '账号类型1-个人账户2-企业账户' AFTER `account`;
ALTER TABLE `sys_account`
DROP COLUMN `offline`;
ALTER TABLE `sys_account`
MODIFY COLUMN `account` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账户' AFTER `id`;
ALTER TABLE `sys_account`
MODIFY COLUMN `type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1' COMMENT '账号类型1-个人账户2-企业账户3-企业账户下子账户' AFTER `account`;
ALTER TABLE `sys_account`
ADD COLUMN `parent_account` varchar(32) NULL COMMENT '父企业账户account,当为企业子账户时不能为空' AFTER `account`;