From 1bdc23c35d3e5e217dcea9e5e09823a4099a4a65 Mon Sep 17 00:00:00 2001 From: greysonfang Date: Fri, 20 Sep 2024 15:37:07 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Aoauth2=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=A8=A1=E5=BC=8F=20#10663?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/2003_v2.x/2020_ci_auth-update_v2.0_mysql.sql | 9 --------- .../sql/2004_v3.x/2030_ci_auth-update_v3.0_mysql.sql | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/support-files/sql/2003_v2.x/2020_ci_auth-update_v2.0_mysql.sql b/support-files/sql/2003_v2.x/2020_ci_auth-update_v2.0_mysql.sql index 25ed241e107..b45050d3ff5 100644 --- a/support-files/sql/2003_v2.x/2020_ci_auth-update_v2.0_mysql.sql +++ b/support-files/sql/2003_v2.x/2020_ci_auth-update_v2.0_mysql.sql @@ -83,15 +83,6 @@ BEGIN AND COLUMN_NAME = 'GROUP_TYPE') THEN ALTER TABLE T_AUTH_RESOURCE_GROUP_CONFIG ADD COLUMN `GROUP_TYPE` Int(2) NOT NULL DEFAULT 0 COMMENT '用户组类型 0-默认组 1-自定义组' AFTER `CREATE_MODE`; END IF; - - IF NOT EXISTS(SELECT 1 - FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = db - AND TABLE_NAME = 'T_AUTH_OAUTH2_ACCESS_TOKEN' - AND COLUMN_NAME = 'PASS_WORD') THEN - ALTER TABLE T_AUTH_OAUTH2_ACCESS_TOKEN ADD COLUMN `PASS_WORD` VARCHAR(64) DEFAULT NULL COMMENT '用于密码模式' AFTER `USER_NAME`; - END IF; - COMMIT; END DELIMITER ; diff --git a/support-files/sql/2004_v3.x/2030_ci_auth-update_v3.0_mysql.sql b/support-files/sql/2004_v3.x/2030_ci_auth-update_v3.0_mysql.sql index 1b26f5c6463..dd612f62c83 100644 --- a/support-files/sql/2004_v3.x/2030_ci_auth-update_v3.0_mysql.sql +++ b/support-files/sql/2004_v3.x/2030_ci_auth-update_v3.0_mysql.sql @@ -30,6 +30,14 @@ BEGIN ADD COLUMN `IAM_TEMPLATE_ID` int(20) DEFAULT NULL COMMENT '人员模板ID'; END IF; + IF NOT EXISTS(SELECT 1 + FROM information_schema.COLUMNS + WHERE TABLE_SCHEMA = db + AND TABLE_NAME = 'T_AUTH_OAUTH2_ACCESS_TOKEN' + AND COLUMN_NAME = 'PASS_WORD') THEN + ALTER TABLE T_AUTH_OAUTH2_ACCESS_TOKEN ADD COLUMN `PASS_WORD` VARCHAR(64) DEFAULT NULL COMMENT '用于密码模式' AFTER `USER_NAME`; + END IF; + COMMIT; END DELIMITER ;