Index: openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-4.2-4.6.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-4.2-4.6.sql,v
diff -u -r1.2.4.2 -r1.2.4.3
--- openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-4.2-4.6.sql	1 Jun 2004 23:24:46 -0000	1.2.4.2
+++ openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-4.2-4.6.sql	15 Oct 2004 08:55:08 -0000	1.2.4.3
@@ -667,6 +667,8 @@
 
 
 -- JS: BEFORE DELETE TRIGGER to clean up CR entries (except root folder)
+
+drop function fs_package_items_delete_trig();
 create or replace function fs_package_items_delete_trig () returns opaque as '
 declare
 
@@ -710,11 +712,12 @@
 
 end;' language 'plpgsql';
 
-\i ../file-storage-simple-create.sql
-\i ../file-storage-simple-package-create.sql
+create trigger fs_package_items_delete_trig before delete
+on fs_root_folders for each row 
+execute procedure fs_package_items_delete_trig ();
 
-drop view fs_folders;
-drop view fs_files;
-drop view fs_folders_and_files;
+drop view fs_folders cascade;
+drop view fs_files cascade;
+drop view fs_folders_and_files cascade;
 
 \i ../file-storage-views-create.sql
