20 lines
845 B
SQL
20 lines
845 B
SQL
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`;
|
||
|