Index: openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql,v diff -u -r1.23 -r1.24 --- openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql 9 Jan 2004 15:47:53 -0000 1.23 +++ openacs-4/packages/workflow/sql/postgresql/workflow-tables-create.sql 12 Jan 2004 10:56:59 -0000 1.24 @@ -350,14 +350,15 @@ constraint wf_fsm_acn_enb_in_st_st_id_fk references workflow_fsm_states on delete cascade, - assigned_p boolean default 't' + assigned_p boolean default 't', -- The users in the role assigned to an action are only assigned to take action -- in the enabled states that have the assigned_p flag -- set to true. For example, in Bug Tracker, the resolve action is enabled -- in both the open and resolved states but only has assigned_p set to true -- in the open state. + constraint workflow_fsm_action_en_in_st_pk + primary key (action_id, state_id) ); --- LARS TODO: Add unique constraint on (action_id, state_id) Index: openacs-4/packages/workflow/sql/postgresql/upgrade/upgrade-1.2-2.0d1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/upgrade/upgrade-1.2-2.0d1.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/workflow/sql/postgresql/upgrade/upgrade-1.2-2.0d1.sql 9 Jan 2004 15:47:53 -0000 1.6 +++ openacs-4/packages/workflow/sql/postgresql/upgrade/upgrade-1.2-2.0d1.sql 12 Jan 2004 10:57:00 -0000 1.7 @@ -209,3 +209,7 @@ -- return id of newly created item return v_item_id; end;' language 'plpgsql'; + +-- Adding unique constraint on workflow fsm enabled in actions +-- This could cause upgrades to fail, if there are in fact duplicates, so let's pray that there aren't +alter table workflow_fsm_action_en_in_st add constraint workflow_fsm_action_en_in_st_pk primary key (action_id, state_id);