Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-create-functions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-create-functions.sql,v diff -u -N --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-create-functions.sql 13 Oct 2003 07:58:52 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ --- @author joel@collaboraid.net --- @creation-date 2003-10-12 --- @cvs-id $Id: simulation-create-functions.sql,v 1.1 2003/10/13 07:58:52 joela Exp $ - Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-create-tables.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-create-tables.sql,v diff -u -N --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-create-tables.sql 13 Oct 2003 13:29:30 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,107 +0,0 @@ --- @author joel@collaboraid.net --- @creation-date 2003-10-12 --- @cvs-id $Id: simulation-create-tables.sql,v 1.3 2003/10/13 13:29:30 joela Exp $ - -create table sim_objects ( - sim_object_id integer constraint sim_objects_fk - references acs_objects - constraint sim_objects_pk - primary key, - parent_sim_object integer constraint sim_objects_parent_fk - references sim_objects, - description text -); - -comment on table sim_objects IS 'Each record is an object in a simulation package.'; - -select acs_object_type__create_type ( - 'sim_object', -- object_type - 'Simulation Object', -- pretty_name - 'Simulation Objects', -- pretty_plural - 'acs_object', -- supertype - 'sim_objects', -- table_name - 'sim_object_id', -- id_column - null, -- package_name - 'f', -- abstract_p - null, -- type_extension_table - 'sim_object__name' -- name_method - ); - -create table sim_workflow_object_map ( - workflow_id integer constraint sim_workflows_object_map_fk - references workflows, - sim_object_id integer constraint sim_workflows_object_map_2_fk - references sim_objects, - constraint sim_workflow_object_map_pk - primary key (workflow_id, sim_object_id) -); - -comment on table sim_workflow_object_map is 'Each record indicates that one object is used in one simulation template. If a sim_object is a child of another sim_object which is in this table, the child sim_object should not be in the table.'; - -create table sim_roles ( - role_id integer constraint sim_roles_fk - references workflow_roles - constraint sim_roles_pk - primary key, - character_id integer constraint sim_roles_character_fk - check (1=1) -); - -comment on table sim_roles is 'Each record is a role within a simulation template to be played by one or more users or a computer agent when the template is instantiated into cases.'; - -create table sim_tasks ( - task_id integer constraint sim_tasks_fk - references workflow_actions - constraint sim_tasks_pk - primary key, - recipient integer constraint sim_tasks_recipient_fk - references sim_roles -); - -comment on table sim_tasks is '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 - references workflows - constraint sim_simulation_pk - primary key, - enroll_type varchar(20) constraint sim_simulations_enroll_type_ck - check (1=1), - casting_type varchar(20) constraint sim_simulations_casting_type_ck - check (1=1), - enroll_start timestamptz, - enroll_end timestamptz, - constraint sim_simulations_enroll_end_after_start_end_ck - check (enroll_end >= enroll_start), - case_start timestamptz, - case_end timestamptz, - constraint sim_simulations_case_end_after_start_ck - check (case_end >= case_start) -); - -select acs_object_type__create_type ( - 'simulation', -- object_type - 'Simulation', -- pretty_name - 'Simulations', -- pretty_plural - 'workflow_lite', -- supertype - 'sim_simulations', -- table_name - 'simulation_id', -- id_column - null, -- package_name - 'f', -- abstract_p - null, -- type_extension_table - 'sim_simulation__name' -- name_method - ); - -comment on table sim_simulations is 'Each record is an instantiation of a simulation template, and the parent of zero to many simulation cases.'; - -create table sim_party_sim_map ( - simulation_id integer constraint sim_party_sim_map_sim_fk - references sim_simulations, - party_id integer constraint sim_party_sim_map_party_fk - references parties, - constraint sim_party_sim_map_pk - primary key (simulation_id, party_id) -); - -comment on table sim_party_sim_map is 'Each record is an invitation to a party to participate in a simulation.'; - Index: openacs-4/contrib/packages/simulation/sql/postgresql/simulation-functions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/sql/postgresql/Attic/simulation-functions.sql,v diff -u -N --- openacs-4/contrib/packages/simulation/sql/postgresql/simulation-functions.sql 13 Oct 2003 07:58:52 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ --- @author joel@collaboraid.net --- @creation-date 2003-10-12 --- @cvs-id $Id: simulation-functions.sql,v 1.1 2003/10/13 07:58:52 joela Exp $ - Index: openacs-4/packages/simulation/sql/postgresql/simulation-create-functions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/Attic/simulation-create-functions.sql,v diff -u -N --- openacs-4/packages/simulation/sql/postgresql/simulation-create-functions.sql 13 Oct 2003 07:58:52 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ --- @author joel@collaboraid.net --- @creation-date 2003-10-12 --- @cvs-id $Id: simulation-create-functions.sql,v 1.1 2003/10/13 07:58:52 joela Exp $ - Index: openacs-4/packages/simulation/sql/postgresql/simulation-create-tables.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/Attic/simulation-create-tables.sql,v diff -u -N --- openacs-4/packages/simulation/sql/postgresql/simulation-create-tables.sql 13 Oct 2003 13:29:30 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,107 +0,0 @@ --- @author joel@collaboraid.net --- @creation-date 2003-10-12 --- @cvs-id $Id: simulation-create-tables.sql,v 1.3 2003/10/13 13:29:30 joela Exp $ - -create table sim_objects ( - sim_object_id integer constraint sim_objects_fk - references acs_objects - constraint sim_objects_pk - primary key, - parent_sim_object integer constraint sim_objects_parent_fk - references sim_objects, - description text -); - -comment on table sim_objects IS 'Each record is an object in a simulation package.'; - -select acs_object_type__create_type ( - 'sim_object', -- object_type - 'Simulation Object', -- pretty_name - 'Simulation Objects', -- pretty_plural - 'acs_object', -- supertype - 'sim_objects', -- table_name - 'sim_object_id', -- id_column - null, -- package_name - 'f', -- abstract_p - null, -- type_extension_table - 'sim_object__name' -- name_method - ); - -create table sim_workflow_object_map ( - workflow_id integer constraint sim_workflows_object_map_fk - references workflows, - sim_object_id integer constraint sim_workflows_object_map_2_fk - references sim_objects, - constraint sim_workflow_object_map_pk - primary key (workflow_id, sim_object_id) -); - -comment on table sim_workflow_object_map is 'Each record indicates that one object is used in one simulation template. If a sim_object is a child of another sim_object which is in this table, the child sim_object should not be in the table.'; - -create table sim_roles ( - role_id integer constraint sim_roles_fk - references workflow_roles - constraint sim_roles_pk - primary key, - character_id integer constraint sim_roles_character_fk - check (1=1) -); - -comment on table sim_roles is 'Each record is a role within a simulation template to be played by one or more users or a computer agent when the template is instantiated into cases.'; - -create table sim_tasks ( - task_id integer constraint sim_tasks_fk - references workflow_actions - constraint sim_tasks_pk - primary key, - recipient integer constraint sim_tasks_recipient_fk - references sim_roles -); - -comment on table sim_tasks is '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 - references workflows - constraint sim_simulation_pk - primary key, - enroll_type varchar(20) constraint sim_simulations_enroll_type_ck - check (1=1), - casting_type varchar(20) constraint sim_simulations_casting_type_ck - check (1=1), - enroll_start timestamptz, - enroll_end timestamptz, - constraint sim_simulations_enroll_end_after_start_end_ck - check (enroll_end >= enroll_start), - case_start timestamptz, - case_end timestamptz, - constraint sim_simulations_case_end_after_start_ck - check (case_end >= case_start) -); - -select acs_object_type__create_type ( - 'simulation', -- object_type - 'Simulation', -- pretty_name - 'Simulations', -- pretty_plural - 'workflow_lite', -- supertype - 'sim_simulations', -- table_name - 'simulation_id', -- id_column - null, -- package_name - 'f', -- abstract_p - null, -- type_extension_table - 'sim_simulation__name' -- name_method - ); - -comment on table sim_simulations is 'Each record is an instantiation of a simulation template, and the parent of zero to many simulation cases.'; - -create table sim_party_sim_map ( - simulation_id integer constraint sim_party_sim_map_sim_fk - references sim_simulations, - party_id integer constraint sim_party_sim_map_party_fk - references parties, - constraint sim_party_sim_map_pk - primary key (simulation_id, party_id) -); - -comment on table sim_party_sim_map is 'Each record is an invitation to a party to participate in a simulation.'; - Index: openacs-4/packages/simulation/sql/postgresql/simulation-functions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/sql/postgresql/Attic/simulation-functions.sql,v diff -u -N --- openacs-4/packages/simulation/sql/postgresql/simulation-functions.sql 13 Oct 2003 07:58:52 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ --- @author joel@collaboraid.net --- @creation-date 2003-10-12 --- @cvs-id $Id: simulation-functions.sql,v 1.1 2003/10/13 07:58:52 joela Exp $ -