From 1b4d25df153c410dba66f57f74ac0fe23a6e0198 Mon Sep 17 00:00:00 2001 From: Wink <32723967+aiwenmo@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:44:35 +0800 Subject: [PATCH] [Fix-3196] [datastudio] Data too long for column 'job_id'(varchar(50)) in table dinky_history (#3200) Co-authored-by: wenmo <32723967+wenmo@users.noreply.github.com> --- script/sql/dinky-mysql.sql | 2 +- script/sql/dinky-pg.sql | 2 +- script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/script/sql/dinky-mysql.sql b/script/sql/dinky-mysql.sql index bae24a4745..d5ebafdf92 100644 --- a/script/sql/dinky-mysql.sql +++ b/script/sql/dinky-mysql.sql @@ -1174,7 +1174,7 @@ CREATE TABLE `dinky_history` ( `cluster_id` int(11) NOT NULL DEFAULT 0 COMMENT 'cluster ID', `cluster_configuration_id` int(11) NULL DEFAULT NULL COMMENT 'cluster configuration id', `session` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'session', - `job_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Job ID', + `job_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Job ID', `job_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Job Name', `job_manager_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'JJobManager Address', `status` int(11) NOT NULL DEFAULT 0 COMMENT 'status', diff --git a/script/sql/dinky-pg.sql b/script/sql/dinky-pg.sql index ed7d30d5ed..fd7fe0419b 100644 --- a/script/sql/dinky-pg.sql +++ b/script/sql/dinky-pg.sql @@ -2365,7 +2365,7 @@ CREATE TABLE dinky_history cluster_id INT NOT NULL DEFAULT 0, cluster_configuration_id INT NULL, session VARCHAR(255) NULL, - job_id VARCHAR(50) NULL, + job_id VARCHAR(255) NULL, job_name VARCHAR(255) NULL, job_manager_address VARCHAR(255) NULL, status INT NOT NULL DEFAULT 0, diff --git a/script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql b/script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql index c671821407..7eb69d4604 100644 --- a/script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql +++ b/script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql @@ -443,5 +443,9 @@ alter table dinky_database alter table dinky_database drop column password; +alter table dinky_history + modify job_id varchar(255) null comment 'Job ID'; + + SET FOREIGN_KEY_CHECKS = 1;