Index: openacs-4/packages/categories/sql/postgresql/categories-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/sql/postgresql/categories-drop.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/categories/sql/postgresql/categories-drop.sql	31 Jul 2006 20:31:11 -0000	1.6
+++ openacs-4/packages/categories/sql/postgresql/categories-drop.sql	6 Dec 2009 20:11:55 -0000	1.7
@@ -18,33 +18,24 @@
 
 drop table category_temp;
 
-drop table category_object_map;
+drop table category_object_map cascade;
 
-drop table category_tree_map;
-drop index cat_tree_map_ix;
-drop index cat_object_map_ix;
+drop table category_tree_map cascade;
 
 drop table category_translations;
 
 drop table categories;
-drop index categories_left_ix;
-drop index categories_parent_ix;
 
 drop table category_tree_translations;
 
-drop table category_trees;
+drop table category_trees cascade;
 
 delete from acs_permissions where object_id in
   (select object_id from acs_objects where object_type = 'category_tree');
 delete from acs_objects where object_type='category';
 delete from acs_objects where object_type='category_tree';
 
 
-begin;
-   select acs_object_type__drop_type('category', 't');
-   select acs_object_type__drop_type('category_tree', 't');
-end;
-
 drop function category_synonym__convert_string (varchar);
 drop function category_synonym__get_similarity (integer, integer, bigint);
 drop function category_synonym__search (varchar, varchar);
@@ -66,7 +57,8 @@
 drop function category_tree__edit (integer,varchar,varchar,varchar,
         char,timestamp with time zone,integer,varchar);
 drop function category_tree__copy (integer,integer,integer,varchar);
-drop function category_tree__map (integer,integer,integer,char);
+drop function category_tree__map (integer,integer,integer,char,char,varchar);
+
 drop function category_tree__unmap (integer,integer);
 drop function category_tree__check_nested_ind (integer);
 -- drop function category_tree__index_children (integer,integer);
@@ -110,11 +102,13 @@
 select acs_sc_impl__delete('AcsObject','category_idhandler');
 select acs_sc_impl__delete('AcsObject','category_tree_idhandler');
 
-
 -- from categories-relation
-select acs_rel_type__drop_type('meta_category_rel','t');
 select acs_rel_type__drop_type('user_meta_category_rel','t');
-select acs_rel_type__drop_role('meta-category');
+select acs_rel_type__drop_type('meta_category_rel','t');
+select acs_rel_type__drop_role('party');
+select acs_rel_type__drop_role('meta_category');
 select acs_rel_type__drop_role('category');
 
+select acs_object_type__drop_type('category', 't');
+select acs_object_type__drop_type('category_tree', 't');