[OPEN-ILS-DEV] Deleting the example branches

Mike Rylander mrylander at gmail.com
Fri Mar 21 18:20:02 EDT 2008


On Fri, Mar 21, 2008 at 4:14 PM, Robert Nix <glibrarysystem at gmail.com> wrote:
> Dan,
>
>   I tried to delete them from postgres but I get the error that it violates
> the foreign key constraint "org_unit_parent_ou_fkey" on "org_unit" and the
> detail on that is that the Key is sitll referenced from table "org_unit".
> Any thoughts on this error? I understand the concept of the foreign key as
> it is a primary key in another table but I don't know how to get around this
> error. I would assume it needs to be deleted in the org_unit first before
> deleting it from the actor.org_unit table. Is this a correct assumption?
>

You'll just need to remove the subordinate org units first.  Delete
from the deepest part of the tree out.  This constraint is in there to
avoid accidental deletion of an object that's in use.

Let us know if that does/doesn't help!

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone: 1-877-OPEN-ILS (673-6457)
 | email: miker at esilibrary.com
 | web: http://www.esilibrary.com


More information about the Open-ils-dev mailing list