Forum OpenACS Development: Re: OpenACS 5.8.1 - PL/pgSQL functions application_group__delete and acs_group__delete

Hi Gustaf, Hi Michael,

As I can see in your table defintion "\d+ application_groups" you have a ON DELETE CASCADE on the foreign key on table groups:
"application_groups_group_id_fk" FOREIGN KEY (group_id) REFERENCES groups(group_id) ON DELETE CASCADE

I think that is the reason why it works with your installation and not in mine.

So the problem is in file:
packages/acs-subsite/sql/application_groups-create.sql

In my OpenACS 5.8.1 version (downloaded yesterday from http://openacs.org/projects/openacs/download/download/openacs-5.8.1.tar.gz?revision_id=4197803) the file has the CVS-Version:
@cvs-id $Id: application-groups-create.sql,v 1.13 2013/03/30 18:04:20 gustafn Exp $
with no ON DELETE CASCASE in the table definition

But may the issue is already solved in newer versions, because I found the required ON DELETE CASCADE in OpenACS 5.8.1b
@cvs-id $Id: application-groups-create.sql,v 1.13.2.1 2015/01/02 09:00:13 gustafn Exp $

If so, I would just add the ON DELETE CASCADE manually, since the issue should be solved in newer versions.

Many thanks.

Patrick

Patrick, great! I'll try to figure out, why the "on delete cascade" is missing in fresh installations and will provide an update script for OpenACS 5.8.1

-g

Patrick, now everything is clear. It seems that I've made the change adding the "on delete cascade" AFTER the release of OpenACS 5.8.1.

http://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-8%3Agustafn%3A20150102090013

So, if you have a installation from tar, you can browse to http://YOURINSTALLATION/acs-admin/install/ and do an "upgrade from repository"

all the best
-g

Now it works.

Many thanks.
Patrick