select case when count(*) = 0 then 0 else 1 end from acs_object_types where pretty_name = :workflow_name
select object_type from acs_object_types
select constraint_name from user_constraints
create table $workflow_cases_table (
case_id integer primary key
constraint $workflow_cases_constraint
references wf_cases
)
insert into wf_places (place_key, workflow_key, place_name, sort_order)
values ('start', :workflow_key, 'Start place', 1)
insert into wf_places (place_key, workflow_key, place_name, sort_order)
values ('end', :workflow_key, 'End place', 999)
drop table $workflow_cases_table