From 133d1733ebcf1aa74ec929e974d9c07266145b1e Mon Sep 17 00:00:00 2001 From: Wenjun Ruan Date: Thu, 9 Feb 2023 09:41:07 +0800 Subject: [PATCH] Alter title in t_ds_alert to 512 (#13535) --- .../main/resources/sql/dolphinscheduler_h2.sql | 2 +- .../resources/sql/dolphinscheduler_mysql.sql | 2 +- .../sql/dolphinscheduler_postgresql.sql | 2 +- .../3.2.0_schema/mysql/dolphinscheduler_ddl.sql | 16 ++-------------- .../postgresql/dolphinscheduler_ddl.sql | 5 ++++- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql index 07c6820683..b54dfd07d6 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql @@ -271,7 +271,7 @@ DROP TABLE IF EXISTS t_ds_alert CASCADE; CREATE TABLE t_ds_alert ( id int(11) NOT NULL AUTO_INCREMENT, - title varchar(64) DEFAULT NULL, + title varchar(512) DEFAULT NULL, sign char(40) NOT NULL DEFAULT '', content text, alert_status tinyint(4) DEFAULT '0', diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql index 07ab0d3ef2..1955d52e64 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql @@ -278,7 +278,7 @@ CREATE TABLE `t_ds_access_token` ( DROP TABLE IF EXISTS `t_ds_alert`; CREATE TABLE `t_ds_alert` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key', - `title` varchar(64) DEFAULT NULL COMMENT 'title', + `title` varchar(512) DEFAULT NULL COMMENT 'title', `sign` char(40) NOT NULL DEFAULT '' COMMENT 'sign=sha1(content)', `content` text COMMENT 'Message content (can be email, can be SMS. Mail is stored in JSON map, and SMS is string)', `alert_status` tinyint(4) DEFAULT '0' COMMENT '0:wait running,1:success,2:failed', diff --git a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql index 15ecf49bb6..f3e6e43e64 100644 --- a/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql +++ b/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql @@ -207,7 +207,7 @@ CREATE TABLE t_ds_access_token ( DROP TABLE IF EXISTS t_ds_alert; CREATE TABLE t_ds_alert ( id int NOT NULL , - title varchar(64) DEFAULT NULL , + title varchar(512) DEFAULT NULL , sign varchar(40) NOT NULL DEFAULT '', content text , alert_status int DEFAULT '0' , 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 500b16db9e..5c91090c3d 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 @@ -298,18 +298,6 @@ delimiter ; CALL add_t_ds_task_instance_add_project_code; DROP PROCEDURE add_t_ds_task_instance_add_project_code; - -ALTER TABLE QRTZ_BLOB_TRIGGERS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_CALENDARS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_CRON_TRIGGERS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_FIRED_TRIGGERS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_JOB_DETAILS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_LOCKS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_PAUSED_TRIGGER_GRPS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_SCHEDULER_STATE CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_SIMPLE_TRIGGERS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_SIMPROP_TRIGGERS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; -alter table QRTZ_TRIGGERS CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; alter table t_ds_access_token CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; alter table t_ds_alert CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; alter table t_ds_alertgroup CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; @@ -363,6 +351,6 @@ alter table t_ds_cluster CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; alter table t_ds_fav_task CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin; 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'; 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 fc0e8e1e04..5d6e20d5ad 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 @@ -221,4 +221,7 @@ $$ LANGUAGE plpgsql; d// delimiter ; select add_t_ds_task_instance_add_project_code(); -DROP FUNCTION add_t_ds_task_instance_add_project_code(); \ No newline at end of file +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