Forum OpenACS Development: Re: Problem when i tried to delete a user from db (nuke user)

Thanks Mattew.

Your solution is better, instead of delete and recreate the constraint.

I needed to 'nuke' a user because I need to "free up" the email address as you said,

But finally I found a better way for me, I really wanted to nuke the user, so i deleted all the rows in many tables that references acs_objects,users,parties & persons.

I'll write a script to 'nuke' a user, if someone else wants to do that.


Posted by russ m on
Surely the correct way to fix this is for the constraints to be defined with "on delete cascade" so that any referencing objects are automatically deleted when the referenced object is deleted. I'd assume the data model wasn't written this way because on delete cascade wasn't supported in postgres when OACS4 was being written, but it's been available since at least PG 7.2.