Index: openacs-4/packages/simple-survey/sql/oracle/survsimp-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/sql/oracle/Attic/survsimp-drop.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/simple-survey/sql/oracle/survsimp-drop.sql	20 Apr 2001 20:51:22 -0000	1.1
+++ openacs-4/packages/simple-survey/sql/oracle/survsimp-drop.sql	15 Jun 2001 00:45:42 -0000	1.2
@@ -5,28 +5,65 @@
 --
 -- $Id$
 
-begin
-	acs_object_type.drop_type ('survsimp_survey');
-end;
-/
-show errors
+drop_package survsimp_response;
+drop_package survsimp_question;
+drop_package survsimp_survey;
 
-
-drop view survsimp_question_responses_un;
 drop table survsimp_logic_surveys_map cascade constraints;
+
 drop sequence survsimp_logic_id_sequence;
 drop table survsimp_logic;
 drop table survsimp_choice_scores cascade constraints;
 drop table survsimp_variables_surveys_map cascade constraints;
 drop table survsimp_variables;
+
 drop sequence survsimp_variable_id_sequence;
+drop view survsimp_question_responses_un;
 drop table survsimp_question_responses cascade constraints;
 drop view survsimnp_responses_unique;
 drop table survsimp_responses cascade constraints;
-drop sequence survsimp_response_id_sequence;
 drop table survsimp_question_choices cascade constraints;
+
 drop sequence survsimp_choice_id_sequence;
 drop table survsimp_questions cascade constraints;
-drop sequence survsimp_question_id_sequence;
 drop table survsimp_surveys cascade constraints;
-drop sequence survsimp_survey_id_sequence;
+
+-- nuke all created objects
+-- need to do this before nuking the types
+delete from acs_objects where object_type = 'survsimp_response';
+delete from acs_objects where object_type = 'survsimp_question';
+delete from acs_objects where object_type = 'survsimp_survey';
+
+begin
+	acs_rel_type.drop_type('user_blob_response_rel');
+
+	acs_object_type.drop_type ('survsimp_response');
+	acs_object_type.drop_type ('survsimp_question');
+	acs_object_type.drop_type ('survsimp_survey');
+
+	acs_privilege.remove_child ('admin','survsimp_admin_survey');
+	acs_privilege.remove_child ('read','survsimp_take_survey');
+	acs_privilege.remove_child ('survsimp_admin_survey','survsimp_delete_question');
+	acs_privilege.remove_child ('survsimp_admin_survey','survsimp_modify_question');
+	acs_privilege.remove_child ('survsimp_admin_survey','survsimp_create_question');
+	acs_privilege.remove_child ('survsimp_admin_survey','survsimp_delete_survey');
+	acs_privilege.remove_child ('survsimp_admin_survey','survsimp_modify_survey');
+	acs_privilege.remove_child ('survsimp_admin_survey','survsimp_create_survey');
+
+	acs_privilege.drop_privilege('survsimp_admin_survey');
+	acs_privilege.drop_privilege('survsimp_take_survey');
+	acs_privilege.drop_privilege('survsimp_delete_question');
+	acs_privilege.drop_privilege('survsimp_modify_question');
+	acs_privilege.drop_privilege('survsimp_create_question');
+	acs_privilege.drop_privilege('survsimp_delete_survey');
+	acs_privilege.drop_privilege('survsimp_modify_survey');
+	acs_privilege.drop_privilege('survsimp_create_survey');
+
+
+end;
+/
+show errors
+
+
+drop function logical_negation;
+
