rt-sim-training-service/sql/20210607-sheng.sql
2021-06-08 16:08:33 +08:00

20 lines
845 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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`;