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.7 -r1.8 --- openacs-4/packages/new-portal/sql/oracle/datasource-sc-drop.sql 9 May 2002 23:59:53 -0000 1.7 +++ openacs-4/packages/new-portal/sql/oracle/datasource-sc-drop.sql 1 Jul 2002 20:03:49 -0000 1.8 @@ -14,247 +14,239 @@ -- details. -- +-- -- The data source (portlet) contract --- copyright 2001, OpenForce, Inc. --- distributed under the GNU GPL v2 -- --- for Oracle 8/8i. (We're guessing 9i works, too). +-- @author arjun@openforce.net +-- @version $Id$ -- --- arjun@openforce.net --- started November, 2001 --- --- $Id$ declare - contract_id integer; - msg_type_id integer; - op_id integer; + contract_id integer; + msg_type_id integer; + op_id integer; begin - - -- drop GetMyName - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'GetMyName' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'GetMyName' - ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.GetMyName.InputType' - ); + -- drop GetMyName + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'GetMyName' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.GetMyName.InputType', - msg_type_id => msg_type_id - ); + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'GetMyName' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.GetMyName.OutputType' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.GetMyName.InputType' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.GetMyName.OutputType', - msg_type_id => msg_type_id - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.GetMyName.InputType', + msg_type_id => msg_type_id + ); - -- 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' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.GetMyName.OutputType' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.GetPrettyName.InputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.GetMyName.OutputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.GetPrettyName.InputType', - msg_type_id => msg_type_id - ); + -- drop GetPrettyName + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'GetPrettyName' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.GetPrettyName.OutputType' - ); + 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 - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.GetPrettyName.InputType' + ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.GetPrettyName.InputType', + msg_type_id => msg_type_id + ); - -- drop Link - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'Link' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'Link' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.GetPrettyName.OutputType' + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.Link.InputType' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.GetPrettyName.OutputType', + msg_type_id => msg_type_id + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Link.InputType', - msg_type_id => msg_type_id - ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.Link.OutputType' - ); + -- drop Link + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'Link' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Link.OutputType', - msg_type_id => msg_type_id - ); + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'Link' + ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.Link.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.Link.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.Link.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.Link.OutputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.AddSelfToPage.OutputType' - ); + -- Drop add_self_to_page + op_id := acs_sc_operation.get_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 - ); + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'AddSelfToPage' + ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.AddSelfToPage.InputType' + ); - -- 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' - ); + 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.Show.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.Show.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.Show.OutputType' - ); + -- Delete Show + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'Show' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Show.OutputType', - msg_type_id => msg_type_id - ); + 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.InputType' + ); - -- Delete Edit - op_id := acs_sc_operation.get_id ( - contract_name => 'portal_datasource', - operation_name => 'Edit' - ); - - acs_sc_operation.delete ( - operation_id => op_id, - contract_name => 'portal_datasource', - operation_name => 'Edit' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.Show.InputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.Edit.InputType' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.Show.OutputType' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Edit.InputType', - msg_type_id => msg_type_id - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.Show.OutputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.Edit.OutputType' - ); + -- Delete Edit + op_id := acs_sc_operation.get_id ( + contract_name => 'portal_datasource', + operation_name => 'Edit' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.Edit.OutputType', - msg_type_id => msg_type_id - ); + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'Edit' + ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.Edit.InputType' + ); - -- 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.Edit.InputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType' - ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.Edit.OutputType' + ); - acs_sc_msg_type.delete ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType', - msg_type_id => msg_type_id - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.Edit.OutputType', + msg_type_id => msg_type_id + ); - msg_type_id := acs_sc_msg_type.get_id ( - msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType' - ); + -- RemoveSelfFromPage + op_id := acs_sc_operation.get_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 - ); + acs_sc_operation.delete ( + operation_id => op_id, + contract_name => 'portal_datasource', + operation_name => 'RemoveSelfFromPage' + ); + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType' + ); - -- drop the contract - contract_id := acs_sc_contract.get_id ('portal_datasource'); - acs_sc_contract.delete ( - contract_id => contract_id, - contract_name => 'portal_datasource' - ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.InputType', + msg_type_id => msg_type_id + ); + acs_sc_msg_type.delete ( + msg_type_id := acs_sc_msg_type.get_id ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType' + ); + acs_sc_msg_type.delete ( + msg_type_name => 'portal_datasource.RemoveSelfFromPage.OutputType', + msg_type_id => msg_type_id + ); + + -- drop the contract + contract_id := acs_sc_contract.get_id ('portal_datasource'); + + acs_sc_contract.delete ( + contract_id => contract_id, + contract_name => 'portal_datasource' + ); + end; / show errors