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 2022/09/21 13:42:35 UTC

[GitHub] [dolphinscheduler] EricPyZhou commented on a diff in pull request #12076: [Feature-10495][Resource Center] Resource Center Refactor

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

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