优化
This commit is contained in:
@@ -12,6 +12,7 @@ CREATE TABLE IF NOT EXISTS auth_account (
|
||||
failed_login_count INT NOT NULL DEFAULT 0 COMMENT '连续登录失败次数',
|
||||
locked_until DATETIME(3) DEFAULT NULL COMMENT '临时锁定截止时间',
|
||||
token_version INT NOT NULL DEFAULT 1 COMMENT '令牌版本,递增后可使历史令牌失效',
|
||||
password_change_required TINYINT NOT NULL DEFAULT 0 COMMENT '管理员重置后是否强制下次登录改密',
|
||||
default_tenant_id BIGINT NOT NULL COMMENT '默认业务租户ID',
|
||||
operator_tenant_id BIGINT NOT NULL COMMENT '操作主体租户ID,平台端与商户端身份隔离',
|
||||
default_membership_id BIGINT DEFAULT NULL COMMENT '默认租户成员关系ID',
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
USE baiyue_auth;
|
||||
|
||||
SET @add_password_change_required = IF(
|
||||
EXISTS(SELECT 1 FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'auth_account'
|
||||
AND column_name = 'password_change_required'),
|
||||
'SELECT 1',
|
||||
'ALTER TABLE auth_account ADD COLUMN password_change_required TINYINT NOT NULL DEFAULT 0 COMMENT ''管理员重置后是否强制下次登录改密'' AFTER token_version');
|
||||
PREPARE phase1_customer_account_sql FROM @add_password_change_required;
|
||||
EXECUTE phase1_customer_account_sql;
|
||||
DEALLOCATE PREPARE phase1_customer_account_sql;
|
||||
Reference in New Issue
Block a user