Index: openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql,v
diff -u -r1.32 -r1.33
--- openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql	1 Jul 2004 11:29:54 -0000	1.32
+++ openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql	18 Jan 2005 16:22:09 -0000	1.33
@@ -1774,6 +1774,11 @@
 	 v_instance_name := instance_name;
        end if;
 
+       insert into apm_packages
+       (package_id, package_key, instance_name)
+       values
+       (v_package_id, package_key, v_instance_name);
+
        update acs_objects
        set title = v_instance_name,
            package_id = v_package_id
@@ -1783,11 +1788,6 @@
        from apm_package_types
        where package_key = apm_package.new.package_key;
 
-       insert into apm_packages
-       (package_id, package_key, instance_name)
-       values
-       (v_package_id, package_key, v_instance_name);
-
        if v_package_type = 'apm_application' then
 	   insert into apm_applications
 	   (application_id)
