Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql,v
diff -u -r1.22 -r1.23
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql	26 May 2005 08:28:45 -0000	1.22
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-create.sql	12 Oct 2009 22:46:16 -0000	1.23
@@ -36,9 +36,15 @@
     -- the ID of the root folder
     -- JS: I removed the on delete cascade constraint on folder_id
     -- JS: It is superfluous, and causes a lot of RI headaches
+    -- DAVEB: I put it back. I have no idea what JS is referring to.
+    -- DAVEB: If you ever want to delete a root folder, say by deleting a
+    -- DAVEB: package instance of file-storage, you need this.
+    -- DAVEB: You DO have to delete all the folder contents and use CR pl/sql
+    -- DAVEB: procs to delete the folder, when you do that the on delete
+    -- DAVEB: cascade works fine.
     folder_id   integer
                 constraint fs_root_folder_folder_id_fk
-                references cr_folders
+                references cr_folders on delete cascade
                 constraint fs_root_folder_folder_id_un
                 unique
 );
@@ -52,8 +58,11 @@
                                  -- first, before item metadata
        'File Storage Object',    -- pretty_name
        'File Storage Objects',   -- pretty_plural
-       'fs_root_folders',        -- table_name
-       'folder_id',	         -- id_column
+       NULL,        -- table_name
+       -- DAVEB: acs_object_types supports a null table name so we do that
+       -- instead of passing a false value so we can actually use the
+       -- content repository instead of duplicating all the code in file-storage
+       NULL,	         -- id_column
        'file_storage__get_title' -- name_method
 );
 
