Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-content-types-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-content-types-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-content-types-create.sql 31 Oct 2003 11:08:38 -0000 1.8 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-content-types-create.sql 12 Nov 2003 11:38:29 -0000 1.9 @@ -55,6 +55,13 @@ 10 -- max_n ); +select content_type__register_relation_type ( + 'sim_character', -- content_type + 'sim_location', -- target_type + 'associated', -- relation_tag + 0, -- min_n + 1 -- max_n +); ---------------------------------------------------------------------- -- sim_prop @@ -105,18 +112,26 @@ 10 -- max_n ); +select content_type__register_relation_type ( + 'sim_prop', -- content_type + 'sim_location', -- target_type + 'associated', -- relation_tag + 0, -- min_n + 1 -- max_n +); + ---------------------------------------------------------------------- -- sim_location ---------------------------------------------------------------------- select content_type__create_type( 'sim_location', -- content_type 'content_revision', -- supertype - 'Home', -- pretty_name, - 'Homes', -- pretty_plural + 'Location', -- pretty_name, + 'Locations', -- pretty_plural 'sim_locations', -- table_name - 'home_id', -- id_column + 'location_id', -- id_column null -- name_method ); Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-drop.sql,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-drop.sql 31 Oct 2003 10:56:40 -0000 1.5 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-drop.sql 12 Nov 2003 11:38:29 -0000 1.6 @@ -22,14 +22,9 @@ drop table sim_tasks; drop table sim_roles; drop table sim_workflow_object_map; +drop table sim_workflow_cases; ---drop types select acs_object_type__drop_type( - 'sim_object', - 't' - ); - -select acs_object_type__drop_type( 'simulation', 't' ); Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-tables-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql 6 Nov 2003 15:35:46 -0000 1.3 +++ openacs-4/contrib/packages/simulation/sql/postgresql/simulation-tables-create.sql 12 Nov 2003 11:38:29 -0000 1.4 @@ -39,7 +39,7 @@ on delete cascade ); -comment on table sim_tasks is 'Each record is a task that a role must perform, possibly upon another role.'; +comment on table sim_tasks is 'A 1-1 extension of workflow_actions. Each record is a task that a role must perform, possibly upon another role.'; create table sim_simulations ( simulation_id integer constraint sim_simulations_fk @@ -88,3 +88,16 @@ ); comment on table sim_party_sim_map is 'Each record is an invitation to a party to participate in a simulation.'; + +create table sim_workflow_cases ( + case_id integer constraint sim_workflow_cases_fk + references workflow_cases + on delete cascade + constraint sim_workflow_cases_pk + primary key, + simulation integer constraint sim_workflow_cases_simulation_fk + references sim_simulations + on delete cascade +); + +comment on table sim_workflow_cases is 'A 1-1 extension of workflow_cases. Each record is an instantiation of a workflow into a simulation and then into a case.'; Index: openacs-4/packages/simulation/sql/postgresql/simulation-content-types-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/simulation-content-types-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/simulation/sql/postgresql/simulation-content-types-create.sql 31 Oct 2003 11:08:38 -0000 1.8 +++ openacs-4/packages/simulation/sql/postgresql/simulation-content-types-create.sql 12 Nov 2003 11:38:29 -0000 1.9 @@ -55,6 +55,13 @@ 10 -- max_n ); +select content_type__register_relation_type ( + 'sim_character', -- content_type + 'sim_location', -- target_type + 'associated', -- relation_tag + 0, -- min_n + 1 -- max_n +); ---------------------------------------------------------------------- -- sim_prop @@ -105,18 +112,26 @@ 10 -- max_n ); +select content_type__register_relation_type ( + 'sim_prop', -- content_type + 'sim_location', -- target_type + 'associated', -- relation_tag + 0, -- min_n + 1 -- max_n +); + ---------------------------------------------------------------------- -- sim_location ---------------------------------------------------------------------- select content_type__create_type( 'sim_location', -- content_type 'content_revision', -- supertype - 'Home', -- pretty_name, - 'Homes', -- pretty_plural + 'Location', -- pretty_name, + 'Locations', -- pretty_plural 'sim_locations', -- table_name - 'home_id', -- id_column + 'location_id', -- id_column null -- name_method ); Index: openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql 31 Oct 2003 10:56:40 -0000 1.5 +++ openacs-4/packages/simulation/sql/postgresql/simulation-drop.sql 12 Nov 2003 11:38:29 -0000 1.6 @@ -22,14 +22,9 @@ drop table sim_tasks; drop table sim_roles; drop table sim_workflow_object_map; +drop table sim_workflow_cases; ---drop types select acs_object_type__drop_type( - 'sim_object', - 't' - ); - -select acs_object_type__drop_type( 'simulation', 't' ); Index: openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql 6 Nov 2003 15:35:46 -0000 1.3 +++ openacs-4/packages/simulation/sql/postgresql/simulation-tables-create.sql 12 Nov 2003 11:38:29 -0000 1.4 @@ -39,7 +39,7 @@ on delete cascade ); -comment on table sim_tasks is 'Each record is a task that a role must perform, possibly upon another role.'; +comment on table sim_tasks is 'A 1-1 extension of workflow_actions. Each record is a task that a role must perform, possibly upon another role.'; create table sim_simulations ( simulation_id integer constraint sim_simulations_fk @@ -88,3 +88,16 @@ ); comment on table sim_party_sim_map is 'Each record is an invitation to a party to participate in a simulation.'; + +create table sim_workflow_cases ( + case_id integer constraint sim_workflow_cases_fk + references workflow_cases + on delete cascade + constraint sim_workflow_cases_pk + primary key, + simulation integer constraint sim_workflow_cases_simulation_fk + references sim_simulations + on delete cascade +); + +comment on table sim_workflow_cases is 'A 1-1 extension of workflow_cases. Each record is an instantiation of a workflow into a simulation and then into a case.';