eduardop
committed
on 05 Oct 05
translation
openacs-4/.../oracle/survsimp-drop.sql (+48 -11)
1 1 --
2 2 -- drop SQL for survsimp package
3 3 --
4 4 -- by nstrug@arsdigita.com on 29th September 2000
5 5 --
6 6 -- $Id$
7 7
8   begin
9           acs_object_type.drop_type ('survsimp_survey');
10   end;
11   /
12   show errors
  8 drop_package survsimp_response;
  9 drop_package survsimp_question;
  10 drop_package survsimp_survey;
13 11
14  
15   drop view survsimp_question_responses_un;
16 12 drop table survsimp_logic_surveys_map cascade constraints;
  13
17 14 drop sequence survsimp_logic_id_sequence;
18 15 drop table survsimp_logic;
19 16 drop table survsimp_choice_scores cascade constraints;
20 17 drop table survsimp_variables_surveys_map cascade constraints;
21 18 drop table survsimp_variables;
  19
22 20 drop sequence survsimp_variable_id_sequence;
  21 drop view survsimp_question_responses_un;
23 22 drop table survsimp_question_responses cascade constraints;
24 23 drop view survsimnp_responses_unique;
25 24 drop table survsimp_responses cascade constraints;
26   drop sequence survsimp_response_id_sequence;
27 25 drop table survsimp_question_choices cascade constraints;
  26
28 27 drop sequence survsimp_choice_id_sequence;
29 28 drop table survsimp_questions cascade constraints;
30   drop sequence survsimp_question_id_sequence;
31 29 drop table survsimp_surveys cascade constraints;
32   drop sequence survsimp_survey_id_sequence;
  30
  31 -- nuke all created objects
  32 -- need to do this before nuking the types
  33 delete from acs_objects where object_type = 'survsimp_response';
  34 delete from acs_objects where object_type = 'survsimp_question';
  35 delete from acs_objects where object_type = 'survsimp_survey';
  36
  37 begin
  38         acs_rel_type.drop_type('user_blob_response_rel');
  39
  40         acs_object_type.drop_type ('survsimp_response');
  41         acs_object_type.drop_type ('survsimp_question');
  42         acs_object_type.drop_type ('survsimp_survey');
  43
  44         acs_privilege.remove_child ('admin','survsimp_admin_survey');
  45         acs_privilege.remove_child ('read','survsimp_take_survey');
  46         acs_privilege.remove_child ('survsimp_admin_survey','survsimp_delete_question');
  47         acs_privilege.remove_child ('survsimp_admin_survey','survsimp_modify_question');
  48         acs_privilege.remove_child ('survsimp_admin_survey','survsimp_create_question');
  49         acs_privilege.remove_child ('survsimp_admin_survey','survsimp_delete_survey');
  50         acs_privilege.remove_child ('survsimp_admin_survey','survsimp_modify_survey');
  51         acs_privilege.remove_child ('survsimp_admin_survey','survsimp_create_survey');
  52
  53         acs_privilege.drop_privilege('survsimp_admin_survey');
  54         acs_privilege.drop_privilege('survsimp_take_survey');
  55         acs_privilege.drop_privilege('survsimp_delete_question');
  56         acs_privilege.drop_privilege('survsimp_modify_question');
  57         acs_privilege.drop_privilege('survsimp_create_question');
  58         acs_privilege.drop_privilege('survsimp_delete_survey');
  59         acs_privilege.drop_privilege('survsimp_modify_survey');
  60         acs_privilege.drop_privilege('survsimp_create_survey');
  61
  62
  63 end;
  64 /
  65 show errors
  66
  67
  68 drop function logical_negation;
  69