Index: openacs-4/packages/acs-service-contract/sql/oracle/upgrade/upgrade-4.5.1-4.6.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/sql/oracle/upgrade/upgrade-4.5.1-4.6.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-service-contract/sql/oracle/upgrade/upgrade-4.5.1-4.6.sql 30 Nov 2002 17:21:23 -0000 1.2 +++ openacs-4/packages/acs-service-contract/sql/oracle/upgrade/upgrade-4.5.1-4.6.sql 21 Oct 2003 19:22:00 -0000 1.3 @@ -9,11 +9,16 @@ -- add timestamp datatype declare + v_count integer; v_msg_type_id acs_sc_msg_types.msg_type_id%TYPE; begin - if acs_sc_msg_type.get_id('timestamp') is null then - v_msg_type_id := acs_sc_msg_type.new('timestamp',''); - end if; + + select count(*) into v_count from acs_sc_msg_types + where msg_type_name = 'timestamp'; + + if v_count = 0 then + v_msg_type_id := acs_sc_msg_type.new('timestamp',''); + end if; end; / show errors