Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-4.6-4.6.1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/Attic/upgrade-4.6-4.6.1.sql,v
diff -u -r1.1.2.5 -r1.1.2.6
--- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-4.6-4.6.1.sql	15 Feb 2003 20:56:56 -0000	1.1.2.5
+++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-4.6-4.6.1.sql	15 Feb 2003 22:31:13 -0000	1.1.2.6
@@ -92,7 +92,14 @@
   delete from acs_attribute_values where object_id = acs_object.delete.object_id;
 
   -- Delete directly assigned permissions
-  delete from acs_permissions where object_id = acs_object.delete.object_id;
+  --
+  -- JCD: We do this as an execute rather than just a direct query since 
+  -- the acs_permissions table is not created when this file is
+  -- sourced. We need to clean up the creates and once that is done
+  -- we can turn this into a simple delete statement.
+  --
+  execute immediate 'delete from acs_permissions where object_id = :object_id'
+  using in object_id;
 
   for object_type
   in (select table_name, id_column
