You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/08/03 12:57:30 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a change in pull request #5942: [Fix-5875][API] When I saved the task that had the same name task in another flow ,the service would throw DuplicateKeyException.

ruanwenjun commented on a change in pull request #5942:
URL: https://github.com/apache/dolphinscheduler/pull/5942#discussion_r681731751



##########
File path: sql/dolphinscheduler_mysql.sql
##########
@@ -471,7 +471,7 @@ CREATE TABLE `t_ds_task_definition` (
   `create_time` datetime NOT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`,`code`),
-  UNIQUE KEY `task_unique` (`name`,`project_code`) USING BTREE
+  UNIQUE KEY `task_unique` (`code`,`project_code`) USING BTREE

Review comment:
       It seems the `code` is generated by a snowflake algorithm, we may don't need to add such a unique key.




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org