Forum OpenACS Development: Re: Coding Automatic Subsite Creation and Configuration

Collapse
Posted by Dave Bauer on
Randy,

The hardest part right now is #1. Currently there is no way to delete a package that has already been mounted. You can unmount it, but the code necessary to remove the objects that package has created does not exist.

We do need a way to delete individual package instances and the content they contain. I see this happening rarely on a production site, but for someone who wants to test or try out a package it would be very useful.

I see two options, either a service contract or a magically named tcl proc for each package. A package developer would be required to provide a tcl proc that would accept a package_id and correctly remove the objects that belong to it. Some people have mentioned that comprehensive use of on delete cascade in the OpenACS data model would also accomplish this.

Most of the problems with deleting a package instance wouldn't exist if there would have been proper usage of ON DELETE CASCADE from the beginning. I mean - why on earth should for example deletion of an object cause an error just because it has direct permissions associated with it?

In my understanding it was agreed that this situation should be improved on the way to 4.7 by adding on delete cascade where appropriate. I wouldn't find it productive to have a magic tcl proc mimicing this functionality. (Which doesn't mean that there is no use for such a proc, but it should definitely not handle things like deleting direct permissions).