Index: openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql	28 Sep 2002 14:20:59 -0000	1.4
+++ openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql	5 Mar 2003 17:40:28 -0000	1.5
@@ -1,61 +1,60 @@
-/* Delete all bugs */
 
-create function inline_0 ()
-returns integer as '
-declare
-    v_bug_id    integer;
-begin
-    loop        
-        select min(bug_id) into v_bug_id from bt_bugs;
-        exit when not found or v_bug_id is null;
-        perform bt_bug__delete(v_bug_id);
-    end loop;
+drop function bt_bug__new(
+    integer,     -- bug_id
+    integer,     -- package_id
+    integer,     -- component_id
+    integer,     -- found_in_version
+    varchar,     -- summary
+    varchar,     -- user_agent
+    text,        -- comment_content
+    varchar,     -- comment_format
+    timestamp,   -- creation_date
+    integer,     -- creation_user
+    varchar,     -- creation_ip
+    varchar,     -- item_subtype
+    varchar      -- content_type
+);
 
-    return 0;
-end;' language 'plpgsql';
+drop function bt_bug__delete (integer);
 
-select inline_0 ();
+drop function bt_bug_revision__new(
+    integer,        -- revision_id
+    integer,        -- bug_id
+    integer,        -- component_id
+    integer,        -- found_in_version
+    integer,        -- fix_for_version
+    integer,        -- fixed_in_version
+    varchar,        -- resolution
+    varchar,        -- user_agent
+    varchar,        -- summary
+    timestamp,      -- creation_date
+    integer,        -- creation_user
+    varchar         -- creation_ip
+);
 
-drop function inline_0 ();
-
-
-drop function bt_bug__new
-     (integer, integer, integer, varchar, integer, integer, integer, varchar, text, varchar, varchar, integer, varchar);
-drop function bt_bug__name (integer);
-drop function bt_bug__delete (integer);
-drop function bt_bug__status_sort_order(varchar);
-drop function bt_bug__bug_type_sort_order(varchar);
 drop function bt_version__set_active (integer);
-drop function bt_component__default_assignee(integer);
 drop function bt_project__new(integer);
 drop function bt_project__delete(integer);
 
 drop table bt_user_prefs;
-drop table bt_bug_actions;
 drop table bt_bugs;
-drop view bt_bug_number_seq;
-drop sequence t_bt_bug_number_seq;
-drop table bt_priority_codes;
-drop table bt_severity_codes;
+select acs_object_type__drop_type('bt_bug', 't');
+
+select content_type__drop_type('bt_bug_revision', 't', 'f');
+drop table bt_bug_revisions;
+
+drop table bt_default_keywords;
+
 drop table bt_components;
 drop table bt_versions;
 drop table bt_projects;
 
-delete from acs_objects where object_type = 'bt_bug';
 
-select acs_object_type__drop_type('bt_bug', 't');
-
 drop table bt_patch_bug_map;
 drop function bt_patch__delete(integer);
 drop function bt_patch__name(integer);
 drop function bt_patch__new(integer,integer,integer,text,text,text,text,integer,integer,varchar);
 drop table bt_patch_actions;
 drop table bt_patches;
-drop sequence t_bt_patch_number_seq;
-drop view bt_patch_number_seq;
 
-delete from acs_objects where object_type = 'bt_patch';
-
 select acs_object_type__drop_type('bt_patch', 't');
-
-\i bug-tracker-notifications-drop.sql
