Forum OpenACS Development: Re: Problem when i tried to delete a user from db (nuke user)
3: Re: Problem when i tried to delete a user from db (nuke user) (response to 1)
Posted by Enrique Catalan on 11/09/04 01:55 AM
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.
4: Re: Problem when i tried to delete a user from db (nuke user) (response to 3)
Posted by russ m on 11/11/04 04:04 AM
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.