Browse Source

fix bug: data too long for column 'app_link' (#2146)

* fix bug: data to long for app_link field

* change app_link field length in 1.2.2 ddl

* change app_link field type to text
pull/3/MERGE
Yelli 5 years ago committed by gaojun2048
parent
commit
d7614c059b
  1. 20
      sql/upgrade/1.2.2_schema/mysql/dolphinscheduler_ddl.sql
  2. 18
      sql/upgrade/1.2.2_schema/postgresql/dolphinscheduler_ddl.sql

20
sql/upgrade/1.2.2_schema/mysql/dolphinscheduler_ddl.sql

@ -55,3 +55,23 @@ d//
delimiter ; delimiter ;
CALL uc_dolphin_T_t_ds_task_instance_A_executor_id; CALL uc_dolphin_T_t_ds_task_instance_A_executor_id;
DROP PROCEDURE uc_dolphin_T_t_ds_task_instance_A_executor_id; DROP PROCEDURE uc_dolphin_T_t_ds_task_instance_A_executor_id;
-- uc_dolphin_T_t_ds_task_instance_C_app_link
drop PROCEDURE if EXISTS uc_dolphin_T_t_ds_task_instance_C_app_link;
delimiter d//
CREATE PROCEDURE uc_dolphin_T_t_ds_task_instance_C_app_link()
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_NAME='t_ds_task_instance'
AND TABLE_SCHEMA=(SELECT DATABASE())
AND COLUMN_NAME ='app_link')
THEN
ALTER TABLE t_ds_task_instance CHANGE COLUMN app_link app_link text COMMENT 'yarn app id';
END IF;
END;
d//
delimiter ;
CALL uc_dolphin_T_t_ds_task_instance_C_app_link;
DROP PROCEDURE uc_dolphin_T_t_ds_task_instance_C_app_link;

18
sql/upgrade/1.2.2_schema/postgresql/dolphinscheduler_ddl.sql

@ -49,3 +49,21 @@ d//
delimiter ; delimiter ;
SELECT uc_dolphin_T_t_ds_task_instance_A_executor_id(); SELECT uc_dolphin_T_t_ds_task_instance_A_executor_id();
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_A_executor_id(); DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_A_executor_id();
-- uc_dolphin_T_t_ds_task_instance_C_app_link
delimiter d//
CREATE OR REPLACE FUNCTION uc_dolphin_T_t_ds_task_instance_C_app_link() RETURNS void AS $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_NAME='t_ds_task_instance'
AND COLUMN_NAME ='app_link')
THEN
ALTER TABLE t_ds_task_instance ALTER COLUMN app_link type text;
END IF;
END;
$$ LANGUAGE plpgsql;
d//
delimiter ;
SELECT uc_dolphin_T_t_ds_task_instance_C_app_link();
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_C_app_link();
Loading…
Cancel
Save