From 0bfd7d66d9c99fdf0804858ba1c502b58c4c5312 Mon Sep 17 00:00:00 2001 From: Wenjun Ruan Date: Fri, 24 Mar 2023 09:40:09 +0800 Subject: [PATCH] db: Modify name len to 255 (#13788) --- .../resources/sql/dolphinscheduler_h2.sql | 42 +++++++-------- .../resources/sql/dolphinscheduler_mysql.sql | 54 +++++++++---------- .../sql/dolphinscheduler_postgresql.sql | 36 ++++++------- .../mysql/dolphinscheduler_ddl.sql | 29 ++++++++++ .../postgresql/dolphinscheduler_ddl.sql | 19 ++++++- 5 files changed, 113 insertions(+), 67 deletions(-) diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql index 58844f59c5..e5d8b7ffbb 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql @@ -332,7 +332,7 @@ CREATE TABLE t_ds_command executor_id int(11) DEFAULT NULL, update_time datetime DEFAULT NULL, process_instance_priority int(11) DEFAULT '2', - worker_group varchar(64), + worker_group varchar(255), environment_code bigint(20) DEFAULT '-1', dry_run int NULL DEFAULT 0, process_instance_id int(11) DEFAULT 0, @@ -389,7 +389,7 @@ CREATE TABLE t_ds_error_command start_time datetime DEFAULT NULL, update_time datetime DEFAULT NULL, process_instance_priority int(11) DEFAULT '2', - worker_group varchar(64), + worker_group varchar(255), environment_code bigint(20) DEFAULT '-1', message text, dry_run int NULL DEFAULT 0, @@ -443,7 +443,7 @@ CREATE TABLE t_ds_process_definition_log ( id int(11) NOT NULL AUTO_INCREMENT, code bigint(20) NOT NULL, - name varchar(200) DEFAULT NULL, + name varchar(255) DEFAULT NULL, version int(11) DEFAULT NULL, description text, project_code bigint(20) NOT NULL, @@ -472,7 +472,7 @@ CREATE TABLE t_ds_task_definition ( id int(11) NOT NULL AUTO_INCREMENT, code bigint(20) NOT NULL, - name varchar(200) DEFAULT NULL, + name varchar(255) DEFAULT NULL, version int(11) DEFAULT NULL, description text, project_code bigint(20) NOT NULL, @@ -509,7 +509,7 @@ CREATE TABLE t_ds_task_definition_log ( id int(11) NOT NULL AUTO_INCREMENT, code bigint(20) NOT NULL, - name varchar(200) DEFAULT NULL, + name varchar(255) DEFAULT NULL, version int(11) DEFAULT NULL, description text, project_code bigint(20) NOT NULL, @@ -547,7 +547,7 @@ DROP TABLE IF EXISTS t_ds_process_task_relation CASCADE; CREATE TABLE t_ds_process_task_relation ( id int(11) NOT NULL AUTO_INCREMENT, - name varchar(200) DEFAULT NULL, + name varchar(255) DEFAULT NULL, process_definition_version int(11) DEFAULT NULL, project_code bigint(20) NOT NULL, process_definition_code bigint(20) NOT NULL, @@ -569,7 +569,7 @@ DROP TABLE IF EXISTS t_ds_process_task_relation_log CASCADE; CREATE TABLE t_ds_process_task_relation_log ( id int(11) NOT NULL AUTO_INCREMENT, - name varchar(200) DEFAULT NULL, + name varchar(255) DEFAULT NULL, process_definition_version int(11) DEFAULT NULL, project_code bigint(20) NOT NULL, process_definition_code bigint(20) NOT NULL, @@ -645,7 +645,7 @@ DROP TABLE IF EXISTS t_ds_project CASCADE; CREATE TABLE t_ds_project ( id int(11) NOT NULL AUTO_INCREMENT, - name varchar(100) DEFAULT NULL, + name varchar(255) DEFAULT NULL, code bigint(20) NOT NULL, description varchar(255) DEFAULT NULL, user_id int(11) DEFAULT NULL, @@ -816,7 +816,7 @@ CREATE TABLE t_ds_schedules warning_type tinyint(4) NOT NULL, warning_group_id int(11) DEFAULT NULL, process_instance_priority int(11) DEFAULT '2', - worker_group varchar(64) DEFAULT '', + worker_group varchar(255) DEFAULT '', environment_code bigint(20) DEFAULT '-1', create_time datetime NOT NULL, update_time datetime NOT NULL, @@ -877,7 +877,7 @@ CREATE TABLE t_ds_task_instance retry_interval int(4) DEFAULT NULL, max_retry_times int(2) DEFAULT NULL, task_instance_priority int(11) DEFAULT NULL, - worker_group varchar(64) DEFAULT NULL, + worker_group varchar(255) DEFAULT NULL, environment_code bigint(20) DEFAULT '-1', environment_config text DEFAULT '', executor_id int(11) DEFAULT NULL, @@ -997,7 +997,7 @@ DROP TABLE IF EXISTS t_ds_version CASCADE; CREATE TABLE t_ds_version ( id int(11) NOT NULL AUTO_INCREMENT, - version varchar(200) NOT NULL, + version varchar(63) NOT NULL, PRIMARY KEY (id), UNIQUE KEY version_UNIQUE (version) ); @@ -1030,7 +1030,7 @@ DROP TABLE IF EXISTS t_ds_plugin_define CASCADE; CREATE TABLE t_ds_plugin_define ( id int NOT NULL AUTO_INCREMENT, - plugin_name varchar(100) NOT NULL, + plugin_name varchar(255) NOT NULL, plugin_type varchar(100) NOT NULL, plugin_params text, create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, @@ -1060,10 +1060,10 @@ CREATE TABLE t_ds_alert_plugin_instance DROP TABLE IF EXISTS `t_ds_dq_comparison_type`; CREATE TABLE `t_ds_dq_comparison_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `type` varchar(100) NOT NULL, + `type` varchar(255) NOT NULL, `execute_sql` text DEFAULT NULL, `output_table` varchar(100) DEFAULT NULL, - `name` varchar(100) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, `create_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL, `is_inner_source` tinyint(1) DEFAULT '0', @@ -1127,7 +1127,7 @@ CREATE TABLE `t_ds_dq_execute_result` ( DROP TABLE IF EXISTS `t_ds_dq_rule`; CREATE TABLE `t_ds_dq_rule` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, `type` int(11) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, `create_time` datetime DEFAULT NULL, @@ -1840,7 +1840,7 @@ CREATE TABLE t_ds_environment ( id int NOT NULL AUTO_INCREMENT, code bigint(20) NOT NULL, - name varchar(100) DEFAULT NULL, + name varchar(255) DEFAULT NULL, config text DEFAULT NULL, description text, operator int DEFAULT NULL, @@ -1871,7 +1871,7 @@ CREATE TABLE t_ds_task_group_queue ( id int(11) NOT NULL AUTO_INCREMENT , task_id int(11) DEFAULT NULL , - task_name VARCHAR(100) DEFAULT NULL , + task_name VARCHAR(255) DEFAULT NULL , group_id int(11) DEFAULT NULL , process_id int(11) DEFAULT NULL , priority int(8) DEFAULT '0' , @@ -1887,7 +1887,7 @@ DROP TABLE IF EXISTS t_ds_task_group; CREATE TABLE t_ds_task_group ( id int(11) NOT NULL AUTO_INCREMENT , - name varchar(100) DEFAULT NULL , + name varchar(255) DEFAULT NULL , description varchar(255) DEFAULT NULL , group_size int(11) NOT NULL , project_code bigint(20) DEFAULT '0', @@ -1919,7 +1919,7 @@ DROP TABLE IF EXISTS t_ds_k8s; CREATE TABLE t_ds_k8s ( id int(11) NOT NULL AUTO_INCREMENT , - k8s_name varchar(100) DEFAULT NULL , + k8s_name varchar(255) DEFAULT NULL , k8s_config text DEFAULT NULL, create_time datetime DEFAULT NULL , update_time datetime DEFAULT NULL , @@ -1931,7 +1931,7 @@ CREATE TABLE t_ds_k8s_namespace ( id int(11) NOT NULL AUTO_INCREMENT , code bigint(20) NOT NULL, limits_memory int(11) DEFAULT NULL, - namespace varchar(100) DEFAULT NULL, + namespace varchar(255) DEFAULT NULL, user_id int(11) DEFAULT NULL, pod_replicas int(11) DEFAULT NULL, pod_request_cpu decimal(14,3) DEFAULT NULL, @@ -1998,7 +1998,7 @@ CREATE TABLE t_ds_cluster ( id int NOT NULL AUTO_INCREMENT, code bigint(20) NOT NULL, - name varchar(100) DEFAULT NULL, + name varchar(255) DEFAULT NULL, config text DEFAULT NULL, description text, operator int DEFAULT NULL, diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql index e0bc9316c6..71ff9ea168 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql @@ -340,7 +340,7 @@ CREATE TABLE `t_ds_command` ( `executor_id` int(11) DEFAULT NULL COMMENT 'executor id', `update_time` datetime DEFAULT NULL COMMENT 'update time', `process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority: 0 Highest,1 High,2 Medium,3 Low,4 Lowest', - `worker_group` varchar(64) COMMENT 'worker group', + `worker_group` varchar(255) COMMENT 'worker group', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `dry_run` tinyint(4) DEFAULT '0' COMMENT 'dry run flag:0 normal, 1 dry run', `test_flag` tinyint(4) DEFAULT null COMMENT 'test flag:0 normal, 1 test run', @@ -395,7 +395,7 @@ CREATE TABLE `t_ds_error_command` ( `start_time` datetime DEFAULT NULL COMMENT 'start time', `update_time` datetime DEFAULT NULL COMMENT 'update time', `process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority, 0 Highest,1 High,2 Medium,3 Low,4 Lowest', - `worker_group` varchar(64) COMMENT 'worker group', + `worker_group` varchar(255) COMMENT 'worker group', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `message` text COMMENT 'message', `dry_run` tinyint(4) DEFAULT '0' COMMENT 'dry run flag: 0 normal, 1 dry run', @@ -444,7 +444,7 @@ DROP TABLE IF EXISTS `t_ds_process_definition_log`; CREATE TABLE `t_ds_process_definition_log` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'self-increasing id', `code` bigint(20) NOT NULL COMMENT 'encoding', - `name` varchar(200) DEFAULT NULL COMMENT 'process definition name', + `name` varchar(255) DEFAULT NULL COMMENT 'process definition name', `version` int(11) DEFAULT '0' COMMENT 'process definition version', `description` text COMMENT 'description', `project_code` bigint(20) NOT NULL COMMENT 'project code', @@ -472,7 +472,7 @@ DROP TABLE IF EXISTS `t_ds_task_definition`; CREATE TABLE `t_ds_task_definition` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'self-increasing id', `code` bigint(20) NOT NULL COMMENT 'encoding', - `name` varchar(200) DEFAULT NULL COMMENT 'task definition name', + `name` varchar(255) DEFAULT NULL COMMENT 'task definition name', `version` int(11) DEFAULT '0' COMMENT 'task definition version', `description` text COMMENT 'description', `project_code` bigint(20) NOT NULL COMMENT 'project code', @@ -483,7 +483,7 @@ CREATE TABLE `t_ds_task_definition` ( `flag` tinyint(2) DEFAULT NULL COMMENT '0 not available, 1 available', `is_cache` tinyint(2) DEFAULT '0' COMMENT '0 not available, 1 available', `task_priority` tinyint(4) DEFAULT '2' COMMENT 'job priority', - `worker_group` varchar(200) DEFAULT NULL COMMENT 'worker grouping', + `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker grouping', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `fail_retry_times` int(11) DEFAULT NULL COMMENT 'number of failed retries', `fail_retry_interval` int(11) DEFAULT NULL COMMENT 'failed retry interval', @@ -508,7 +508,7 @@ DROP TABLE IF EXISTS `t_ds_task_definition_log`; CREATE TABLE `t_ds_task_definition_log` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'self-increasing id', `code` bigint(20) NOT NULL COMMENT 'encoding', - `name` varchar(200) DEFAULT NULL COMMENT 'task definition name', + `name` varchar(255) DEFAULT NULL COMMENT 'task definition name', `version` int(11) DEFAULT '0' COMMENT 'task definition version', `description` text COMMENT 'description', `project_code` bigint(20) NOT NULL COMMENT 'project code', @@ -519,7 +519,7 @@ CREATE TABLE `t_ds_task_definition_log` ( `flag` tinyint(2) DEFAULT NULL COMMENT '0 not available, 1 available', `is_cache` tinyint(2) DEFAULT '0' COMMENT '0 not available, 1 available', `task_priority` tinyint(4) DEFAULT '2' COMMENT 'job priority', - `worker_group` varchar(200) DEFAULT NULL COMMENT 'worker grouping', + `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker grouping', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `fail_retry_times` int(11) DEFAULT NULL COMMENT 'number of failed retries', `fail_retry_interval` int(11) DEFAULT NULL COMMENT 'failed retry interval', @@ -547,7 +547,7 @@ CREATE TABLE `t_ds_task_definition_log` ( DROP TABLE IF EXISTS `t_ds_process_task_relation`; CREATE TABLE `t_ds_process_task_relation` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'self-increasing id', - `name` varchar(200) DEFAULT NULL COMMENT 'relation name', + `name` varchar(255) DEFAULT NULL COMMENT 'relation name', `project_code` bigint(20) NOT NULL COMMENT 'project code', `process_definition_code` bigint(20) NOT NULL COMMENT 'process code', `process_definition_version` int(11) NOT NULL COMMENT 'process version', @@ -571,7 +571,7 @@ CREATE TABLE `t_ds_process_task_relation` ( DROP TABLE IF EXISTS `t_ds_process_task_relation_log`; CREATE TABLE `t_ds_process_task_relation_log` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'self-increasing id', - `name` varchar(200) DEFAULT NULL COMMENT 'relation name', + `name` varchar(255) DEFAULT NULL COMMENT 'relation name', `project_code` bigint(20) NOT NULL COMMENT 'project code', `process_definition_code` bigint(20) NOT NULL COMMENT 'process code', `process_definition_version` int(11) NOT NULL COMMENT 'process version', @@ -623,7 +623,7 @@ CREATE TABLE `t_ds_process_instance` ( `executor_name` varchar(64) DEFAULT NULL COMMENT 'execute user name', `history_cmd` text COMMENT 'history commands of process instance operation', `process_instance_priority` int(11) DEFAULT '2' COMMENT 'process instance priority. 0 Highest,1 High,2 Medium,3 Low,4 Lowest', - `worker_group` varchar(64) DEFAULT NULL COMMENT 'worker group id', + `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker group id', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `timeout` int(11) DEFAULT '0' COMMENT 'time out', `tenant_id` int(11) NOT NULL DEFAULT '-1' COMMENT 'tenant id', @@ -648,7 +648,7 @@ CREATE TABLE `t_ds_process_instance` ( DROP TABLE IF EXISTS `t_ds_project`; CREATE TABLE `t_ds_project` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key', - `name` varchar(100) DEFAULT NULL COMMENT 'project name', + `name` varchar(255) DEFAULT NULL COMMENT 'project name', `code` bigint(20) NOT NULL COMMENT 'encoding', `description` varchar(255) DEFAULT NULL, `user_id` int(11) DEFAULT NULL COMMENT 'creator id', @@ -813,7 +813,7 @@ 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 '2' COMMENT 'process instance priority:0 Highest,1 High,2 Medium,3 Low,4 Lowest', - `worker_group` varchar(64) DEFAULT '' COMMENT 'worker group id', + `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group id', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `create_time` datetime NOT NULL COMMENT 'create time', `update_time` datetime NOT NULL COMMENT 'update time', @@ -872,7 +872,7 @@ 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` varchar(64) DEFAULT NULL COMMENT 'worker group id', + `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker group id', `environment_code` bigint(20) DEFAULT '-1' COMMENT 'environment code', `environment_config` text COMMENT 'this config contains many environment variables config', `executor_id` int(11) DEFAULT NULL, @@ -921,7 +921,7 @@ DROP TABLE IF EXISTS `t_ds_udfs`; CREATE TABLE `t_ds_udfs` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key', `user_id` int(11) NOT NULL COMMENT 'user id', - `func_name` varchar(100) NOT NULL COMMENT 'UDF function name', + `func_name` varchar(255) NOT NULL COMMENT 'UDF function name', `class_name` varchar(255) NOT NULL COMMENT 'class of udf', `type` tinyint(4) NOT NULL COMMENT 'Udf function type', `arg_types` varchar(255) DEFAULT NULL COMMENT 'arguments types', @@ -990,7 +990,7 @@ CREATE TABLE `t_ds_worker_group` ( DROP TABLE IF EXISTS `t_ds_version`; CREATE TABLE `t_ds_version` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `version` varchar(200) NOT NULL, + `version` varchar(63) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `version_UNIQUE` (`version`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE = utf8_bin COMMENT='version'; @@ -1020,8 +1020,8 @@ SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); DROP TABLE IF EXISTS `t_ds_plugin_define`; CREATE TABLE `t_ds_plugin_define` ( `id` int NOT NULL AUTO_INCREMENT, - `plugin_name` varchar(100) NOT NULL COMMENT 'the name of plugin eg: email', - `plugin_type` varchar(100) NOT NULL COMMENT 'plugin type . alert=alert plugin, job=job plugin', + `plugin_name` varchar(255) NOT NULL COMMENT 'the name of plugin eg: email', + `plugin_type` varchar(63) NOT NULL COMMENT 'plugin type . alert=alert plugin, job=job plugin', `plugin_params` text COMMENT 'plugin params', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, @@ -1039,7 +1039,7 @@ CREATE TABLE `t_ds_alert_plugin_instance` ( `plugin_instance_params` text COMMENT 'plugin instance params. Also contain the params value which user input in web ui.', `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `instance_name` varchar(200) DEFAULT NULL COMMENT 'alert instance name', + `instance_name` varchar(255) DEFAULT NULL COMMENT 'alert instance name', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE = utf8_bin; @@ -1049,10 +1049,10 @@ CREATE TABLE `t_ds_alert_plugin_instance` ( DROP TABLE IF EXISTS `t_ds_dq_comparison_type`; CREATE TABLE `t_ds_dq_comparison_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `type` varchar(100) NOT NULL, + `type` varchar(255) NOT NULL, `execute_sql` text DEFAULT NULL, `output_table` varchar(100) DEFAULT NULL, - `name` varchar(100) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, `create_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL, `is_inner_source` tinyint(1) DEFAULT '0', @@ -1116,7 +1116,7 @@ CREATE TABLE `t_ds_dq_execute_result` ( DROP TABLE IF EXISTS `t_ds_dq_rule`; CREATE TABLE `t_ds_dq_rule` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, + `name` varchar(255) DEFAULT NULL, `type` int(11) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, `create_time` datetime DEFAULT NULL, @@ -1828,7 +1828,7 @@ DROP TABLE IF EXISTS `t_ds_environment`; CREATE TABLE `t_ds_environment` ( `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `code` bigint(20) DEFAULT NULL COMMENT 'encoding', - `name` varchar(100) NOT NULL COMMENT 'environment name', + `name` varchar(255) NOT NULL COMMENT 'environment name', `config` text NULL DEFAULT NULL COMMENT 'this config contains many environment variables config', `description` text NULL DEFAULT NULL COMMENT 'the details', `operator` int(11) DEFAULT NULL COMMENT 'operator user id', @@ -1861,7 +1861,7 @@ DROP TABLE IF EXISTS `t_ds_task_group_queue`; CREATE TABLE `t_ds_task_group_queue` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT'key', `task_id` int(11) DEFAULT NULL COMMENT 'taskintanceid', - `task_name` varchar(100) DEFAULT NULL COMMENT 'TaskInstance name', + `task_name` varchar(255) DEFAULT NULL COMMENT 'TaskInstance name', `group_id` int(11) DEFAULT NULL COMMENT 'taskGroup id', `process_id` int(11) DEFAULT NULL COMMENT 'processInstace id', `priority` int(8) DEFAULT '0' COMMENT 'priority', @@ -1879,7 +1879,7 @@ CREATE TABLE `t_ds_task_group_queue` ( DROP TABLE IF EXISTS `t_ds_task_group`; CREATE TABLE `t_ds_task_group` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT'key', - `name` varchar(100) DEFAULT NULL COMMENT 'task_group name', + `name` varchar(255) DEFAULT NULL COMMENT 'task_group name', `description` varchar(255) DEFAULT NULL, `group_size` int (11) NOT NULL COMMENT'group size', `use_size` int (11) DEFAULT '0' COMMENT 'used size', @@ -1911,7 +1911,7 @@ CREATE TABLE `t_ds_audit_log` ( DROP TABLE IF EXISTS `t_ds_k8s`; CREATE TABLE `t_ds_k8s` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `k8s_name` varchar(100) DEFAULT NULL, + `k8s_name` varchar(255) DEFAULT NULL, `k8s_config` text DEFAULT NULL, `create_time` datetime DEFAULT NULL COMMENT 'create time', `update_time` datetime DEFAULT NULL COMMENT 'update time', @@ -1926,7 +1926,7 @@ CREATE TABLE `t_ds_k8s_namespace` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` bigint(20) NOT NULL DEFAULT '0', `limits_memory` int(11) DEFAULT NULL, - `namespace` varchar(100) DEFAULT NULL, + `namespace` varchar(255) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, `pod_replicas` int(11) DEFAULT NULL, `pod_request_cpu` decimal(14,3) DEFAULT NULL, @@ -1977,7 +1977,7 @@ DROP TABLE IF EXISTS `t_ds_cluster`; CREATE TABLE `t_ds_cluster`( `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id', `code` bigint(20) DEFAULT NULL COMMENT 'encoding', - `name` varchar(100) NOT NULL COMMENT 'cluster name', + `name` varchar(255) NOT NULL COMMENT 'cluster name', `config` text NULL DEFAULT NULL COMMENT 'this config contains many cluster variables config', `description` text NULL DEFAULT NULL COMMENT 'the details', `operator` int(11) DEFAULT NULL COMMENT 'operator user id', diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql index 9c5f60a372..fadf0e2027 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql @@ -263,7 +263,7 @@ CREATE TABLE t_ds_command ( executor_id int DEFAULT NULL , update_time timestamp DEFAULT NULL , process_instance_priority int DEFAULT '2' , - worker_group varchar(64), + worker_group varchar(255), environment_code bigint DEFAULT '-1', dry_run int DEFAULT '0' , process_instance_id int DEFAULT 0, @@ -313,7 +313,7 @@ CREATE TABLE t_ds_error_command ( executor_id int DEFAULT NULL , update_time timestamp DEFAULT NULL , process_instance_priority int DEFAULT '2' , - worker_group varchar(64), + worker_group varchar(255), environment_code bigint DEFAULT '-1', dry_run int DEFAULT '0' , message text , @@ -551,7 +551,7 @@ CREATE TABLE t_ds_process_instance ( history_cmd text , dependence_schedule_times text , process_instance_priority int DEFAULT '2' , - worker_group varchar(64) , + worker_group varchar(255) , environment_code bigint DEFAULT '-1', timeout int DEFAULT '0' , tenant_id int NOT NULL DEFAULT '-1' , @@ -574,7 +574,7 @@ create index start_time_index on t_ds_process_instance (start_time,end_time); DROP TABLE IF EXISTS t_ds_project; CREATE TABLE t_ds_project ( id int NOT NULL , - name varchar(100) DEFAULT NULL , + name varchar(255) DEFAULT NULL , code bigint NOT NULL, description varchar(255) DEFAULT NULL , user_id int DEFAULT NULL , @@ -723,7 +723,7 @@ CREATE TABLE t_ds_schedules ( warning_type int NOT NULL , warning_group_id int DEFAULT NULL , process_instance_priority int DEFAULT '2' , - worker_group varchar(64), + worker_group varchar(255), environment_code bigint DEFAULT '-1', create_time timestamp NOT NULL , update_time timestamp NOT NULL , @@ -776,7 +776,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 varchar(64), + worker_group varchar(255), environment_code bigint DEFAULT '-1', environment_config text, executor_id int DEFAULT NULL , @@ -820,7 +820,7 @@ DROP TABLE IF EXISTS t_ds_udfs; CREATE TABLE t_ds_udfs ( id int NOT NULL , user_id int NOT NULL , - func_name varchar(100) NOT NULL , + func_name varchar(255) NOT NULL , class_name varchar(255) NOT NULL , type int NOT NULL , arg_types varchar(255) DEFAULT NULL , @@ -864,7 +864,7 @@ comment on column t_ds_user.state is 'state 0:disable 1:enable'; DROP TABLE IF EXISTS t_ds_version; CREATE TABLE t_ds_version ( id int NOT NULL , - version varchar(200) NOT NULL, + version varchar(63) NOT NULL, PRIMARY KEY (id) ) ; create index version_index on t_ds_version(version); @@ -997,8 +997,8 @@ INSERT INTO t_ds_version(version) VALUES ('1.4.0'); DROP TABLE IF EXISTS t_ds_plugin_define; CREATE TABLE t_ds_plugin_define ( id serial NOT NULL, - plugin_name varchar(100) NOT NULL, - plugin_type varchar(100) NOT NULL, + plugin_name varchar(255) NOT NULL, + plugin_type varchar(63) NOT NULL, plugin_params text NULL, create_time timestamp NULL, update_time timestamp NULL, @@ -1017,7 +1017,7 @@ CREATE TABLE t_ds_alert_plugin_instance ( plugin_instance_params text NULL, create_time timestamp NULL, update_time timestamp NULL, - instance_name varchar(200) NULL, + instance_name varchar(255) NULL, CONSTRAINT t_ds_alert_plugin_instance_pk PRIMARY KEY (id) ); @@ -1093,7 +1093,7 @@ CREATE TABLE t_ds_dq_execute_result ( DROP TABLE IF EXISTS t_ds_dq_rule; CREATE TABLE t_ds_dq_rule ( id serial NOT NULL, - "name" varchar(100) DEFAULT NULL, + "name" varchar(255) DEFAULT NULL, "type" int4 NULL, user_id int4 NULL, create_time timestamp NULL, @@ -1801,7 +1801,7 @@ DROP TABLE IF EXISTS t_ds_environment; CREATE TABLE t_ds_environment ( id serial NOT NULL, code bigint NOT NULL, - name varchar(100) DEFAULT NULL, + name varchar(255) DEFAULT NULL, config text DEFAULT NULL, description text, operator int DEFAULT NULL, @@ -1836,7 +1836,7 @@ DROP TABLE IF EXISTS t_ds_task_group_queue; CREATE TABLE t_ds_task_group_queue ( id serial NOT NULL, task_id int DEFAULT NULL , - task_name VARCHAR(100) DEFAULT NULL , + task_name VARCHAR(255) DEFAULT NULL , group_id int DEFAULT NULL , process_id int DEFAULT NULL , priority int DEFAULT '0' , @@ -1855,7 +1855,7 @@ CREATE TABLE t_ds_task_group_queue ( DROP TABLE IF EXISTS t_ds_task_group; CREATE TABLE t_ds_task_group ( id serial NOT NULL, - name varchar(100) DEFAULT NULL , + name varchar(255) DEFAULT NULL , description varchar(255) DEFAULT NULL , group_size int NOT NULL , project_code bigint DEFAULT '0' , @@ -1888,7 +1888,7 @@ CREATE TABLE t_ds_audit_log ( DROP TABLE IF EXISTS t_ds_k8s; CREATE TABLE t_ds_k8s ( id serial NOT NULL, - k8s_name VARCHAR(100) DEFAULT NULL , + k8s_name VARCHAR(255) DEFAULT NULL , k8s_config text , create_time timestamp DEFAULT NULL , update_time timestamp DEFAULT NULL , @@ -1904,7 +1904,7 @@ CREATE TABLE t_ds_k8s_namespace ( id serial NOT NULL, code bigint NOT NULL, limits_memory int DEFAULT NULL , - namespace varchar(100) DEFAULT NULL , + namespace varchar(255) DEFAULT NULL , user_id int DEFAULT NULL, pod_replicas int DEFAULT NULL, pod_request_cpu NUMERIC(13,4) NULL, @@ -1958,7 +1958,7 @@ DROP TABLE IF EXISTS t_ds_cluster; CREATE TABLE t_ds_cluster( id serial NOT NULL, code bigint NOT NULL, - name varchar(100) DEFAULT NULL, + name varchar(255) DEFAULT NULL, config text DEFAULT NULL, description text, operator int DEFAULT NULL, diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql index 44b545c2bd..8a56785d35 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql @@ -353,3 +353,32 @@ alter table t_ds_trigger_relation CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin ALTER TABLE `t_ds_alert` MODIFY `title` varchar (512) null comment 'title'; +ALTER TABLE `t_ds_command` MODIFY `worker_group` varchar(255) COMMENT 'worker group'; +ALTER TABLE `t_ds_error_command` MODIFY `worker_group` varchar(255) COMMENT 'worker group'; +ALTER TABLE `t_ds_process_definition_log` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'process definition name'; +ALTER TABLE `t_ds_task_definition` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'task definition name'; +ALTER TABLE `t_ds_task_definition` MODIFY `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker grouping'; +ALTER TABLE `t_ds_task_definition_log` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'task definition name'; +ALTER TABLE `t_ds_task_definition_log` MODIFY `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker grouping'; +ALTER TABLE `t_ds_process_task_relation` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'relation name'; +ALTER TABLE `t_ds_process_task_relation_log` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'relation name'; +ALTER TABLE `t_ds_process_instance` MODIFY `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker group id'; +ALTER TABLE `t_ds_project` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'project name'; +ALTER TABLE `t_ds_schedules` MODIFY `worker_group` varchar(255) DEFAULT '' COMMENT 'worker group id'; +ALTER TABLE `t_ds_task_instance` MODIFY `worker_group` varchar(255) DEFAULT NULL COMMENT 'worker group id'; +ALTER TABLE `t_ds_udfs` MODIFY `func_name` varchar(255) NOT NULL COMMENT 'UDF function name'; +ALTER TABLE `t_ds_version` MODIFY `version` varchar(63) NOT NULL; +ALTER TABLE `t_ds_plugin_define` MODIFY `plugin_name` varchar(255) NOT NULL COMMENT 'the name of plugin eg: email'; +ALTER TABLE `t_ds_plugin_define` MODIFY `plugin_type` varchar(63) NOT NULL COMMENT 'plugin type . alert=alert plugin, job=job plugin'; +ALTER TABLE `t_ds_alert_plugin_instance` MODIFY `instance_name` varchar(255) DEFAULT NULL COMMENT 'alert instance name'; +ALTER TABLE `t_ds_dq_comparison_type` MODIFY `type` varchar(255) NOT NULL; +ALTER TABLE `t_ds_dq_comparison_type` MODIFY `name` varchar(255) DEFAULT NULL; +ALTER TABLE `t_ds_dq_rule` MODIFY `name` varchar(255) DEFAULT NULL; +ALTER TABLE `t_ds_environment` MODIFY `name` varchar(255) NOT NULL COMMENT 'environment name'; +ALTER TABLE `t_ds_task_group_queue` MODIFY `task_name` varchar(255) DEFAULT NULL COMMENT 'TaskInstance name'; +ALTER TABLE `t_ds_task_group` MODIFY `name` varchar(255) DEFAULT NULL COMMENT 'task_group name'; +ALTER TABLE `t_ds_k8s` MODIFY `k8s_name` varchar(255) DEFAULT NULL; +ALTER TABLE `t_ds_k8s_namespace` MODIFY `namespace` varchar(255) DEFAULT NULL; +ALTER TABLE `t_ds_cluster` MODIFY `name` varchar(255) NOT NULL COMMENT 'cluster name'; + + diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_ddl.sql index 5d6e20d5ad..4fbf029383 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_ddl.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/postgresql/dolphinscheduler_ddl.sql @@ -224,4 +224,21 @@ select add_t_ds_task_instance_add_project_code(); DROP FUNCTION add_t_ds_task_instance_add_project_code(); ALTER TABLE `t_ds_alert` - MODIFY `title` varchar(512) DEFAULT NULL ; \ No newline at end of file + MODIFY `title` varchar(512) DEFAULT NULL ; + +ALTER TABLE `t_ds_command` MODIFY `worker_group` varchar(255); +ALTER TABLE `t_ds_project` MODIFY name varchar(255) DEFAULT NULL ; +ALTER TABLE `t_ds_schedules` MODIFY worker_group varchar(255); +ALTER TABLE `t_ds_task_instance` MODIFY worker_group varchar(255); +ALTER TABLE `t_ds_udfs` MODIFY func_name varchar(255) NOT NULL ; +ALTER TABLE `t_ds_version` MODIFY version varchar(63) NOT NULL; +ALTER TABLE `t_ds_plugin_define` MODIFY plugin_name varchar(255) NOT NULL; +ALTER TABLE `t_ds_plugin_define` MODIFY plugin_type varchar(63) NOT NULL; +ALTER TABLE `t_ds_alert_plugin_instance` MODIFY instance_name varchar(255) NULL; +ALTER TABLE `t_ds_dq_rule` MODIFY "name" varchar(255) DEFAULT NULL; +ALTER TABLE `t_ds_environment` MODIFY name varchar(255) DEFAULT NULL; +ALTER TABLE `t_ds_task_group_queue` MODIFY task_name VARCHAR(255) DEFAULT NULL ; +ALTER TABLE `t_ds_task_group` MODIFY name varchar(255) DEFAULT NULL ; +ALTER TABLE `t_ds_k8s` MODIFY k8s_name VARCHAR(255) DEFAULT NULL ; +ALTER TABLE `t_ds_k8s_namespace` MODIFY namespace varchar(255) DEFAULT NULL ; +ALTER TABLE `t_ds_cluster` MODIFY name varchar(255) DEFAULT NULL; \ No newline at end of file