qingwli commented on code in PR #14406:
URL: 
https://github.com/apache/dolphinscheduler/pull/14406#discussion_r1246041790


##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_dml.sql:
##########
@@ -37,3 +37,48 @@ DROP PROCEDURE dolphin_t_ds_tenant_insert_default;
 -- tenant improvement
 UPDATE t_ds_schedules t1 JOIN t_ds_process_definition t2 ON 
t1.process_definition_code = t2.code LEFT JOIN t_ds_tenant t3 ON t2.tenant_id = 
t3.id SET t1.tenant_code = COALESCE(t3.tenant_code, 'default');
 UPDATE `t_ds_process_instance` SET `tenant_code` = 'default' WHERE 
`tenant_code` IS NULL;
+
+-- data quality support choose database
+INSERT IGNORE INTO `t_ds_dq_rule_input_entry`

Review Comment:
   We used insert ignore init can avoid this issue in 
[Mysql](https://dev.mysql.com/doc/refman/5.7/en/insert.html), But in pg sql we 
need to use other ways like `INSERT ... ON CONFLICT DO NOTHING/UPDATE 
("UPSERT")` 
[refer](https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.5#INSERT_..._ON_CONFLICT_DO_NOTHING.2FUPDATE_.28.22UPSERT.22.29)



-- 
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