Index: openacs-4/packages/acs-kernel/acs-kernel.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/acs-kernel.info,v
diff -u -r1.76 -r1.77
--- openacs-4/packages/acs-kernel/acs-kernel.info 25 Feb 2005 21:35:42 -0000 1.76
+++ openacs-4/packages/acs-kernel/acs-kernel.info 27 Feb 2005 01:21:07 -0000 1.77
@@ -7,17 +7,15 @@
t
t
-
- OpenACS Core Team
+
+ Don Baccus
Routines and data models providing the foundation for OpenACS-based Web services.
2005-01-09
+ GPL
OpenACS
The OpenACS kernel contains the core datamodel create and drop scripts for such things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures.
- GPL
+
3
-
-
-
@@ -29,7 +27,6 @@
-
@@ -47,8 +44,8 @@
-
+
Index: openacs-4/packages/acs-kernel/sql/oracle/acs-permissions-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-permissions-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-kernel/sql/oracle/acs-permissions-create.sql 8 Aug 2003 08:45:40 -0000 1.8
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-permissions-create.sql 27 Feb 2005 01:21:07 -0000 1.9
@@ -137,14 +137,18 @@
------------------------------------
create table acs_permissions (
- object_id not null
+ object_id integer not null
constraint acs_permissions_on_what_id_fk
- references acs_objects (object_id),
- grantee_id not null
+ references acs_objects (object_id)
+ on delete cascade,
+ grantee_id integer not null
constraint acs_permissions_grantee_id_fk
- references parties (party_id),
- privilege not null constraint acs_permissions_priv_fk
- references acs_privileges (privilege),
+ references parties (party_id)
+ on delete cascade,
+ privilege varchar(100) not null
+ constraint acs_permissions_priv_fk
+ references acs_privileges (privilege)
+ on delete cascade,
constraint acs_permissions_pk
primary key (object_id, grantee_id, privilege)
);
Index: openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql 12 Mar 2004 18:48:49 -0000 1.7
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql 27 Feb 2005 01:21:07 -0000 1.8
@@ -288,19 +288,22 @@
create sequence acs_rel_id_seq;
create table acs_rels (
- rel_id not null
+ rel_id integer not null
constraint acs_rels_rel_id_fk
references acs_objects (object_id)
+ on delete cascade
constraint acs_rels_pk primary key,
- rel_type not null
+ rel_type varchar(100) not null
constraint acs_rels_rel_type_fk
references acs_rel_types (rel_type),
- object_id_one not null
+ object_id_one integer not null
constraint acs_object_rels_one_fk
- references acs_objects (object_id),
- object_id_two not null
+ references acs_objects (object_id)
+ on delete cascade,
+ object_id_two integer not null
constraint acs_object_rels_two_fk
- references acs_objects (object_id),
+ references acs_objects (object_id)
+ on delete cascade,
constraint acs_object_rels_un unique
(rel_type, object_id_one, object_id_two)
);
Index: openacs-4/packages/acs-kernel/sql/oracle/groups-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/groups-create.sql,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-kernel/sql/oracle/groups-create.sql 11 Dec 2003 21:39:51 -0000 1.8
+++ openacs-4/packages/acs-kernel/sql/oracle/groups-create.sql 27 Feb 2005 01:21:07 -0000 1.9
@@ -234,13 +234,15 @@
create table group_element_index (
group_id not null
constraint group_element_index_grp_id_fk
- references groups (group_id),
+ references groups (group_id)
+ on delete cascade,
element_id not null
constraint group_element_index_elem_id_fk
references parties (party_id),
rel_id not null
constraint group_element_index_rel_id_fk
- references acs_rels (rel_id),
+ references acs_rels (rel_id)
+ on delete cascade,
container_id not null
constraint group_element_index_cont_id_fk
references groups (group_id),
Index: openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql 30 Sep 2003 12:10:02 -0000 1.7
+++ openacs-4/packages/acs-kernel/sql/oracle/rel-segments-create.sql 27 Feb 2005 01:21:07 -0000 1.8
@@ -52,10 +52,12 @@
segment_name varchar2(230) not null,
group_id not null
constraint rel_segments_group_id_fk
- references groups (group_id),
+ references groups (group_id)
+ on delete cascade,
rel_type not null
constraint rel_segments_rel_type_fk
- references acs_rel_types (rel_type),
+ references acs_rel_types (rel_type)
+ on delete cascade,
constraint rel_segments_grp_rel_type_uq unique(group_id, rel_type)
);
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql,v
diff -u -r1.52 -r1.53
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql 26 Jul 2004 12:21:40 -0000 1.52
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql 27 Feb 2005 01:21:07 -0000 1.53
@@ -590,6 +590,8 @@
-- ACS_OBJECT PACKAGE --
------------------------
+select define_function_args('acs_object__initialize_attributes','initialize_attributes__object_id');
+
create or replace function acs_object__initialize_attributes (integer)
returns integer as '
declare
@@ -633,8 +635,10 @@
return 0;
end;' language 'plpgsql';
-
-- function new
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t,new__title,new__package_id');
+
create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean,varchar,integer)
returns integer as '
declare
@@ -691,6 +695,9 @@
end;' language 'plpgsql';
-- function new
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id');
+
create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer)
returns integer as '
declare
@@ -708,6 +715,8 @@
''t'', null, null);
end;' language 'plpgsql';
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t');
+
create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean)
returns integer as '
declare
@@ -724,6 +733,8 @@
new__security_inherit_p, null, null);
end;' language 'plpgsql';
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t,new__title');
+
create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,boolean,varchar)
returns integer as '
declare
@@ -741,6 +752,8 @@
new__security_inherit_p, new__title, null);
end;' language 'plpgsql';
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t,new__title,new__package_id');
+
create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,varchar,integer)
returns integer as '
declare
@@ -758,6 +771,8 @@
''t'', new__title, new__package_id);
end;' language 'plpgsql';
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__title');
+
create or replace function acs_object__new (integer,varchar,timestamptz,integer,varchar,integer,varchar)
returns integer as '
declare
@@ -774,6 +789,8 @@
''t'', new__title, null);
end;' language 'plpgsql';
+select define_function_args('acs_object__new','object_id,object_type');
+
create function acs_object__new (integer,varchar) returns integer as '
declare
object_id alias for $1; -- default null
@@ -784,6 +801,9 @@
-- procedure delete
+
+select define_function_args('acs_object__delete','delete__object_id');
+
create function acs_object__delete (integer)
returns integer as '
declare
@@ -840,6 +860,8 @@
-- function name
+select define_function_args('acs_object__name','name__object_id');
+
create function acs_object__name (integer)
returns varchar as '
declare
@@ -901,6 +923,9 @@
-- function default_name
+
+select define_function_args('acs_object__default_name','default_name__object_id');
+
create or replace function acs_object__default_name (integer)
returns varchar as '
declare
@@ -919,6 +944,9 @@
-- function package_id
+
+select define_function_args('acs_object__object_id','p_object_id');
+
create or replace function acs_object__package_id (integer)
returns integer as '
declare
@@ -938,6 +966,9 @@
-- procedure get_attribute_storage
+
+select define_function_args('acs_object__get_attribute_storage','object_id_in,attribute_name_in');
+
create or replace function acs_object__get_attribute_storage (integer,varchar)
returns text as '
declare
@@ -1072,6 +1103,8 @@
end;' language 'plpgsql' stable;
+select define_function_args('acs_object__get_attr_storage_column','v_vals');
+
create or replace function acs_object__get_attr_storage_column(text)
returns text as '
declare
@@ -1087,6 +1120,8 @@
end;' language 'plpgsql' immutable;
+select define_function_args('acs_object__get_attr_storage_table','v_vals');
+
create or replace function acs_object__get_attr_storage_table(text)
returns text as '
declare
@@ -1110,6 +1145,8 @@
end;' language 'plpgsql' immutable;
+select define_function_args('acs_object__get_attr_storage_sql','v_vals');
+
create or replace function acs_object__get_attr_storage_sql(text)
returns text as '
declare
@@ -1134,6 +1171,9 @@
end;' language 'plpgsql' immutable;
-- function get_attribute
+
+select define_function_args('acs_object__get_attribute','object_id_in,attribute_name_in');
+
create or replace function acs_object__get_attribute (integer,varchar)
returns text as '
declare
@@ -1168,6 +1208,9 @@
-- procedure set_attribute
+
+select define_function_args('acs_object__set_attribute','object_id_in,attribute_name_in,value_in');
+
create or replace function acs_object__set_attribute (integer,varchar,varchar)
returns integer as '
declare
@@ -1198,6 +1241,9 @@
-- function check_context_index
+
+select define_function_args('acs_object__check_context_index','check_context_index__object_id,check_context_index__ancestor_id,check_context_index__n_generations');
+
create or replace function acs_object__check_context_index (integer,integer,integer)
returns boolean as '
declare
@@ -1361,6 +1407,8 @@
-- function check_path
+select define_function_args('acs_object__check_path','check_path__object_id,check_path__ancestor_id');
+
create or replace function acs_object__check_path (integer,integer)
returns boolean as '
declare
@@ -1401,6 +1449,9 @@
-- function check_representation
+
+select define_function_args('acs_object__check_representation','check_representation__object_id');
+
create or replace function acs_object__check_representation (integer)
returns boolean as '
declare
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql,v
diff -u -r1.28 -r1.29
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql 18 Jun 2004 18:21:57 -0000 1.28
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-permissions-create.sql 27 Feb 2005 01:21:07 -0000 1.29
@@ -336,13 +336,16 @@
create table acs_permissions (
object_id integer not null
constraint acs_permissions_on_what_id_fk
- references acs_objects (object_id),
+ references acs_objects (object_id)
+ on delete cascade,
grantee_id integer not null
constraint acs_permissions_grantee_id_fk
- references parties (party_id),
+ references parties (party_id)
+ on delete cascade,
privilege varchar(100) not null
constraint acs_permissions_priv_fk
- references acs_privileges (privilege),
+ references acs_privileges (privilege)
+ on delete cascade,
constraint acs_permissions_pk
primary key (object_id, grantee_id, privilege)
);
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql 18 Jun 2004 18:21:57 -0000 1.17
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql 27 Feb 2005 01:21:07 -0000 1.18
@@ -322,16 +322,19 @@
rel_id integer not null
constraint acs_rels_rel_id_fk
references acs_objects (object_id)
+ on delete cascade
constraint acs_rels_pk primary key,
rel_type varchar(100) not null
constraint acs_rels_rel_type_fk
references acs_rel_types (rel_type),
object_id_one integer not null
constraint acs_object_rels_one_fk
- references acs_objects (object_id),
+ references acs_objects (object_id)
+ on delete cascade,
object_id_two integer not null
constraint acs_object_rels_two_fk
- references acs_objects (object_id),
+ references acs_objects (object_id)
+ on delete cascade,
constraint acs_object_rels_un unique
(rel_type, object_id_one, object_id_two)
);
Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql 18 Jun 2004 18:21:57 -0000 1.18
+++ openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql 27 Feb 2005 01:21:07 -0000 1.19
@@ -19,13 +19,15 @@
create table composition_rels (
rel_id integer constraint composition_rel_rel_id_fk
references acs_rels (rel_id)
+ on delete cascade
constraint composition_rel_rel_id_pk
primary key
);
create table membership_rels (
rel_id integer constraint membership_rel_rel_id_fk
references acs_rels (rel_id)
+ on delete cascade
constraint membership_rel_rel_id_pk
primary key,
-- null means waiting for admin approval
@@ -37,6 +39,7 @@
create table admin_rels (
rel_id integer constraint admin_rel_rel_id_fk
references membership_rels (rel_id)
+ on delete cascade
constraint admin_rel_rel_id_pk
primary key
);
@@ -270,19 +273,24 @@
create table group_element_index (
group_id integer not null
constraint group_element_index_grp_id_fk
- references groups (group_id),
+ references groups (group_id)
+ on delete cascade,
element_id integer not null
constraint group_element_index_elem_id_fk
- references parties (party_id),
+ references parties (party_id)
+ on delete cascade,
rel_id integer not null
constraint group_element_index_rel_id_fk
- references acs_rels (rel_id),
+ references acs_rels (rel_id)
+ on delete cascade,
container_id integer not null
constraint group_element_index_cont_id_fk
- references groups (group_id),
+ references groups (group_id)
+ on delete cascade,
rel_type varchar(100) not null
constraint group_elem_index_rel_type_fk
- references acs_rel_types (rel_type),
+ references acs_rel_types (rel_type)
+ on delete cascade,
ancestor_rel_type varchar(100) not null
constraint grp_el_idx_ancstr_rel_type_ck
check (ancestor_rel_type in ('composition_rel','membership_rel')),
Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql 18 Jun 2004 18:21:57 -0000 1.9
+++ openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-create.sql 27 Feb 2005 01:21:07 -0000 1.10
@@ -61,10 +61,12 @@
segment_name varchar(230) not null,
group_id integer not null
constraint rel_segments_group_id_fk
- references groups (group_id),
+ references groups (group_id)
+ on delete cascade,
rel_type varchar(100) not null
constraint rel_segments_rel_type_fk
- references acs_rel_types (rel_type),
+ references acs_rel_types (rel_type)
+ on delete cascade,
constraint rel_segments_grp_rel_type_uq unique(group_id, rel_type)
);
@@ -160,12 +162,14 @@
constraint party_member_party_nn
not null
constraint party_member_party_fk
- references parties,
+ references parties
+ on delete cascade,
member_id integer
constraint party_member_member_nn
not null
constraint party_member_member_fk
- references parties,
+ references parties
+ on delete cascade,
tag integer
constraint party_member_tag_nn
not null,
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.2.0d7-5.2.0d8.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.2.0d7-5.2.0d8.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.2.0d7-5.2.0d8.sql 27 Feb 2005 01:21:07 -0000 1.1
@@ -0,0 +1,41 @@
+select define_function_args('acs_object__initialize_attributes','initialize_attributes__object_id');
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t,new__title,new__package_id');
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id');
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t');
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t,new__title');
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__security_inherit_p;t,new__title,new__package_id');
+
+select define_function_args('acs_object__new','new__object_id,new__object_type;acs_object,new__creation_date,new__creation_user,new__creation_ip,new__context_id,new__title');
+
+select define_function_args('acs_object__new','object_id,object_type');
+
+select define_function_args('acs_object__delete','delete__object_id');
+
+select define_function_args('acs_object__name','name__object_id');
+
+select define_function_args('acs_object__default_name','default_name__object_id');
+
+select define_function_args('acs_object__object_id','p_object_id');
+
+select define_function_args('acs_object__get_attribute_storage','object_id_in,attribute_name_in');
+
+select define_function_args('acs_object__get_attr_storage_column','v_vals');
+
+select define_function_args('acs_object__get_attr_storage_table','v_vals');
+
+select define_function_args('acs_object__get_attr_storage_sql','v_vals');
+
+select define_function_args('acs_object__get_attribute','object_id_in,attribute_name_in');
+
+select define_function_args('acs_object__set_attribute','object_id_in,attribute_name_in,value_in');
+
+select define_function_args('acs_object__check_context_index','check_context_index__object_id,check_context_index__ancestor_id,check_context_index__n_generations');
+
+select define_function_args('acs_object__check_path','check_path__object_id,check_path__ancestor_id');
+
+select define_function_args('acs_object__check_representation','check_representation__object_id');