weideguo commented on issue #17022:
URL: 
https://github.com/apache/dolphinscheduler/issues/17022#issuecomment-2665299065

   something wrong at 
[resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql](https://github.com/apache/dolphinscheduler/blob/3.2.2-release/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql#L19-L38)
   I think it should be 
   ``` sql
   drop PROCEDURE if EXISTS dolphin_t_ds_tenant_insert_default;
   delimiter d//
   CREATE PROCEDURE dolphin_t_ds_tenant_insert_default()
   BEGIN
       IF
   NOT EXISTS(SELECT 1
                      FROM t_ds_tenant
                      WHERE id = -1)
       THEN
           INSERT INTO `t_ds_tenant` VALUES ('-1', 'default', 'default tenant', 
'1', current_timestamp, current_timestamp);
   END IF;
   END;
   d//
   
   delimiter ;
   
   -- 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');
   
   CALL dolphin_t_ds_tenant_insert_default();
   DROP PROCEDURE dolphin_t_ds_tenant_insert_default;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to