Index: openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/wf-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/wf-core-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/wf-core-create.sql 13 Apr 2001 04:31:27 -0000 1.3 +++ openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/wf-core-create.sql 28 Apr 2001 19:58:39 -0000 1.4 @@ -50,15 +50,15 @@ constraint wf_workflows_workflow_key_fk references acs_object_types(object_type) on delete cascade, - description text default '' not null + description text ); comment on table wf_workflows is ' Parent table for the workflow definition. '; create table wf_places ( - place_key varchar(100) default '' not null, + place_key varchar(100), workflow_key varchar(100) constraint wf_place_workflow_fk references wf_workflows(workflow_key) @@ -82,7 +82,7 @@ '; create table wf_transitions ( - transition_key varchar(100) default '' not null, + transition_key varchar(100), transition_name varchar(100) constraint wf_transition_name_nn not null, @@ -94,7 +94,7 @@ sort_order integer constraint wf_transition_order_ck check (sort_order > 0), - trigger_type varchar(40) default '' not null + trigger_type varchar(40) constraint wf_transition_trigger_type_ck check (trigger_type in ('','automatic','user','message','time')), @@ -113,10 +113,10 @@ constraint wf_ts_arc_workflow_fk references wf_workflows(workflow_key) on delete cascade, - transition_key varchar(100) default '' not null, - place_key varchar(100) default '' not null, + transition_key varchar(100), + place_key varchar(100), -- direction is relative to the transition - direction varchar(3) default '' not null + direction varchar(3) constraint wf_arc_direction_ck check (direction in ('','in','out')), /* Must be satisfied for the arc to be traveled by a token @@ -125,9 +125,9 @@ * place_key in varchar, direction in varchar2, custom_arg in varchar2) * return char(1) */ - guard_callback varchar(100) default '' not null, - guard_custom_arg text default '' not null, - guard_description varchar(500) default '' not null, + guard_callback varchar(100), + guard_custom_arg text, + guard_description varchar(500), constraint wf_arc_guard_on_in_arc_ck check (guard_callback = '' or direction = 'out'), constraint wf_arc_transition_fk @@ -158,7 +158,7 @@ constraint wf_attribute_info_attribute_fk references acs_attributes(attribute_id) on delete cascade, - wf_datatype varchar(50) default '' not null + wf_datatype varchar(50) constraint wf_attr_info_wf_datatype_ck check (wf_datatype in ('', 'none', 'party')) ); @@ -169,7 +169,7 @@ constraint wf_trans_attr_map_workflow_fk references wf_workflows(workflow_key) on delete cascade, - transition_key varchar(100) default '' not null, + transition_key varchar(100), -- so the user can decide in what order the attributes should be presented sort_order integer not null, attribute_id integer @@ -193,8 +193,8 @@ constraint wf_trans_asgn_map_workflow_fk references wf_workflows(workflow_key) on delete cascade, - transition_key varchar(100) default '' not null, - assign_transition_key varchar(100) default '' not null, + transition_key varchar(100), + assign_transition_key varchar(100), constraint wf_trans_asgn_map_pk primary key (workflow_key, transition_key, assign_transition_key), constraint wf_trans_asgn_map_trans_fk @@ -266,48 +266,48 @@ workflow_key varchar(100) constraint wf_context_trans_workflow_fk references wf_workflows, - transition_key varchar(100) default '' not null, + transition_key varchar(100), /* information for the transition in the context */ /* The integer of minutes this task is estimated to take */ estimated_minutes integer, /* * Will be called when the transition is enabled/fired. * signature: (case_id in integer, transition_key in varchar, custom_arg in varchar2) */ - enable_callback varchar(100) default '' not null, - enable_custom_arg text default '' not null, - fire_callback varchar(100) default '' not null, - fire_custom_arg text default '' not null, + enable_callback varchar(100), + enable_custom_arg text, + fire_callback varchar(100), + fire_custom_arg text, /* * Must insert rows into the wf_task_assignments table. * Will be called when the transition becomes enabled * signature: (task_id in integer, custom_arg in varchar) */ - assignment_callback varchar(100) default '' not null, - assignment_custom_arg text default '' not null, + assignment_callback varchar(100), + assignment_custom_arg text, /* * Must return the date that the timed transition should fire * Will be called when the transition is enabled * signature: (case_id in integer, transition_key in varchar, custom_arg in varchar2) return date */ - time_callback varchar(100) default '' not null, - time_custom_arg text default '' not null, + time_callback varchar(100), + time_custom_arg text, /* * Returns the deadline for this task. * Will be called when the transition becomes enabled * Signature: (case_id in integer, transition_key in varchar, custom_arg in varchar2) return date */ - deadline_callback varchar(100) default '' not null, - deadline_custom_arg text default '' not null, + deadline_callback varchar(100), + deadline_custom_arg text, /* The name of an attribute that holds the deadline */ - deadline_attribute_name varchar(100) default '' not null, + deadline_attribute_name varchar(100), /* * Must return the date that the user's hold on the task times out. * called when the user starts the task. * signature: (case_id in integer, transition_key in varchar, custom_arg in varchar2) return date */ - hold_timeout_callback varchar(100) default '' not null, - hold_timeout_custom_arg text default '' not null, + hold_timeout_callback varchar(100), + hold_timeout_custom_arg text, /* * Notification callback * Will be called when a notification is sent i.e., when a transition is enabled, @@ -319,19 +319,19 @@ * subject in out varchar, * body in out varchar) */ - notification_callback varchar(100) default '' not null, - notification_custom_arg text default '' not null, + notification_callback varchar(100), + notification_custom_arg text, /* * Unassigned callback * Will be called whenever a task becomes unassigned * Signature: (case_id in integer, transition_key in varchar, custom_arg in varchar2) */ - unassigned_callback varchar(100) default '' not null, - unassigned_custom_arg text default '' not null, + unassigned_callback varchar(100), + unassigned_custom_arg text, /* name of the privilege we should check before allowing access * to task information. */ - access_privilege text default '' not null, + access_privilege text, /* table constraints */ constraint wf_context_trans_trans_fk foreign key (workflow_key, transition_key) references wf_transitions(workflow_key, transition_key) @@ -386,7 +386,7 @@ constraint wf_context_assign_workflow_fk references wf_workflows(workflow_key) on delete cascade, - transition_key varchar(100) default '' not null, + transition_key varchar(100), party_id integer constraint wf_context_assign_party_fk references parties(party_id) @@ -464,8 +464,8 @@ constraint wf_case_assign_fk references wf_cases(case_id) on delete cascade, - workflow_key varchar(100) default '' not null, - transition_key varchar(100) default '' not null, + workflow_key varchar(100), + transition_key varchar(100), party_id integer constraint wf_case_assign_party_fk references parties(party_id) @@ -488,8 +488,8 @@ constraint wf_case_deadline_fk references wf_cases(case_id) on delete cascade, - workflow_key varchar(100) default '' not null, - transition_key varchar(100) default '' not null, + workflow_key varchar(100), + transition_key varchar(100), deadline timestamp constraint wf_case_deadline_nn not null, @@ -521,7 +521,7 @@ workflow_key varchar(100) constraint wf_task_workflow_fk references wf_workflows(workflow_key), - transition_key varchar(100) default '' not null, + transition_key varchar(100), /* Information about the task */ state varchar(40) default 'enabled' @@ -588,7 +588,7 @@ constraint wf_token_workflow_fk references wf_workflows(workflow_key), -- a token must always be in some place - place_key varchar(100) default '' not null, + place_key varchar(100), state varchar(40) default 'free' constraint wf_tokens_state_ck check (state in ('free', 'locked', 'canceled', 'consumed')), @@ -640,7 +640,7 @@ journal_id integer constraint wf_attr_val_audit_journal_fk references journal_entries(journal_id), - attr_value text default '' not null, + attr_value text, constraint wf_attr_val_audit_pk primary key (case_id, attribute_id, journal_id) );