This is an automated email from the ASF dual-hosted git repository.
wenjun pushed a commit to branch 3.2.2-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/3.2.2-prepare by this push:
new 3cdf754b1b Fix admin login tenant unspecified issue after upgrade to
v3.2.1 (#16064) (#16185)
3cdf754b1b is described below
commit 3cdf754b1b935ef1a594c2ec3cd235bf3b9d9a30
Author: xiangzihao <[email protected]>
AuthorDate: Thu Jun 20 13:44:28 2024 +0800
Fix admin login tenant unspecified issue after upgrade to v3.2.1 (#16064)
(#16185)
---
.../resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql | 3 +++
.../sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_dml.sql | 3 +++
2 files changed, 6 insertions(+)
diff --git
a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql
b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql
index e5d97fab94..21189c77a3 100644
---
a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql
+++
b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql
@@ -30,6 +30,9 @@ END IF;
END;
d//
+-- If the admin account is not associated with a tenant, the admin's tenant
will be set to the default tenant.
+UPDATE `t_ds_user` SET `tenant_id` = '-1' WHERE (`user_name` = 'admin') AND
(`tenant_id` = '0');
+
delimiter ;
CALL dolphin_t_ds_tenant_insert_default();
DROP PROCEDURE dolphin_t_ds_tenant_insert_default;
diff --git
a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_dml.sql
b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_dml.sql
index 482b317a60..f47d16f7c7 100644
---
a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_dml.sql
+++
b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_dml.sql
@@ -21,6 +21,9 @@ INSERT INTO t_ds_tenant(id, tenant_code, description,
queue_id, create_time, upd
UPDATE t_ds_schedules as t1 SET tenant_code = COALESCE(t3.tenant_code,
'default') FROM t_ds_process_definition as t2 LEFT JOIN t_ds_tenant t3 ON
t2.tenant_id = t3.id WHERE t1.process_definition_code = t2.code;
UPDATE t_ds_process_instance SET tenant_code = 'default' WHERE tenant_code IS
NULL;
+-- If the admin account is not associated with a tenant, the admin's tenant
will be set to the default tenant.
+UPDATE t_ds_user SET tenant_id = '-1' WHERE (user_name = 'admin') AND
(tenant_id = '0');
+
-- data quality support choose database
INSERT INTO t_ds_dq_rule_input_entry
(id, field, "type", title, value, "options", placeholder, option_source_type,
value_type, input_type, is_show, can_edit, is_emit, is_validate, create_time,
update_time)