Index: openacs-4/packages/news/sql/postgresql/news-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-drop.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/news/sql/postgresql/news-drop.sql	17 May 2003 10:49:52 -0000	1.4
+++ openacs-4/packages/news/sql/postgresql/news-drop.sql	23 Aug 2003 20:23:17 -0000	1.5
@@ -56,6 +56,19 @@
 drop function inline_0 ();
 
 
+
+-- Til: after adding content_type__drop_type above, dropping the table
+-- and the index explicitely was not necessary anymore. Leaving the calls
+-- commented out here though, so that they can be reactivated in case the lock
+-- situation mentioned in the original comment below occurs for some reason.
+
+-- drop indices to avoid lock situation through parent table
+--drop index cr_news_appuser_id_fk;
+-- delete pertinent info from cr_news
+--drop table cr_news;
+
+
+
 -- drop package news
 drop function news__new (integer,varchar,timestamptz,text,varchar,varchar,
        varchar,integer,timestamptz,integer,timestamptz,varchar,varchar,
@@ -66,7 +79,6 @@
 drop function news__archive (integer);
 drop function news__set_approve(integer,varchar,timestamptz,
        timestamptz,integer,timestamptz,varchar,boolean);
-drop function news__status (integer);
 drop function news__name (integer);
 drop function news__revision_new (integer,timestamptz,text,varchar,text,
        varchar,integer,timestamptz,integer,timestamptz,varchar,timestamptz,varchar,
@@ -77,15 +89,16 @@
 
 
 -- delete news views
-
 drop view news_items_approved;
 drop view news_items_live_or_submitted;
 drop view news_items_unapproved;
 drop view news_item_revisions;
 drop view news_item_unapproved;
 drop view news_item_full_active;
 
+drop function news__status (integer);
 
+
 -- drop attributes
 begin;
 
@@ -113,24 +126,17 @@
     'approval_ip', -- attribute_name
     'f'            -- drop_column
 );
--- delete content_type 'news'
-select acs_object_type__drop_type (
-    'news', -- object_type
-    't'     -- cascade_p
+
+-- drop CR content_type
+select content_type__drop_type(
+        'news',    -- content_type
+        't',       -- drop_children_p
+        't'        -- drop_table_p
 );
 
 end;
 
 
--- drop indices to avoid lock situation through parent table
-
-drop index cr_news_appuser_id_fk;
-
--- delete pertinent info from cr_news
-
-drop table cr_news;
-
-
 -- delete privileges;
 create function inline_0 ()
 returns integer as '
