|
|
@ -152,32 +152,11 @@ select ac_dolphin_T_t_ds_process_definition_A_resource_ids(); |
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_process_definition_A_resource_ids(); |
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_process_definition_A_resource_ids(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- ac_dolphin_T_t_ds_process_instance_A_worker_group |
|
|
|
-- uc_dolphin_T_t_ds_process_instance_R_worker_group_id |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_process_instance_A_worker_group(); |
|
|
|
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_process_instance_R_worker_group_id(); |
|
|
|
delimiter d// |
|
|
|
delimiter d// |
|
|
|
CREATE FUNCTION ac_dolphin_T_t_ds_process_instance_A_worker_group() RETURNS void AS $$ |
|
|
|
CREATE FUNCTION uc_dolphin_T_t_ds_process_instance_R_worker_group_id() RETURNS void AS $$ |
|
|
|
BEGIN |
|
|
|
|
|
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
|
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
|
|
|
|
AND TABLE_SCHEMA=current_schema() |
|
|
|
|
|
|
|
AND TABLE_NAME='t_ds_process_instance' |
|
|
|
|
|
|
|
AND COLUMN_NAME ='worker_group') |
|
|
|
|
|
|
|
THEN |
|
|
|
|
|
|
|
ALTER TABLE t_ds_process_instance ADD COLUMN worker_group varchar(64) DEFAULT null; |
|
|
|
|
|
|
|
END IF; |
|
|
|
|
|
|
|
END; |
|
|
|
|
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
|
|
|
|
d// |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
select ac_dolphin_T_t_ds_process_instance_A_worker_group(); |
|
|
|
|
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_process_instance_A_worker_group(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- dc_dolphin_T_t_ds_process_instance_D_worker_group_id |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS dc_dolphin_T_t_ds_process_instance_D_worker_group_id(); |
|
|
|
|
|
|
|
delimiter d// |
|
|
|
|
|
|
|
CREATE FUNCTION dc_dolphin_T_t_ds_process_instance_D_worker_group_id() RETURNS void AS $$ |
|
|
|
|
|
|
|
BEGIN |
|
|
|
BEGIN |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
@ -185,42 +164,22 @@ BEGIN |
|
|
|
AND TABLE_NAME='t_ds_process_instance' |
|
|
|
AND TABLE_NAME='t_ds_process_instance' |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
THEN |
|
|
|
THEN |
|
|
|
ALTER TABLE t_ds_process_instance DROP COLUMN worker_group_id; |
|
|
|
ALTER TABLE t_ds_process_instance RENAME worker_group_id TO worker_group; |
|
|
|
|
|
|
|
ALTER TABLE t_ds_process_instance ALTER COLUMN worker_group type varchar(64); |
|
|
|
END IF; |
|
|
|
END IF; |
|
|
|
END; |
|
|
|
END; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
d// |
|
|
|
d// |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
select dc_dolphin_T_t_ds_process_instance_D_worker_group_id(); |
|
|
|
select uc_dolphin_T_t_ds_process_instance_R_worker_group_id(); |
|
|
|
DROP FUNCTION dc_dolphin_T_t_ds_process_instance_D_worker_group_id(); |
|
|
|
DROP FUNCTION uc_dolphin_T_t_ds_process_instance_R_worker_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- ac_dolphin_T_t_ds_task_instance_A_worker_group |
|
|
|
-- uc_dolphin_T_t_ds_task_instance_R_worker_group_id |
|
|
|
delimiter ; |
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_task_instance_A_worker_group(); |
|
|
|
|
|
|
|
delimiter d// |
|
|
|
|
|
|
|
CREATE FUNCTION ac_dolphin_T_t_ds_task_instance_A_worker_group() RETURNS void AS $$ |
|
|
|
|
|
|
|
BEGIN |
|
|
|
|
|
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
|
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
|
|
|
|
AND TABLE_SCHEMA=current_schema() |
|
|
|
|
|
|
|
AND TABLE_NAME='t_ds_task_instance' |
|
|
|
|
|
|
|
AND COLUMN_NAME ='worker_group') |
|
|
|
|
|
|
|
THEN |
|
|
|
|
|
|
|
ALTER TABLE t_ds_task_instance ADD COLUMN worker_group varchar(64) DEFAULT null; |
|
|
|
|
|
|
|
END IF; |
|
|
|
|
|
|
|
END; |
|
|
|
|
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
|
|
|
|
d// |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
select ac_dolphin_T_t_ds_task_instance_A_worker_group(); |
|
|
|
|
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_task_instance_A_worker_group(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- dc_dolphin_T_t_ds_task_instance_D_worker_group_id |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
DROP FUNCTION IF EXISTS dc_dolphin_T_t_ds_task_instance_D_worker_group_id(); |
|
|
|
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_task_instance_R_worker_group_id(); |
|
|
|
delimiter d// |
|
|
|
delimiter d// |
|
|
|
CREATE FUNCTION dc_dolphin_T_t_ds_task_instance_D_worker_group_id() RETURNS void AS $$ |
|
|
|
CREATE FUNCTION uc_dolphin_T_t_ds_task_instance_R_worker_group_id() RETURNS void AS $$ |
|
|
|
BEGIN |
|
|
|
BEGIN |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
@ -228,41 +187,21 @@ BEGIN |
|
|
|
AND TABLE_NAME='t_ds_task_instance' |
|
|
|
AND TABLE_NAME='t_ds_task_instance' |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
THEN |
|
|
|
THEN |
|
|
|
ALTER TABLE t_ds_task_instance DROP COLUMN worker_group_id; |
|
|
|
ALTER TABLE t_ds_task_instance rename worker_group_id to worker_group; |
|
|
|
|
|
|
|
ALTER TABLE t_ds_task_instance alter column worker_group type varchar(64); |
|
|
|
END IF; |
|
|
|
END IF; |
|
|
|
END; |
|
|
|
END; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
d// |
|
|
|
d// |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
select dc_dolphin_T_t_ds_task_instance_D_worker_group_id(); |
|
|
|
select uc_dolphin_T_t_ds_task_instance_R_worker_group_id(); |
|
|
|
DROP FUNCTION dc_dolphin_T_t_ds_task_instance_D_worker_group_id(); |
|
|
|
DROP FUNCTION uc_dolphin_T_t_ds_task_instance_R_worker_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
-- ac_dolphin_T_t_ds_schedules_A_worker_group |
|
|
|
-- uc_dolphin_T_t_ds_schedules_R_worker_group_id |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_schedules_A_worker_group(); |
|
|
|
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_schedules_R_worker_group_id(); |
|
|
|
delimiter d// |
|
|
|
delimiter d// |
|
|
|
CREATE FUNCTION ac_dolphin_T_t_ds_schedules_A_worker_group() RETURNS void AS $$ |
|
|
|
CREATE FUNCTION uc_dolphin_T_t_ds_schedules_R_worker_group_id() RETURNS void AS $$ |
|
|
|
BEGIN |
|
|
|
|
|
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
|
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
|
|
|
|
AND TABLE_SCHEMA=current_schema() |
|
|
|
|
|
|
|
AND TABLE_NAME='t_ds_schedules' |
|
|
|
|
|
|
|
AND COLUMN_NAME ='worker_group') |
|
|
|
|
|
|
|
THEN |
|
|
|
|
|
|
|
ALTER TABLE t_ds_schedules ADD COLUMN worker_group varchar(64) DEFAULT null; |
|
|
|
|
|
|
|
END IF; |
|
|
|
|
|
|
|
END; |
|
|
|
|
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
|
|
|
|
d// |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
select ac_dolphin_T_t_ds_schedules_A_worker_group(); |
|
|
|
|
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_schedules_A_worker_group(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- dc_dolphin_T_t_ds_schedules_D_worker_group_id |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS dc_dolphin_T_t_ds_schedules_D_worker_group_id(); |
|
|
|
|
|
|
|
delimiter d// |
|
|
|
|
|
|
|
CREATE FUNCTION dc_dolphin_T_t_ds_schedules_D_worker_group_id() RETURNS void AS $$ |
|
|
|
|
|
|
|
BEGIN |
|
|
|
BEGIN |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
@ -270,20 +209,21 @@ BEGIN |
|
|
|
AND TABLE_NAME='t_ds_schedules' |
|
|
|
AND TABLE_NAME='t_ds_schedules' |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
THEN |
|
|
|
THEN |
|
|
|
ALTER TABLE t_ds_schedules DROP COLUMN worker_group_id; |
|
|
|
ALTER TABLE t_ds_schedules rename worker_group_id to worker_group; |
|
|
|
|
|
|
|
ALTER TABLE t_ds_schedules alter column worker_group type varchar(64); |
|
|
|
END IF; |
|
|
|
END IF; |
|
|
|
END; |
|
|
|
END; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
d// |
|
|
|
d// |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
select dc_dolphin_T_t_ds_schedules_D_worker_group_id(); |
|
|
|
select uc_dolphin_T_t_ds_schedules_R_worker_group_id(); |
|
|
|
DROP FUNCTION dc_dolphin_T_t_ds_schedules_D_worker_group_id(); |
|
|
|
DROP FUNCTION uc_dolphin_T_t_ds_schedules_R_worker_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
-- ac_dolphin_T_t_ds_command_A_worker_group |
|
|
|
-- uc_dolphin_T_t_ds_command_R_worker_group_id |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_command_A_worker_group(); |
|
|
|
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_command_R_worker_group_id(); |
|
|
|
delimiter d// |
|
|
|
delimiter d// |
|
|
|
CREATE FUNCTION ac_dolphin_T_t_ds_command_A_worker_group() RETURNS void AS $$ |
|
|
|
CREATE FUNCTION uc_dolphin_T_t_ds_command_R_worker_group_id() RETURNS void AS $$ |
|
|
|
BEGIN |
|
|
|
BEGIN |
|
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
@ -291,62 +231,21 @@ BEGIN |
|
|
|
AND TABLE_NAME='t_ds_command' |
|
|
|
AND TABLE_NAME='t_ds_command' |
|
|
|
AND COLUMN_NAME ='worker_group') |
|
|
|
AND COLUMN_NAME ='worker_group') |
|
|
|
THEN |
|
|
|
THEN |
|
|
|
ALTER TABLE t_ds_command ADD COLUMN worker_group varchar(64) DEFAULT null; |
|
|
|
ALTER TABLE t_ds_command rename worker_group_id to worker_group; |
|
|
|
END IF; |
|
|
|
ALTER TABLE t_ds_command alter column worker_group type varchar(64); |
|
|
|
END; |
|
|
|
|
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
|
|
|
|
d// |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
select ac_dolphin_T_t_ds_command_A_worker_group(); |
|
|
|
|
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_command_A_worker_group(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- dc_dolphin_T_t_ds_command_D_worker_group_id |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS dc_dolphin_T_t_ds_command_D_worker_group_id(); |
|
|
|
|
|
|
|
delimiter d// |
|
|
|
|
|
|
|
CREATE FUNCTION dc_dolphin_T_t_ds_command_D_worker_group_id() RETURNS void AS $$ |
|
|
|
|
|
|
|
BEGIN |
|
|
|
|
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
|
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
|
|
|
|
AND TABLE_SCHEMA=current_schema() |
|
|
|
|
|
|
|
AND TABLE_NAME='t_ds_command' |
|
|
|
|
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
|
|
|
|
THEN |
|
|
|
|
|
|
|
ALTER TABLE t_ds_command DROP COLUMN worker_group_id; |
|
|
|
|
|
|
|
END IF; |
|
|
|
|
|
|
|
END; |
|
|
|
|
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
|
|
|
|
d// |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
select dc_dolphin_T_t_ds_command_D_worker_group_id(); |
|
|
|
|
|
|
|
DROP FUNCTION dc_dolphin_T_t_ds_command_D_worker_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- ac_dolphin_T_t_ds_error_command_A_worker_group |
|
|
|
|
|
|
|
delimiter ; |
|
|
|
|
|
|
|
DROP FUNCTION IF EXISTS ac_dolphin_T_t_ds_error_command_A_worker_group(); |
|
|
|
|
|
|
|
delimiter d// |
|
|
|
|
|
|
|
CREATE FUNCTION ac_dolphin_T_t_ds_error_command_A_worker_group() RETURNS void AS $$ |
|
|
|
|
|
|
|
BEGIN |
|
|
|
|
|
|
|
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
|
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
|
|
|
|
AND TABLE_SCHEMA=current_schema() |
|
|
|
|
|
|
|
AND TABLE_NAME='t_ds_error_command' |
|
|
|
|
|
|
|
AND COLUMN_NAME ='worker_group') |
|
|
|
|
|
|
|
THEN |
|
|
|
|
|
|
|
ALTER TABLE t_ds_error_command ADD COLUMN worker_group varchar(64) DEFAULT null; |
|
|
|
|
|
|
|
END IF; |
|
|
|
END IF; |
|
|
|
END; |
|
|
|
END; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
d// |
|
|
|
d// |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
select ac_dolphin_T_t_ds_error_command_A_worker_group(); |
|
|
|
select uc_dolphin_T_t_ds_command_R_worker_group_id(); |
|
|
|
DROP FUNCTION ac_dolphin_T_t_ds_error_command_A_worker_group(); |
|
|
|
DROP FUNCTION uc_dolphin_T_t_ds_command_R_worker_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
-- dc_dolphin_T_t_ds_error_command_D_worker_group_id |
|
|
|
-- uc_dolphin_T_t_ds_error_command_R_worker_group_id |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
DROP FUNCTION IF EXISTS dc_dolphin_T_t_ds_error_command_D_worker_group_id(); |
|
|
|
DROP FUNCTION IF EXISTS uc_dolphin_T_t_ds_error_command_R_worker_group_id(); |
|
|
|
delimiter d// |
|
|
|
delimiter d// |
|
|
|
CREATE FUNCTION dc_dolphin_T_t_ds_error_command_D_worker_group_id() RETURNS void AS $$ |
|
|
|
CREATE FUNCTION uc_dolphin_T_t_ds_error_command_R_worker_group_id() RETURNS void AS $$ |
|
|
|
BEGIN |
|
|
|
BEGIN |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
|
WHERE TABLE_CATALOG=current_database() |
|
|
@ -354,14 +253,15 @@ BEGIN |
|
|
|
AND TABLE_NAME='t_ds_error_command' |
|
|
|
AND TABLE_NAME='t_ds_error_command' |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
AND COLUMN_NAME ='worker_group_id') |
|
|
|
THEN |
|
|
|
THEN |
|
|
|
ALTER TABLE t_ds_error_command DROP COLUMN worker_group_id; |
|
|
|
ALTER TABLE t_ds_error_command rename worker_group_id to worker_group; |
|
|
|
|
|
|
|
ALTER TABLE t_ds_error_command alter column worker_group type varchar(64); |
|
|
|
END IF; |
|
|
|
END IF; |
|
|
|
END; |
|
|
|
END; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
$$ LANGUAGE plpgsql; |
|
|
|
d// |
|
|
|
d// |
|
|
|
delimiter ; |
|
|
|
delimiter ; |
|
|
|
select dc_dolphin_T_t_ds_error_command_D_worker_group_id(); |
|
|
|
select uc_dolphin_T_t_ds_error_command_R_worker_group_id(); |
|
|
|
DROP FUNCTION dc_dolphin_T_t_ds_error_command_D_worker_group_id(); |
|
|
|
DROP FUNCTION uc_dolphin_T_t_ds_error_command_R_worker_group_id(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- uc_dolphin_T_t_ds_process_definition_A_process_definition_unique |
|
|
|
-- uc_dolphin_T_t_ds_process_definition_A_process_definition_unique |
|
|
|