EricPyZhou commented on code in PR #12076:
URL: https://github.com/apache/dolphinscheduler/pull/12076#discussion_r976525897


##########
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql:
##########
@@ -790,6 +790,22 @@ CREATE TABLE `t_ds_resources` (
 -- Records of t_ds_resources
 -- ----------------------------
 
+-- ----------------------------
+-- Table structure for t_ds_relation_resources_task
+-- ----------------------------
+DROP TABLE IF EXISTS `t_ds_relation_resources_task`;
+CREATE TABLE `t_ds_relation_resources_task` (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'key',
+  `full_name` varchar(255) DEFAULT NULL,
+  `type` tinyint DEFAULT NULL COMMENT 'resource type,0:FILE,1:UDF',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `t_ds_relation_resources_task_un` (`full_name`,`type`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3

Review Comment:
   > I think this table is about resources, not the relation between task and 
resources. Why not create this table like this, and then we can remove the 
`resource_ids_new` field in `t_ds_task_definition`
   
   It is a relation between tasks and resources because we store resources into 
this table only when a task uses them.
   
   Having a `task_id` field in table definitely helps a lot! I will make some 
changes based on this new field.



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