Commit 56c9c5f7 authored by Frank Bergmann's avatar Frank Bergmann

- Fixed PostgreSQL 9.x issues

parent 08a60071
......@@ -15,16 +15,15 @@ create function inline_0 () returns integer as $$
declare
workflow_rec record;
begin
for workflow_rec in select w.workflow_key, t.table_name
from wf_workflows w, acs_object_types t
where t.object_type = w.workflow_key
for workflow_rec in
select w.workflow_key, t.table_name
from wf_workflows w, acs_object_types t
where t.object_type = w.workflow_key
LOOP
PERFORM workflow__delete_cases(workflow_rec.workflow_key);
execute 'drop table ' || workflow_rec.table_name;
execute 'drop table if exists ' || workflow_rec.table_name;
PERFORM workflow__drop_workflow(workflow_rec.workflow_key);
end loop;
return null;
end;$$ language 'plpgsql';
......@@ -33,50 +32,48 @@ drop function inline_0 ();
/* Sequences */
drop sequence t_wf_task_id_seq;
drop sequence t_wf_token_id_seq;
drop sequence if exists t_wf_task_id_seq;
drop sequence if exists t_wf_token_id_seq;
/* Views */
drop view wf_task_id_seq;
drop view wf_token_id_seq;
drop view wf_user_tasks;
drop view wf_enabled_transitions;
drop view wf_transition_places;
drop view wf_role_info;
drop view wf_transition_info;
drop view wf_transition_contexts;
drop view if exists wf_task_id_seq;
drop view if exists wf_token_id_seq;
drop view if exists wf_user_tasks;
drop view if exists wf_enabled_transitions;
drop view if exists wf_transition_places;
drop view if exists wf_role_info;
drop view if exists wf_transition_info;
drop view if exists wf_transition_contexts;
/* Operational level */
drop table wf_attribute_value_audit;
drop table wf_tokens;
drop table wf_task_assignments;
drop table wf_tasks;
drop table wf_case_assignments;
drop table wf_case_deadlines;
drop table wf_cases;
drop table if exists wf_attribute_value_audit;
drop table if exists wf_tokens;
drop table if exists wf_task_assignments;
drop table if exists wf_tasks;
drop table if exists wf_case_assignments;
drop table if exists wf_case_deadlines;
drop table if exists wf_cases;
/* Context level */
drop table wf_context_assignments;
drop table wf_context_task_panels;
drop table wf_context_role_info;
drop table wf_context_transition_info;
drop table wf_context_workflow_info;
drop table wf_contexts;
drop table if exists wf_context_assignments;
drop table if exists wf_context_task_panels;
drop table if exists wf_context_role_info;
drop table if exists wf_context_transition_info;
drop table if exists wf_context_workflow_info;
drop table if exists wf_contexts;
/* Knowledge Level */
drop table wf_transition_role_assign_map;
drop table wf_transition_attribute_map;
drop table wf_arcs;
drop table wf_transitions;
drop table wf_roles;
drop table wf_places;
drop table wf_workflows;
drop table if exists wf_transition_role_assign_map;
drop table if exists wf_transition_attribute_map;
drop table if exists wf_arcs;
drop table if exists wf_transitions;
drop table if exists wf_roles;
drop table if exists wf_places;
drop table if exists wf_workflows;
/* acs_object_type */
select acs_object_type__drop_type(
'workflow',
't'
);
);
......@@ -1000,7 +1000,7 @@ begin
if execute_time_callback__callback = '' or execute_time_callback__callback is null then
return null;
end if;
v_str := 'select ' || execute_time_callback__callback || '(' ||
execute_time_callback__case_id || ',' ||
quote_literal(execute_time_callback__transition_key) || ',' ||
......@@ -1214,8 +1214,7 @@ begin
insert into wf_tokens
(token_id, case_id, workflow_key, place_key, state, produced_journal_id)
values
(v_token_id, add_token__case_id, v_workflow_key, add_token__place_key,
values (v_token_id, add_token__case_id, v_workflow_key, add_token__place_key,
'free', add_token__journal_id);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment