Index: openacs-4/packages/address-book/sql/postgresql/address-book-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/address-book/sql/postgresql/address-book-create.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/address-book/sql/postgresql/address-book-create.sql 28 Aug 2001 23:51:53 -0000 1.2 +++ openacs-4/packages/address-book/sql/postgresql/address-book-create.sql 29 Aug 2001 00:52:20 -0000 1.3 @@ -61,12 +61,12 @@ ''Address Book Contact Attribute Type'', -- pretty_name ''Address Book Contact Attribute Types'', -- pretty_plural ''acs_object'', -- supertype - ''ab_contact_attr_type'', -- table_name + ''ab_contact_attr_types'', -- table_name ''type_id'', -- id_column ''ab_contact_attr_type'', -- package_name (default) ''f'', -- abstract_p (default) null, -- type_extension_table (default) - ''ab_contact_attr_type.name'' -- name_method (default) + ''ab_contact_attr_type__name'' -- name_method (default) ); -- ab_contact_attrs OBJECT @@ -213,16 +213,16 @@ declare delete__type_id alias for $1; begin - delete from acs_permissions - where object_id = delete__type_id; + delete from acs_permissions + where object_id = delete__type_id; - delete from ab_contact_attr_types - where type_id = delete__type_id; + delete from ab_contact_attr_types + where type_id = delete__type_id; - raise NOTICE ''Deleting contact attribute type...''; - PERFORM acs_object__delete(delete__type_id); + raise NOTICE ''Deleting contact attribute type...''; + PERFORM acs_object__delete(delete__type_id); - return 0; + return 0; end;' language 'plpgsql'; @@ -677,7 +677,7 @@ end;' language 'plpgsql'; -create function pl_address__orphan_address(integer) returns integer as ' +create function ab_contact__delete_orphan_address(integer) returns integer as ' declare v_rel_id subplace_rels.rel_id%TYPE; Index: openacs-4/packages/address-book/sql/postgresql/address-book-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/address-book/sql/postgresql/address-book-drop.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/address-book/sql/postgresql/address-book-drop.sql 28 Aug 2001 23:51:53 -0000 1.2 +++ openacs-4/packages/address-book/sql/postgresql/address-book-drop.sql 29 Aug 2001 00:52:20 -0000 1.3 @@ -5,7 +5,7 @@ select ab_contact_attr__delete(attr_id) from ab_contact_attrs; select ab_contact_rel__delete(rel_id) from ab_contact_rels; select ab_contact_attr_type__delete(type_id) from ab_contact_attr_types; -select ab_contact__delete(contact_id) from ab_contacts; +select ab_contact__delete(contact_id, 't') from ab_contacts; drop view ab_contacts_related; @@ -40,23 +40,32 @@ integer ); -drop function ab_contact__delete(integer, boolean); - -select acs_rel_type__drop_type('ab_contact_rel'); +select acs_object_type__drop_type ('ab_contact_attrs', 'f'); +select acs_rel_type__drop_type('ab_contact_rel', 'f'); select acs_rel_type__drop_role('contact'); -select acs_object_type__drop_type('ab_contact_attr'); +select acs_object_type__drop_type ('ab_contact_attr_type', 'f'); +select acs_object_type__drop_type ('ab_contact', 'f'); +select acs_object_type__drop_type('ab_contact_attr_type', 'f'); -drop table ab_contact_attr_types; -select acs_object_type__drop_type('ab_contact_attr_type'); +select acs_object_type__drop_type('ab_contact', 'f'); -drop table ab_contacts; - -select acs_object_type__drop_type('ab_contact'); - drop function ab_contact_rel__delete(integer); drop function ab_contact_rel__new(integer,integer,integer,integer,varchar,varchar,varchar); drop function ab_contact__new( integer,varchar,timestamp,integer,varchar,integer,varchar,varchar,varchar,varchar,integer,varchar); drop function ab_contact__name( integer); + +drop function ab_contact__delete(integer, boolean); +drop function ab_contact__work_phone (integer); +drop function ab_contact__home_phone (integer); +drop function ab_contact__fax (integer); +drop function ab_contact__other (integer); +drop function ab_contact__email (integer); +drop function ab_contact__delete_orphan_address(integer); + +drop table ab_contact_attr_types; +drop table ab_contacts; +drop table ab_contact_rels; +drop table ab_contact_attrs;