--
-- packages/file-storage/sql/oracle/file-storage-drop.sql
--
-- @author Kevin Scaldeferri (kevin@arsdigita.com)
-- @creation-date 6 Now 2000
-- @cvs-id $Id: file-storage-drop.sql,v 1.6.2.1 2002/03/13 19:03:45 donb Exp $
--
-- drop script for file-storage
--

--
-- content repository is set up to cascade, so we should just have to 
-- delete the root folders
--
declare
    cursor c_root_folders
    is
    select package_id
    from   fs_root_folders;
begin
    for v_root_folder in c_root_folders loop
        -- JS: The RI constraints will cause acs_objects.delete to fail
	-- JS: So I changed this to apm_package.delete
        apm_package.delete(v_root_folder.package_id);
    end loop;
end;
/
show errors

drop view fs_folders_and_files;
drop view fs_files;
drop view fs_folders;

drop trigger fs_package_items_delete_trig;
drop trigger fs_root_folder_delete_trig;

drop table fs_root_folders;
drop package file_storage;

begin
content_type.drop_type ( 
  content_type => 'file_storage_object');
end;
/
show errors
