Index: openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql	18 Feb 2003 20:53:45 -0000	1.7
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-objects-create.sql	17 May 2003 01:46:41 -0000	1.8
@@ -526,6 +526,16 @@
   -- Delete dynamic/generic attributes
   delete from acs_attribute_values where object_id = acs_object.delete.object_id;
 
+  -- Delete directly assigned permissions
+  --
+  -- 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
       from acs_object_types
