Index: openacs-4/packages/download/sql/oracle/download-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/oracle/download-drop.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/sql/oracle/download-drop.sql 14 May 2001 20:30:23 -0000 1.3 +++ openacs-4/packages/download/sql/oracle/download-drop.sql 23 May 2001 18:44:13 -0000 1.4 @@ -2,6 +2,10 @@ -- Drop the data model and the PL/SQL packages. -- +-- delete the archives +delete from download_archives; +delete from download_archive_types; + /* Drop all content items */ begin for archive_rec in (select item_id from cr_items where content_type = 'cr_download_archive_desc') @@ -10,6 +14,7 @@ end loop; end; / +show errors begin for archive_rec in (select item_id from cr_items where content_type = 'cr_download_archive') @@ -18,6 +23,7 @@ end loop; end; / +show errors begin for archive_rec in (select item_id from cr_items where content_type = 'cr_download_rep') @@ -26,6 +32,7 @@ end loop; end; / +show errors /* Sequences */ drop sequence download_archive_type_sequence; @@ -42,15 +49,18 @@ drop table download_downloads; drop table download_revision_data; drop table download_archive_revisions; -drop table download_archives; drop table download_metadata_choices; drop table download_archive_metadata; drop table download_reasons; -drop table download_archive_types; -drop table download_repository; -drop table download_archive_descs; -/* acs_object_type */ +-- shouldn't drop these tables. +-- they're dropped when we drop the content types below + +--drop table download_repository; +--drop table download_archive_descs; +--drop table download_archives; + +--unregister the content_types begin content_type.unregister_child_type( parent_type => 'cr_download_rep', @@ -65,36 +75,35 @@ ); end; / - ---fixme VK drop the content_types, not the acs type directly - -begin - acs_object_type.drop_type( - object_type => 'cr_download_archive_desc', - cascade_p => 't' - ); -end; -/ show errors begin - acs_object_type.drop_type( - object_type => 'cr_download_rep', - cascade_p => 't' - ); + content_type.drop_type ( + content_type => 'cr_download_archive_desc', + drop_children_p => 't', + drop_table_p => 't' + ); + + content_type.drop_type ( + content_type => 'cr_download_archive', + drop_children_p => 't', + drop_table_p => 't' + ); end; / show errors -begin - acs_object_type.drop_type( - object_type => 'cr_download_archive', - cascade_p => 't' - ); +-- need to drop this table here +drop table download_archive_types; +begin + content_type.drop_type ( + content_type => 'cr_download_rep', + drop_children_p => 't', + drop_table_p => 't' + ); end; / show errors - -drop package download_rep; \ No newline at end of file +drop package download_rep;