Index: openacs-4/packages/new-portal/sql/oracle/datasource-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/oracle/datasource-sc-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/new-portal/sql/oracle/datasource-sc-drop.sql 15 Nov 2001 18:49:52 -0000 1.1 +++ openacs-4/packages/new-portal/sql/oracle/datasource-sc-drop.sql 15 Nov 2001 19:16:24 -0000 1.2 @@ -7,6 +7,7 @@ -- arjun@openforce.net -- started November, 2001 -- +-- $Id$ declare contract_id integer; @@ -15,219 +16,222 @@ begin -- drop MyName - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.MyName.InputType' - ); + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'MyName' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'MyName' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.MyName.InputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.MyName.InputType' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.MyName.OutputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.MyName.InputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.MyName.OutputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.MyName.OutputType' + ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'MyName' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'MyName' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.MyName.OutputType', + msg_type_id => msg_type_id + ); - -- drop GetPrettyName - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.GetPrettyName.InputType' - ); + -- drop GetPrettyName + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'GetPrettyName' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'GetPrettyName' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.GetPrettyName.InputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.GetPrettyName.InputType' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.GetPrettyName.OutputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.GetPrettyName.InputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.GetPrettyName.OutputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.GetPrettyName.OutputType' + ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'GetPrettyName' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'GetPrettyName' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.GetPrettyName.OutputType', + msg_type_id => msg_type_id + ); - -- Drop add_self_to_page - -- The "args" string is an ns_set of extra arguments - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.AddSelfToPage.InputType' - ); + -- Drop add_self_to_page + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'AddSelfToPage' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'AddSelfToPage' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.AddSelfToPage.InputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.AddSelfToPage.InputType' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.AddSelfToPage.OutputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.AddSelfToPage.InputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.AddSelfToPage.OutputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.AddSelfToPage.OutputType' + ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'AddSelfToPage' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'AddSelfToPage' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.AddSelfToPage.OutputType', + msg_type_id => msg_type_id + ); - -- Delete Show - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.Show.InputType' - ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Show.InputType', - msg_type_id => msg_type_id - ); + -- Delete Show + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'Show' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'Show' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.Show.OutputType' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.Show.InputType' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Show.OutputType', - msg_type_id => msg_type_id - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.Show.InputType', + msg_type_id => msg_type_id + ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'Show' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'Show' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.Show.OutputType' + ); - -- rem RemoveSelfFromPage - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.Show.OutputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType', - msg_type_id => msg_type_id - ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType' - ); + -- rem RemoveSelfFromPage + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'RemoveSelfFromPage' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'RemoveSelfFromPage' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType', - msg_type_id => msg_type_id - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType' + ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'RemoveSelfFromPage' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'RemoveSelfFromPage' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType', + msg_type_id => msg_type_id + ); - -- rem MakeSelfAvailable + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.MakeSelfAvailable.InputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.MakeSelfAvailable.InputType', - msg_type_id => msg_type_id - ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.MakeSelfAvailable.OutputType' - ); + -- rem MakeSelfAvailable + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'MakeSelfAvailable' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'MakeSelfAvailable' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.MakeSelfAvailable.OutputType', - msg_type_id => msg_type_id - ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'MakeSelfAvailable' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'MakeSelfAvailable' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.MakeSelfAvailable.InputType' + ); - -- rem MakeSelfUnavailable + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.MakeSelfAvailable.InputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.MakeSelfUnavailable.InputType' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.MakeSelfAvailable.OutputType' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.MakeSelfUnavailable.InputType', - msg_type_id => msg_type_id - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.MakeSelfAvailable.OutputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.MakeSelfUnavailable.OutputType' - ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.MakeSelfUnavailable.OutputType', - msg_type_id => msg_type_id - ); + -- rem MakeSelfUnavailable + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'MakeSelfUnavailable' + ); + + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'MakeSelfUnavailable' + ); - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'MakeSelfUnavailable' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'MakeSelfUnavailable' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.MakeSelfUnavailable.InputType' + ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.MakeSelfUnavailable.InputType', + msg_type_id => msg_type_id + ); + + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.MakeSelfUnavailable.OutputType' + ); + + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.MakeSelfUnavailable.OutputType', + msg_type_id => msg_type_id + ); + + end; / show errors