[OPEN-ILS-DEV] Deleting the example branches

Robert Nix glibrarysystem at gmail.com
Fri Mar 21 16:14:36 EDT 2008


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?

On Fri, Mar 21, 2008 at 10:27 AM, Dan Scott <denials at gmail.com> wrote:

>  On 20/03/2008, Robert Nix <glibrarysystem at gmail.com> wrote:
> > I've looked through the documentation and the part for removing an
> existing
> > library has no information in it yet. I just need to remove all of the
> > example libraries that come configured by default. I already have all of
> the
> > information for my actual libraries entered in. Can someone help me with
> > this information, please?
>
> Hi Robert:
>
> At this point, SQL is your best interface for the task. You can use a
> GUI interface like pgadmin_iii to help, or do it from the psql command
> line interface:
>
> 1. Connect to your Evergreen database (may need -U username -h
> hostname arguments):
> psql evergreen
>
> 2. List the org_units in your system:
> evergreen=# select id, shortname, name from actor.org_unit;
>  id | shortname |        name
> ----+-----------+--------------------
>  1 | CONS      | Example Consortium
>  2 | SYS1      | Example System 1
>  3 | SYS2      | Example System 2
>  4 | BR1       | Example Branch 1
>  5 | BR2       | Example Branch 2
>  6 | BR3       | Example Branch 3
>  7 | BR4       | Example Branch 4
>  8 | SL1       | Example Sub-lib 1
>  9 | BM1       | Example Bookmobile 1
> (9 rows)
>
> 3. Delete the org_units that you no longer want based on their ID (the
> first column):
> evergreen=# delete from actor.org_unit where id = 9;
> DELETE 1
>
> 4. As always, run autogen.sh after adding, modifying, or deleting an
> org_unit:
> autogen.sh /openils/conf/opensrf_core.xml
>
> --
> Dan Scott
> Laurentian University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20080321/1581e699/attachment.html


More information about the Open-ils-dev mailing list