This is an automated email from the ASF dual-hosted git repository.
caishunfeng pushed a commit to branch 2.0.2-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.2-prepare by this push:
new 281cea8 fix 2.0.2 upgrade sql (#7566)
281cea8 is described below
commit 281cea8a64c2c15a124c8bdbe121026a97b8561d
Author: wind <[email protected]>
AuthorDate: Thu Dec 23 11:43:11 2021 +0800
fix 2.0.2 upgrade sql (#7566)
Co-authored-by: caishunfeng <[email protected]>
---
.../2.0.2_schema/mysql/dolphinscheduler_ddl.sql | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.2_schema/mysql/dolphinscheduler_ddl.sql
b/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.2_schema/mysql/dolphinscheduler_ddl.sql
index c7a2396..2525b3c 100644
---
a/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.2_schema/mysql/dolphinscheduler_ddl.sql
+++
b/dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.2_schema/mysql/dolphinscheduler_ddl.sql
@@ -17,4 +17,22 @@
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
-alter table t_ds_process_instance add column if not exists `restart_time`
datetime DEFAULT NULL COMMENT 'process instance restart time';
\ No newline at end of file
+-- uc_dolphin_T_t_ds_process_instance_A_restart_time
+drop PROCEDURE if EXISTS uc_dolphin_T_t_ds_process_instance_A_restart_time;
+delimiter d//
+CREATE PROCEDURE uc_dolphin_T_t_ds_process_instance_A_restart_time()
+ 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 ='restart_time')
+ THEN
+ ALTER TABLE t_ds_process_instance ADD COLUMN `restart_time` datetime
DEFAULT NULL COMMENT 'process instance restart time';
+ END IF;
+ END;
+
+d//
+
+delimiter ;
+CALL uc_dolphin_T_t_ds_process_instance_A_restart_time();
+DROP PROCEDURE uc_dolphin_T_t_ds_process_instance_A_restart_time;
\ No newline at end of file