Browse Source

mysql and postgresql checkpoint full scale table modify

qiaozhanwei 5 years ago
parent
commit
eacc66d95d

+ 7 - 15
sql/dolphinscheduler-postgre.sql

@@ -283,18 +283,6 @@ CREATE TABLE t_ds_error_command (
 -- Table structure for table t_ds_master_server
 --
 
-DROP TABLE IF EXISTS t_ds_master_server;
-CREATE TABLE t_ds_master_server (
-  id int NOT NULL  ,
-  host varchar(45) DEFAULT NULL ,
-  port int DEFAULT NULL ,
-  zk_directory varchar(64) DEFAULT NULL ,
-  res_info varchar(256) DEFAULT NULL ,
-  create_time timestamp DEFAULT NULL ,
-  last_heartbeat_time timestamp DEFAULT NULL ,
-  PRIMARY KEY (id)
-) ;
-
 --
 -- Table structure for table t_ds_process_definition
 --
@@ -320,6 +308,7 @@ CREATE TABLE t_ds_process_definition (
   tenant_id int NOT NULL DEFAULT '-1' ,
   update_time timestamp DEFAULT NULL ,
   modify_by varchar(36) DEFAULT '' ,
+  resource_ids varchar(64)
   PRIMARY KEY (id)
 ) ;
 
@@ -360,7 +349,7 @@ CREATE TABLE t_ds_process_instance (
   history_cmd text ,
   dependence_schedule_times text ,
   process_instance_priority int DEFAULT NULL ,
-  worker_group_id int DEFAULT '-1' ,
+  worker_group varchar(64) ,
   timeout int DEFAULT '0' ,
   tenant_id int NOT NULL DEFAULT '-1' ,
   PRIMARY KEY (id)
@@ -506,6 +495,9 @@ CREATE TABLE t_ds_resources (
   size bigint DEFAULT NULL ,
   create_time timestamp DEFAULT NULL ,
   update_time timestamp DEFAULT NULL ,
+  pid int,
+  full_name varchar(64),
+  is_directory int
   PRIMARY KEY (id)
 ) ;
 ;
@@ -527,7 +519,7 @@ CREATE TABLE t_ds_schedules (
   warning_type int NOT NULL ,
   warning_group_id int DEFAULT NULL ,
   process_instance_priority int DEFAULT NULL ,
-  worker_group_id int DEFAULT '-1' ,
+  worker_group varchar(64),
   create_time timestamp NOT NULL ,
   update_time timestamp NOT NULL ,
   PRIMARY KEY (id)
@@ -573,7 +565,7 @@ CREATE TABLE t_ds_task_instance (
   retry_interval int DEFAULT NULL ,
   max_retry_times int DEFAULT NULL ,
   task_instance_priority int DEFAULT NULL ,
-  worker_group_id int DEFAULT '-1' ,
+   worker_group varchar(64),
   executor_id int DEFAULT NULL ,
   PRIMARY KEY (id)
 ) ;

+ 171 - 85
sql/dolphinscheduler_mysql.sql

@@ -15,7 +15,7 @@
  * limitations under the License.
 */
 
-SET FOREIGN_KEY_CHECKS = 0;
+SET FOREIGN_KEY_CHECKS=0;
 
 -- ----------------------------
 -- Table structure for QRTZ_BLOB_TRIGGERS
@@ -29,7 +29,11 @@ CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_BLOB_TRIGGERS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_CALENDARS
@@ -40,7 +44,11 @@ CREATE TABLE `QRTZ_CALENDARS` (
   `CALENDAR_NAME` varchar(200) NOT NULL,
   `CALENDAR` blob NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_CALENDARS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_CRON_TRIGGERS
@@ -54,7 +62,11 @@ CREATE TABLE `QRTZ_CRON_TRIGGERS` (
   `TIME_ZONE_ID` varchar(80) DEFAULT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_CRON_TRIGGERS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_FIRED_TRIGGERS
@@ -81,7 +93,11 @@ CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
   KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
   KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_FIRED_TRIGGERS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_JOB_DETAILS
@@ -101,7 +117,11 @@ CREATE TABLE `QRTZ_JOB_DETAILS` (
   PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
   KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
   KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_JOB_DETAILS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_LOCKS
@@ -111,7 +131,11 @@ CREATE TABLE `QRTZ_LOCKS` (
   `SCHED_NAME` varchar(120) NOT NULL,
   `LOCK_NAME` varchar(40) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_LOCKS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_PAUSED_TRIGGER_GRPS
@@ -121,7 +145,11 @@ CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
   `SCHED_NAME` varchar(120) NOT NULL,
   `TRIGGER_GROUP` varchar(200) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_PAUSED_TRIGGER_GRPS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_SCHEDULER_STATE
@@ -133,7 +161,11 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE` (
   `LAST_CHECKIN_TIME` bigint(13) NOT NULL,
   `CHECKIN_INTERVAL` bigint(13) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_SCHEDULER_STATE
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_SIMPLE_TRIGGERS
@@ -148,7 +180,11 @@ CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
   `TIMES_TRIGGERED` bigint(10) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_SIMPLE_TRIGGERS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_SIMPROP_TRIGGERS
@@ -171,7 +207,11 @@ CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
   `BOOL_PROP_2` varchar(1) DEFAULT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, `TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_SIMPROP_TRIGGERS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for QRTZ_TRIGGERS
@@ -208,7 +248,11 @@ CREATE TABLE `QRTZ_TRIGGERS` (
   KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
   KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` (`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
   CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, `JOB_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of QRTZ_TRIGGERS
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_access_token
@@ -222,7 +266,11 @@ CREATE TABLE `t_ds_access_token` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_access_token
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_alert
@@ -242,7 +290,11 @@ CREATE TABLE `t_ds_alert` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_alert
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_alertgroup
@@ -256,14 +308,11 @@ CREATE TABLE `t_ds_alertgroup` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of t_ds_alertgroup
 -- ----------------------------
-BEGIN;
-INSERT INTO `t_ds_alertgroup` VALUES (1, 'default admin warning group', 0, 'default admin warning group', '2018-11-29 10:20:39', '2018-11-29 10:20:39');
-COMMIT;
 
 -- ----------------------------
 -- Table structure for t_ds_command
@@ -286,7 +335,11 @@ CREATE TABLE `t_ds_command` (
   `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
   `worker_group_id` int(11) DEFAULT '-1' COMMENT 'worker group id',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_command
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_datasource
@@ -302,7 +355,11 @@ CREATE TABLE `t_ds_datasource` (
   `create_time` datetime NOT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_datasource
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_error_command
@@ -329,19 +386,8 @@ CREATE TABLE `t_ds_error_command` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
 
 -- ----------------------------
+-- Records of t_ds_error_command
 -- ----------------------------
-DROP TABLE IF EXISTS `t_ds_master_server`;
-CREATE TABLE `t_ds_master_server` (
-  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
-  `host` varchar(45) DEFAULT NULL COMMENT 'ip',
-  `port` int(11) DEFAULT NULL COMMENT 'port',
-  `zk_directory` varchar(64) DEFAULT NULL COMMENT 'the server path in zk directory',
-  `res_info` varchar(256) DEFAULT NULL COMMENT 'json resource information:{"cpu":xxx,"memroy":xxx}',
-  `create_time` datetime DEFAULT NULL COMMENT 'create time',
-  `last_heartbeat_time` datetime DEFAULT NULL COMMENT 'last head beat time',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Table structure for t_ds_process_definition
@@ -366,10 +412,15 @@ CREATE TABLE `t_ds_process_definition` (
   `timeout` int(11) DEFAULT '0' COMMENT 'time out',
   `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
-  `modify_by` varchar(36) DEFAULT '' COMMENT 'modify user',
+  `modify_by` varchar(255) DEFAULT NULL,
+  `resource_ids` varchar(255) DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `process_definition_index` (`project_id`,`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_process_definition
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_process_instance
@@ -405,13 +456,17 @@ CREATE TABLE `t_ds_process_instance` (
   `history_cmd` text COMMENT 'history commands of process instance operation',
   `dependence_schedule_times` text COMMENT 'depend schedule fire time',
   `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest',
-  `worker_group_id` int(11) DEFAULT '-1' COMMENT 'worker group id',
+  `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
   `timeout` int(11) DEFAULT '0' COMMENT 'time out',
   `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id',
   PRIMARY KEY (`id`),
   KEY `process_instance_index` (`process_definition_id`,`id`) USING BTREE,
   KEY `start_time_index` (`start_time`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_process_instance
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_project
@@ -427,7 +482,11 @@ CREATE TABLE `t_ds_project` (
   `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'update time',
   PRIMARY KEY (`id`),
   KEY `user_id_index` (`user_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_project
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_queue
@@ -440,14 +499,12 @@ CREATE TABLE `t_ds_queue` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of t_ds_queue
 -- ----------------------------
-BEGIN;
-INSERT INTO `t_ds_queue` VALUES (1, 'default', 'default','2018-11-29 10:22:33', '2018-11-29 10:22:33');
-COMMIT;
+INSERT INTO `t_ds_queue` VALUES ('1', 'default', 'default', null, null);
 
 -- ----------------------------
 -- Table structure for t_ds_relation_datasource_user
@@ -461,7 +518,11 @@ CREATE TABLE `t_ds_relation_datasource_user` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_relation_datasource_user
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_relation_process_instance
@@ -473,7 +534,11 @@ CREATE TABLE `t_ds_relation_process_instance` (
   `parent_task_instance_id` int(11) DEFAULT NULL COMMENT 'parent process instance id',
   `process_instance_id` int(11) DEFAULT NULL COMMENT 'child process instance id',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_relation_process_instance
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_relation_project_user
@@ -488,7 +553,11 @@ CREATE TABLE `t_ds_relation_project_user` (
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`),
   KEY `user_id_index` (`user_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_relation_project_user
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_relation_resources_user
@@ -502,7 +571,11 @@ CREATE TABLE `t_ds_relation_resources_user` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_relation_resources_user
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_relation_udfs_user
@@ -516,7 +589,11 @@ CREATE TABLE `t_ds_relation_udfs_user` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_relation_udfs_user
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_relation_user_alertgroup
@@ -529,14 +606,11 @@ CREATE TABLE `t_ds_relation_user_alertgroup` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of t_ds_relation_user_alertgroup
 -- ----------------------------
-BEGIN;
-INSERT INTO `t_ds_relation_user_alertgroup` VALUES (1, 1, 1, '2018-11-29 10:22:33', '2018-11-29 10:22:33');
-COMMIT;
 
 -- ----------------------------
 -- Table structure for t_ds_resources
@@ -552,8 +626,15 @@ CREATE TABLE `t_ds_resources` (
   `size` bigint(20) DEFAULT NULL COMMENT 'resource size',
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
+  `pid` int(11) DEFAULT NULL,
+  `full_name` varchar(64) DEFAULT NULL,
+  `is_directory` tinyint(4) DEFAULT NULL,
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_resources
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_schedules
@@ -571,11 +652,15 @@ CREATE TABLE `t_ds_schedules` (
   `warning_type` tinyint(4) NOT NULL COMMENT 'Alarm type: 0 is not sent, 1 process is sent successfully, 2 process is sent failed, 3 process is sent successfully and all failures are sent',
   `warning_group_id` int(11) DEFAULT NULL COMMENT 'alert group id',
   `process_instance_priority` int(11) DEFAULT NULL COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
-  `worker_group_id` int(11) DEFAULT '-1' COMMENT 'worker group id',
+  `worker_group` varchar(256) DEFAULT '' COMMENT 'worker group id',
   `create_time` datetime NOT NULL COMMENT 'create time',
   `update_time` datetime NOT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_schedules
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_session
@@ -589,6 +674,10 @@ CREATE TABLE `t_ds_session` (
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+-- ----------------------------
+-- Records of t_ds_session
+-- ----------------------------
+
 -- ----------------------------
 -- Table structure for t_ds_task_instance
 -- ----------------------------
@@ -615,13 +704,17 @@ CREATE TABLE `t_ds_task_instance` (
   `retry_interval` int(4) DEFAULT NULL COMMENT 'retry interval when task failed ',
   `max_retry_times` int(2) DEFAULT NULL COMMENT 'max retry times',
   `task_instance_priority` int(11) DEFAULT NULL COMMENT 'task instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest',
-  `worker_group_id` int(11) DEFAULT '-1' COMMENT 'worker group id',
-  `executor_id` int(11) DEFAULT NULL COMMENT 'executor id',
+  `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id',
+  `executor_id` int(11) DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `process_instance_id` (`process_instance_id`) USING BTREE,
   KEY `task_instance_index` (`process_definition_id`,`process_instance_id`) USING BTREE,
   CONSTRAINT `foreign_key_instance_id` FOREIGN KEY (`process_instance_id`) REFERENCES `t_ds_process_instance` (`id`) ON DELETE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_task_instance
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_tenant
@@ -636,7 +729,11 @@ CREATE TABLE `t_ds_tenant` (
   `create_time` datetime DEFAULT NULL COMMENT 'create time',
   `update_time` datetime DEFAULT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_tenant
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_udfs
@@ -656,7 +753,11 @@ CREATE TABLE `t_ds_udfs` (
   `create_time` datetime NOT NULL COMMENT 'create time',
   `update_time` datetime NOT NULL COMMENT 'update time',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of t_ds_udfs
+-- ----------------------------
 
 -- ----------------------------
 -- Table structure for t_ds_user
@@ -675,14 +776,12 @@ CREATE TABLE `t_ds_user` (
   `queue` varchar(64) DEFAULT NULL COMMENT 'queue',
   PRIMARY KEY (`id`),
   UNIQUE KEY `user_name_unique` (`user_name`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of t_ds_user
 -- ----------------------------
-BEGIN;
-INSERT INTO `t_ds_user` VALUES (1, 'admin', '7ad2410b2f4c074479a8937a28a22b8f', 0, 'xxx@qq.com', 'xx', 0, '2018-03-27 15:48:50', '2018-10-24 17:40:22', NULL);
-COMMIT;
+
 
 -- ----------------------------
 -- Table structure for t_ds_version
@@ -698,36 +797,20 @@ CREATE TABLE `t_ds_version` (
 -- ----------------------------
 -- Records of t_ds_version
 -- ----------------------------
-BEGIN;
-INSERT INTO `t_ds_version` VALUES (1, '1.2.0');
-COMMIT;
+INSERT INTO `t_ds_version` VALUES ('1', '2.0.0');
+
 
 -- ----------------------------
+-- Records of t_ds_alertgroup
 -- ----------------------------
-DROP TABLE IF EXISTS `t_ds_worker_group`;
-CREATE TABLE `t_ds_worker_group` (
-  `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
-  `name` varchar(256) DEFAULT NULL COMMENT 'worker group name',
-  `ip_list` varchar(256) DEFAULT NULL COMMENT 'worker ip list. split by [,] ',
-  `create_time` datetime DEFAULT NULL COMMENT 'create time',
-  `update_time` datetime DEFAULT NULL COMMENT 'update time',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
+INSERT INTO `t_ds_alertgroup` VALUES ('1', 'default admin warning group', '0', 'default admin warning group', '2018-11-29 10:20:39', '2018-11-29 10:20:39');
 
 -- ----------------------------
+-- Records of t_ds_relation_user_alertgroup
 -- ----------------------------
-DROP TABLE IF EXISTS `t_ds_worker_server`;
-CREATE TABLE `t_ds_worker_server` (
-  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
-  `host` varchar(45) DEFAULT NULL COMMENT 'ip',
-  `port` int(11) DEFAULT NULL COMMENT 'process id',
-  `zk_directory` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'zk path',
-  `res_info` varchar(255) DEFAULT NULL COMMENT 'json resource info,{"cpu":xxx,"memroy":xxx}',
-  `create_time` datetime DEFAULT NULL COMMENT 'create time',
-  `last_heartbeat_time` datetime DEFAULT NULL COMMENT 'update time',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `t_ds_relation_user_alertgroup` VALUES ('1', '1', '1', '2018-11-29 10:22:33', '2018-11-29 10:22:33');
 
-SET FOREIGN_KEY_CHECKS = 1;
+-- ----------------------------
+-- Records of t_ds_user
+-- ----------------------------
+INSERT INTO `t_ds_user` VALUES ('1', 'admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22', null);

+ 123 - 98
sql/upgrade/1.2.2_schema/mysql/dolphinscheduler_ddl.sql

@@ -36,19 +36,6 @@ delimiter ;
 CALL uc_dolphin_T_t_ds_process_definition_A_modify_by;
 DROP PROCEDURE uc_dolphin_T_t_ds_process_definition_A_modify_by;
 
-<<<<<<< HEAD
-drop PROCEDURE if EXISTS ac_dolphin_T_t_ds_process_instance_A_worker_group;
-delimiter d//
-CREATE PROCEDURE ac_dolphin_T_t_ds_process_instance_A_worker_group()
-   BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-           WHERE TABLE_NAME='t_ds_process_instance'
-           AND TABLE_SCHEMA=(SELECT DATABASE())
-           AND COLUMN_NAME ='worker_group')
-   THEN
-         ALTER TABLE t_ds_process_instance ADD `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group';
-=======
 -- uc_dolphin_T_t_ds_task_instance_A_executor_id
 drop PROCEDURE if EXISTS uc_dolphin_T_t_ds_task_instance_A_executor_id;
 delimiter d//
@@ -60,29 +47,12 @@ CREATE PROCEDURE uc_dolphin_T_t_ds_task_instance_A_executor_id()
            AND COLUMN_NAME ='executor_id')
    THEN
          ALTER TABLE t_ds_task_instance ADD `executor_id` int(11) DEFAULT NULL COMMENT 'executor id';
->>>>>>> remotes/upstream/dev
        END IF;
  END;
 
 d//
 
 delimiter ;
-<<<<<<< HEAD
-CALL ac_dolphin_T_t_ds_process_instance_A_worker_group;
-DROP PROCEDURE ac_dolphin_T_t_ds_process_instance_A_worker_group;
-
-drop PROCEDURE if EXISTS dc_dolphin_T_t_ds_process_instance_D_worker_group_id;
-delimiter d//
-CREATE PROCEDURE dc_dolphin_T_t_ds_process_instance_D_worker_group_id()
-   BEGIN
-       IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
-           WHERE TABLE_NAME='t_ds_process_instance'
-           AND TABLE_SCHEMA=(SELECT DATABASE())
-           AND COLUMN_NAME ='worker_group_id')
-   THEN
-         ALTER TABLE t_ds_process_instance DROP COLUMN worker_group_id;
-=======
 CALL uc_dolphin_T_t_ds_task_instance_A_executor_id;
 DROP PROCEDURE uc_dolphin_T_t_ds_task_instance_A_executor_id;
 
@@ -97,29 +67,12 @@ CREATE PROCEDURE uc_dolphin_T_t_ds_task_instance_C_app_link()
            AND COLUMN_NAME ='app_link')
    THEN
          ALTER TABLE t_ds_task_instance CHANGE COLUMN app_link app_link text COMMENT 'yarn app id';
->>>>>>> remotes/upstream/dev
        END IF;
  END;
 
 d//
 
 delimiter ;
-<<<<<<< HEAD
-CALL dc_dolphin_T_t_ds_process_instance_D_worker_group_id;
-DROP PROCEDURE dc_dolphin_T_t_ds_process_instance_D_worker_group_id;
-
-drop PROCEDURE if EXISTS ac_dolphin_T_t_ds_task_instance_A_worker_group;
-delimiter d//
-CREATE PROCEDURE ac_dolphin_T_t_ds_task_instance_A_worker_group()
-   BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-           WHERE TABLE_NAME='t_ds_task_instance'
-           AND TABLE_SCHEMA=(SELECT DATABASE())
-           AND COLUMN_NAME ='worker_group')
-   THEN
-         ALTER TABLE t_ds_task_instance ADD `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group';
-=======
 CALL uc_dolphin_T_t_ds_task_instance_C_app_link;
 DROP PROCEDURE uc_dolphin_T_t_ds_task_instance_C_app_link;
 
@@ -134,29 +87,12 @@ CREATE PROCEDURE ac_dolphin_T_t_ds_resources_A_pid()
            AND COLUMN_NAME ='pid')
    THEN
          ALTER TABLE t_ds_resources ADD `pid` int(11) DEFAULT -1 COMMENT 'parent id';
->>>>>>> remotes/upstream/dev
        END IF;
  END;
 
 d//
 
 delimiter ;
-<<<<<<< HEAD
-CALL ac_dolphin_T_t_ds_task_instance_A_worker_group;
-DROP PROCEDURE ac_dolphin_T_t_ds_task_instance_A_worker_group;
-
-drop PROCEDURE if EXISTS dc_dolphin_T_t_ds_task_instance_D_worker_group_id;
-delimiter d//
-CREATE PROCEDURE dc_dolphin_T_t_ds_task_instance_D_worker_group_id()
-   BEGIN
-       IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
-           WHERE TABLE_NAME='t_ds_task_instance'
-           AND TABLE_SCHEMA=(SELECT DATABASE())
-           AND COLUMN_NAME ='worker_group_id')
-   THEN
-         ALTER TABLE t_ds_task_instance DROP COLUMN worker_group_id;
-=======
 CALL ac_dolphin_T_t_ds_resources_A_pid;
 DROP PROCEDURE ac_dolphin_T_t_ds_resources_A_pid;
 
@@ -171,29 +107,12 @@ CREATE PROCEDURE ac_dolphin_T_t_ds_resources_A_full_name()
            AND COLUMN_NAME ='full_name')
    THEN
          ALTER TABLE t_ds_resources ADD `full_name` varchar(255) DEFAULT NULL COMMENT 'full name';
->>>>>>> remotes/upstream/dev
        END IF;
  END;
 
 d//
 
 delimiter ;
-<<<<<<< HEAD
-CALL dc_dolphin_T_t_ds_task_instance_D_worker_group_id;
-DROP PROCEDURE dc_dolphin_T_t_ds_task_instance_D_worker_group_id;
-
-drop PROCEDURE if EXISTS ac_dolphin_T_t_ds_schedules_A_worker_group;
-delimiter d//
-CREATE PROCEDURE ac_dolphin_T_t_ds_schedules_A_worker_group()
-   BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-           WHERE TABLE_NAME='t_ds_schedules'
-           AND TABLE_SCHEMA=(SELECT DATABASE())
-           AND COLUMN_NAME ='worker_group')
-   THEN
-         ALTER TABLE t_ds_schedules ADD `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group';
-=======
 CALL ac_dolphin_T_t_ds_resources_A_full_name;
 DROP PROCEDURE ac_dolphin_T_t_ds_resources_A_full_name;
 
@@ -208,29 +127,12 @@ CREATE PROCEDURE ac_dolphin_T_t_ds_resources_is_directory()
            AND COLUMN_NAME ='is_directory')
    THEN
          ALTER TABLE t_ds_resources ADD `is_directory` tinyint(1) DEFAULT 0 COMMENT 'is directory';
->>>>>>> remotes/upstream/dev
        END IF;
  END;
 
 d//
 
 delimiter ;
-<<<<<<< HEAD
-CALL ac_dolphin_T_t_ds_schedules_A_worker_group;
-DROP PROCEDURE ac_dolphin_T_t_ds_schedules_A_worker_group;
-
-drop PROCEDURE if EXISTS dc_dolphin_T_t_ds_schedules_D_worker_group_id;
-delimiter d//
-CREATE PROCEDURE dc_dolphin_T_t_ds_schedules_D_worker_group_id()
-   BEGIN
-       IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
-           WHERE TABLE_NAME='t_ds_schedules'
-           AND TABLE_SCHEMA=(SELECT DATABASE())
-           AND COLUMN_NAME ='worker_group_id')
-   THEN
-         ALTER TABLE t_ds_schedules DROP COLUMN worker_group_id;
-=======
 CALL ac_dolphin_T_t_ds_resources_is_directory;
 DROP PROCEDURE ac_dolphin_T_t_ds_resources_is_directory;
 
@@ -245,17 +147,134 @@ CREATE PROCEDURE ac_dolphin_T_t_ds_process_definition_A_resource_ids()
            AND COLUMN_NAME ='resource_ids')
    THEN
          ALTER TABLE t_ds_process_definition ADD `resource_ids` varchar(255) DEFAULT NULL COMMENT 'resource ids';
->>>>>>> remotes/upstream/dev
        END IF;
  END;
 
 d//
 
 delimiter ;
-<<<<<<< HEAD
-CALL dc_dolphin_T_t_ds_schedules_D_worker_group_id;
-DROP PROCEDURE dc_dolphin_T_t_ds_schedules_D_worker_group_id;
-=======
 CALL ac_dolphin_T_t_ds_process_definition_A_resource_ids;
 DROP PROCEDURE ac_dolphin_T_t_ds_process_definition_A_resource_ids;
->>>>>>> remotes/upstream/dev
+
+
+-- ac_dolphin_T_t_ds_process_instance_A_worker_group
+drop PROCEDURE if EXISTS ac_dolphin_T_t_ds_process_instance_A_worker_group;
+delimiter d//
+CREATE PROCEDURE ac_dolphin_T_t_ds_process_instance_A_worker_group()
+   BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+           WHERE TABLE_NAME='t_ds_process_instance'
+           AND TABLE_SCHEMA=(SELECT DATABASE())
+           AND COLUMN_NAME ='worker_group')
+   THEN
+         ALTER TABLE t_ds_process_instance ADD `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group';
+       END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL ac_dolphin_T_t_ds_process_instance_A_worker_group;
+DROP PROCEDURE ac_dolphin_T_t_ds_process_instance_A_worker_group;
+
+-- dc_dolphin_T_t_ds_process_instance_D_worker_group_id
+drop PROCEDURE if EXISTS dc_dolphin_T_t_ds_process_instance_D_worker_group_id;
+delimiter d//
+CREATE PROCEDURE dc_dolphin_T_t_ds_process_instance_D_worker_group_id()
+   BEGIN
+       IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
+           WHERE TABLE_NAME='t_ds_process_instance'
+           AND TABLE_SCHEMA=(SELECT DATABASE())
+           AND COLUMN_NAME ='worker_group_id')
+   THEN
+         ALTER TABLE t_ds_process_instance DROP COLUMN worker_group_id;
+       END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL dc_dolphin_T_t_ds_process_instance_D_worker_group_id;
+DROP PROCEDURE dc_dolphin_T_t_ds_process_instance_D_worker_group_id;
+
+-- ac_dolphin_T_t_ds_task_instance_A_worker_group
+drop PROCEDURE if EXISTS ac_dolphin_T_t_ds_task_instance_A_worker_group;
+delimiter d//
+CREATE PROCEDURE ac_dolphin_T_t_ds_task_instance_A_worker_group()
+   BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+           WHERE TABLE_NAME='t_ds_task_instance'
+           AND TABLE_SCHEMA=(SELECT DATABASE())
+           AND COLUMN_NAME ='worker_group')
+   THEN
+         ALTER TABLE t_ds_task_instance ADD `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group';
+       END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL ac_dolphin_T_t_ds_task_instance_A_worker_group;
+DROP PROCEDURE ac_dolphin_T_t_ds_task_instance_A_worker_group;
+
+-- dc_dolphin_T_t_ds_task_instance_D_worker_group_id
+drop PROCEDURE if EXISTS dc_dolphin_T_t_ds_task_instance_D_worker_group_id;
+delimiter d//
+CREATE PROCEDURE dc_dolphin_T_t_ds_task_instance_D_worker_group_id()
+   BEGIN
+       IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
+           WHERE TABLE_NAME='t_ds_task_instance'
+           AND TABLE_SCHEMA=(SELECT DATABASE())
+           AND COLUMN_NAME ='worker_group_id')
+   THEN
+         ALTER TABLE t_ds_task_instance DROP COLUMN worker_group_id;
+       END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL dc_dolphin_T_t_ds_task_instance_D_worker_group_id;
+DROP PROCEDURE dc_dolphin_T_t_ds_task_instance_D_worker_group_id;
+
+-- ac_dolphin_T_t_ds_schedules_A_worker_group
+drop PROCEDURE if EXISTS ac_dolphin_T_t_ds_schedules_A_worker_group;
+delimiter d//
+CREATE PROCEDURE ac_dolphin_T_t_ds_schedules_A_worker_group()
+   BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+           WHERE TABLE_NAME='t_ds_schedules'
+           AND TABLE_SCHEMA=(SELECT DATABASE())
+           AND COLUMN_NAME ='worker_group')
+   THEN
+         ALTER TABLE t_ds_schedules ADD `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group';
+       END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL ac_dolphin_T_t_ds_schedules_A_worker_group;
+DROP PROCEDURE ac_dolphin_T_t_ds_schedules_A_worker_group;
+
+-- dc_dolphin_T_t_ds_schedules_D_worker_group_id
+drop PROCEDURE if EXISTS dc_dolphin_T_t_ds_schedules_D_worker_group_id;
+delimiter d//
+CREATE PROCEDURE dc_dolphin_T_t_ds_schedules_D_worker_group_id()
+   BEGIN
+       IF EXISTS (SELECT 1 FROM information_schema.COLUMNS
+           WHERE TABLE_NAME='t_ds_schedules'
+           AND TABLE_SCHEMA=(SELECT DATABASE())
+           AND COLUMN_NAME ='worker_group_id')
+   THEN
+         ALTER TABLE t_ds_schedules DROP COLUMN worker_group_id;
+       END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL dc_dolphin_T_t_ds_schedules_D_worker_group_id;
+DROP PROCEDURE dc_dolphin_T_t_ds_schedules_D_worker_group_id;
+
+

+ 121 - 103
sql/upgrade/1.2.2_schema/postgresql/dolphinscheduler_ddl.sql

@@ -32,7 +32,126 @@ delimiter ;
 SELECT uc_dolphin_T_t_ds_process_definition_A_modify_by();
 DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_process_definition_A_modify_by();
 
-<<<<<<< HEAD
+-- uc_dolphin_T_t_ds_task_instance_A_executor_id
+delimiter d//
+CREATE OR REPLACE FUNCTION uc_dolphin_T_t_ds_task_instance_A_executor_id() RETURNS void AS $$
+BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+          WHERE TABLE_NAME='t_ds_task_instance'
+                            AND COLUMN_NAME ='executor_id')
+      THEN
+         ALTER TABLE t_ds_task_instance ADD COLUMN executor_id int DEFAULT NULL;
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+
+delimiter ;
+SELECT uc_dolphin_T_t_ds_task_instance_A_executor_id();
+DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_A_executor_id();
+
+-- uc_dolphin_T_t_ds_task_instance_C_app_link
+delimiter d//
+CREATE OR REPLACE FUNCTION uc_dolphin_T_t_ds_task_instance_C_app_link() RETURNS void AS $$
+BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+          WHERE TABLE_NAME='t_ds_task_instance'
+                            AND COLUMN_NAME ='app_link')
+      THEN
+         ALTER TABLE t_ds_task_instance ALTER COLUMN app_link type text;
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+
+delimiter ;
+SELECT uc_dolphin_T_t_ds_task_instance_C_app_link();
+DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_C_app_link();
+
+
+-- ac_dolphin_T_t_ds_resources_A_pid
+delimiter d//
+CREATE FUNCTION ac_dolphin_T_t_ds_resources_A_pid() RETURNS void AS $$
+BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+          WHERE TABLE_CATALOG=current_database()
+          AND TABLE_SCHEMA=current_schema()
+          AND TABLE_NAME='t_ds_resources'
+          AND COLUMN_NAME ='pid')
+      THEN
+         ALTER TABLE t_ds_resources ADD COLUMN pid int DEFAULT -1;
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+delimiter ;
+select ac_dolphin_T_t_ds_resources_A_pid();
+DROP FUNCTION ac_dolphin_T_t_ds_resources_A_pid();
+
+-- ac_dolphin_T_t_ds_resources_A_full_name
+delimiter ;
+DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_resources_A_full_name();
+delimiter d//
+CREATE FUNCTION ac_dolphin_T_t_ds_resources_A_full_name() RETURNS void AS $$
+BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+          WHERE TABLE_CATALOG=current_database()
+          AND TABLE_SCHEMA=current_schema()
+          AND TABLE_NAME='t_ds_resources'
+          AND COLUMN_NAME ='full_name')
+      THEN
+         ALTER TABLE t_ds_resources ADD COLUMN full_name varchar(255) DEFAULT null;
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+delimiter ;
+select ac_dolphin_T_t_ds_resources_A_full_name();
+DROP FUNCTION ac_dolphin_T_t_ds_resources_A_full_name();
+
+-- ac_dolphin_T_t_ds_resources_A_is_directory
+delimiter ;
+DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_resources_A_is_directory();
+delimiter d//
+CREATE FUNCTION ac_dolphin_T_t_ds_resources_A_is_directory() RETURNS void AS $$
+BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+          WHERE TABLE_CATALOG=current_database()
+          AND TABLE_SCHEMA=current_schema()
+          AND TABLE_NAME='t_ds_resources'
+          AND COLUMN_NAME ='is_directory')
+      THEN
+         ALTER TABLE t_ds_resources ADD COLUMN is_directory boolean DEFAULT false;
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+delimiter ;
+select ac_dolphin_T_t_ds_resources_A_is_directory();
+DROP FUNCTION ac_dolphin_T_t_ds_resources_A_is_directory();
+
+-- ac_dolphin_T_t_ds_process_definition_A_resource_ids
+delimiter ;
+DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_process_definition_A_resource_ids();
+delimiter d//
+CREATE FUNCTION ac_dolphin_T_t_ds_process_definition_A_resource_ids() RETURNS void AS $$
+BEGIN
+       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
+          WHERE TABLE_CATALOG=current_database()
+          AND TABLE_SCHEMA=current_schema()
+          AND TABLE_NAME='t_ds_process_definition'
+          AND COLUMN_NAME ='resource_ids')
+      THEN
+         ALTER TABLE t_ds_process_definition ADD COLUMN resource_ids varchar(255) DEFAULT null;
+       END IF;
+END;
+$$ LANGUAGE plpgsql;
+d//
+delimiter ;
+select ac_dolphin_T_t_ds_process_definition_A_resource_ids();
+DROP FUNCTION ac_dolphin_T_t_ds_process_definition_A_resource_ids();
+
+
 -- ac_dolphin_T_t_ds_process_instance_A_worker_group
 delimiter ;
 DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_process_instance_A_worker_group();
@@ -46,22 +165,10 @@ BEGIN
           AND COLUMN_NAME ='worker_group')
       THEN
          ALTER TABLE t_ds_process_instance ADD COLUMN worker_group varchar(255) DEFAULT null;
-=======
-delimiter d//
-CREATE OR REPLACE FUNCTION uc_dolphin_T_t_ds_task_instance_A_executor_id() RETURNS void AS $$
-BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-          WHERE TABLE_NAME='t_ds_task_instance'
-                            AND COLUMN_NAME ='executor_id')
-      THEN
-         ALTER TABLE t_ds_task_instance ADD COLUMN executor_id int DEFAULT NULL;
->>>>>>> remotes/upstream/dev
        END IF;
 END;
 $$ LANGUAGE plpgsql;
 d//
-<<<<<<< HEAD
 delimiter ;
 select ac_dolphin_T_t_ds_process_instance_A_worker_group();
 DROP FUNCTION ac_dolphin_T_t_ds_process_instance_A_worker_group();
@@ -79,27 +186,10 @@ BEGIN
           AND COLUMN_NAME ='worker_group_id')
       THEN
          ALTER TABLE t_ds_process_instance DROP COLUMN worker_group_id;
-=======
-
-delimiter ;
-SELECT uc_dolphin_T_t_ds_task_instance_A_executor_id();
-DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_A_executor_id();
-
-delimiter d//
-CREATE OR REPLACE FUNCTION uc_dolphin_T_t_ds_task_instance_C_app_link() RETURNS void AS $$
-BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-          WHERE TABLE_NAME='t_ds_task_instance'
-                            AND COLUMN_NAME ='app_link')
-      THEN
-         ALTER TABLE t_ds_task_instance ALTER COLUMN app_link type text;
->>>>>>> remotes/upstream/dev
        END IF;
 END;
 $$ LANGUAGE plpgsql;
 d//
-<<<<<<< HEAD
 delimiter ;
 select dc_dolphin_T_t_ds_process_instance_D_worker_group_id();
 DROP FUNCTION dc_dolphin_T_t_ds_process_instance_D_worker_group_id();
@@ -110,38 +200,19 @@ delimiter ;
 DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_task_instance_A_worker_group();
 delimiter d//
 CREATE FUNCTION ac_dolphin_T_t_ds_task_instance_A_worker_group() RETURNS void AS $$
-=======
-
-delimiter ;
-SELECT uc_dolphin_T_t_ds_task_instance_C_app_link();
-DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_C_app_link();
-
-
-delimiter d//
-CREATE FUNCTION ac_dolphin_T_t_ds_resources_A_pid() RETURNS void AS $$
->>>>>>> remotes/upstream/dev
 BEGIN
        IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
           WHERE TABLE_CATALOG=current_database()
           AND TABLE_SCHEMA=current_schema()
-<<<<<<< HEAD
           AND TABLE_NAME='t_ds_task_instance'
           AND COLUMN_NAME ='worker_group')
       THEN
          ALTER TABLE t_ds_task_instance ADD COLUMN worker_group varchar(255) DEFAULT null;
-=======
-          AND TABLE_NAME='t_ds_resources'
-          AND COLUMN_NAME ='pid')
-      THEN
-         ALTER TABLE t_ds_resources ADD COLUMN pid int DEFAULT -1;
->>>>>>> remotes/upstream/dev
        END IF;
 END;
 $$ LANGUAGE plpgsql;
 d//
 delimiter ;
-<<<<<<< HEAD
 select ac_dolphin_T_t_ds_task_instance_A_worker_group();
 DROP FUNCTION ac_dolphin_T_t_ds_task_instance_A_worker_group();
 
@@ -158,30 +229,11 @@ BEGIN
           AND COLUMN_NAME ='worker_group_id')
       THEN
          ALTER TABLE t_ds_task_instance DROP COLUMN worker_group_id;
-=======
-select ac_dolphin_T_t_ds_resources_A_pid();
-DROP FUNCTION ac_dolphin_T_t_ds_resources_A_pid();
-
-delimiter ;
-DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_resources_A_full_name();
-delimiter d//
-CREATE FUNCTION ac_dolphin_T_t_ds_resources_A_full_name() RETURNS void AS $$
-BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-          WHERE TABLE_CATALOG=current_database()
-          AND TABLE_SCHEMA=current_schema()
-          AND TABLE_NAME='t_ds_resources'
-          AND COLUMN_NAME ='full_name')
-      THEN
-         ALTER TABLE t_ds_resources ADD COLUMN full_name varchar(255) DEFAULT null;
->>>>>>> remotes/upstream/dev
        END IF;
 END;
 $$ LANGUAGE plpgsql;
 d//
 delimiter ;
-<<<<<<< HEAD
 select dc_dolphin_T_t_ds_task_instance_D_worker_group_id();
 DROP FUNCTION dc_dolphin_T_t_ds_task_instance_D_worker_group_id();
 
@@ -190,37 +242,19 @@ delimiter ;
 DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_schedules_A_worker_group();
 delimiter d//
 CREATE FUNCTION ac_dolphin_T_t_ds_schedules_A_worker_group() RETURNS void AS $$
-=======
-select ac_dolphin_T_t_ds_resources_A_full_name();
-DROP FUNCTION ac_dolphin_T_t_ds_resources_A_full_name();
-
-delimiter ;
-DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_resources_A_is_directory();
-delimiter d//
-CREATE FUNCTION ac_dolphin_T_t_ds_resources_A_is_directory() RETURNS void AS $$
->>>>>>> remotes/upstream/dev
 BEGIN
        IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
           WHERE TABLE_CATALOG=current_database()
           AND TABLE_SCHEMA=current_schema()
-<<<<<<< HEAD
           AND TABLE_NAME='t_ds_schedules'
           AND COLUMN_NAME ='worker_group')
       THEN
          ALTER TABLE t_ds_schedules ADD COLUMN worker_group varchar(255) DEFAULT null;
-=======
-          AND TABLE_NAME='t_ds_resources'
-          AND COLUMN_NAME ='is_directory')
-      THEN
-         ALTER TABLE t_ds_resources ADD COLUMN is_directory boolean DEFAULT false;
->>>>>>> remotes/upstream/dev
        END IF;
 END;
 $$ LANGUAGE plpgsql;
 d//
 delimiter ;
-<<<<<<< HEAD
 select ac_dolphin_T_t_ds_schedules_A_worker_group();
 DROP FUNCTION ac_dolphin_T_t_ds_schedules_A_worker_group();
 
@@ -237,34 +271,12 @@ BEGIN
           AND COLUMN_NAME ='worker_group_id')
       THEN
          ALTER TABLE t_ds_schedules DROP COLUMN worker_group_id;
-=======
-select ac_dolphin_T_t_ds_resources_A_is_directory();
-DROP FUNCTION ac_dolphin_T_t_ds_resources_A_is_directory();
-
-delimiter ;
-DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_process_definition_A_resource_ids();
-delimiter d//
-CREATE FUNCTION ac_dolphin_T_t_ds_process_definition_A_resource_ids() RETURNS void AS $$
-BEGIN
-       IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
-          WHERE TABLE_CATALOG=current_database()
-          AND TABLE_SCHEMA=current_schema()
-          AND TABLE_NAME='t_ds_process_definition'
-          AND COLUMN_NAME ='resource_ids')
-      THEN
-         ALTER TABLE t_ds_process_definition ADD COLUMN resource_ids varchar(255) DEFAULT null;
->>>>>>> remotes/upstream/dev
        END IF;
 END;
 $$ LANGUAGE plpgsql;
 d//
 delimiter ;
-<<<<<<< HEAD
 select dc_dolphin_T_t_ds_schedules_D_worker_group_id();
 DROP FUNCTION dc_dolphin_T_t_ds_schedules_D_worker_group_id();
 
-=======
-select ac_dolphin_T_t_ds_process_definition_A_resource_ids();
-DROP FUNCTION ac_dolphin_T_t_ds_process_definition_A_resource_ids();
->>>>>>> remotes/upstream/dev
+