From b4cf1ccaac59093963ec943f32fd421c3730ada6 Mon Sep 17 00:00:00 2001 From: Rick Cheng Date: Thu, 30 Nov 2023 13:56:22 +0800 Subject: [PATCH] [Improvement-15009][Parameter] Change project parameter value to text (#15010) --- .../src/main/resources/sql/dolphinscheduler_h2.sql | 2 +- .../src/main/resources/sql/dolphinscheduler_mysql.sql | 2 +- .../src/main/resources/sql/dolphinscheduler_postgresql.sql | 2 +- .../sql/upgrade/3.2.1_schema/mysql/dolphinscheduler_ddl.sql | 2 ++ .../upgrade/3.2.1_schema/postgresql/dolphinscheduler_ddl.sql | 2 ++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql index b26f57fcb1..2e18052aa6 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql @@ -666,7 +666,7 @@ CREATE TABLE t_ds_project_parameter ( id int(11) NOT NULL AUTO_INCREMENT, param_name varchar(255) NOT NULL, - param_value varchar(255) NOT NULL, + param_value text NOT NULL, code bigint(20) NOT NULL, project_code bigint(20) NOT NULL, user_id int(11) 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 eb5b5625b4..a264a868e5 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql @@ -669,7 +669,7 @@ DROP TABLE IF EXISTS `t_ds_project_parameter`; CREATE TABLE `t_ds_project_parameter` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key', `param_name` varchar(255) NOT NULL COMMENT 'project parameter name', - `param_value` varchar(255) NOT NULL COMMENT 'project parameter value', + `param_value` text NOT NULL COMMENT 'project parameter value', `code` bigint(20) NOT NULL COMMENT 'encoding', `project_code` bigint(20) NOT NULL COMMENT 'project code', `user_id` int(11) DEFAULT NULL COMMENT 'creator id', diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql index 2257074874..f013ee9373 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql @@ -594,7 +594,7 @@ DROP TABLE IF EXISTS t_ds_project_parameter; CREATE TABLE t_ds_project_parameter ( id int NOT NULL , param_name varchar(255) NOT NULL , - param_value varchar(255) NOT NULL , + param_value text NOT NULL , code bigint NOT NULL, project_code bigint NOT NULL, user_id int DEFAULT NULL , diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/mysql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/mysql/dolphinscheduler_ddl.sql index a7787e39e2..c71cca2941 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/mysql/dolphinscheduler_ddl.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/mysql/dolphinscheduler_ddl.sql @@ -101,3 +101,5 @@ d// delimiter ; CALL drop_t_ds_k8s_namespace_col_pod_request_memory; DROP PROCEDURE drop_t_ds_k8s_namespace_col_pod_request_memory; + +ALTER TABLE `t_ds_project_parameter` MODIFY COLUMN `param_value` text NOT NULL COMMENT 'project parameter value'; \ No newline at end of file diff --git a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/postgresql/dolphinscheduler_ddl.sql b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/postgresql/dolphinscheduler_ddl.sql index 1c0af6a687..80d8aaebf7 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/postgresql/dolphinscheduler_ddl.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.1_schema/postgresql/dolphinscheduler_ddl.sql @@ -21,3 +21,5 @@ ALTER TABLE "t_ds_k8s_namespace" DROP COLUMN IF EXISTS "limits_memory"; ALTER TABLE "t_ds_k8s_namespace" DROP COLUMN IF EXISTS "pod_replicas"; ALTER TABLE "t_ds_k8s_namespace" DROP COLUMN IF EXISTS "pod_request_cpu"; ALTER TABLE "t_ds_k8s_namespace" DROP COLUMN IF EXISTS "pod_request_memory"; + +ALTER TABLE t_ds_project_parameter ALTER COLUMN param_value TYPE text; \ No newline at end of file