-----Original Message-----
From: Webshet, Sisay (ILRI) 
Sent: Monday, May 23, 2011 12:29 PM
To: 'Stuart Lewis'
Subject: RE: [Dspace-tech] community deletion

Hi Lewis,

Thanks very much it works.

Sisay

-----Original Message-----
From: Stuart Lewis [mailto:s.le...@auckland.ac.nz] 
Sent: Monday, May 23, 2011 11:58 AM
To: Webshet, Sisay (ILRI)
Subject: Re: [Dspace-tech] community deletion

When you move a community, I think you also need to run:

update communities2item set community_id=47 where item_id in (select
item_id from item where owning_collection=254);

This updates the relationship between which communities an item appears
in.

Because you have not updated this, when you try to remove the community,
the community cannot be deleted because it is still referenced in that
table.



On 23/05/2011, at 8:46 PM, Webshet, Sisay (ILRI) wrote:

> Hi Lewis,
> 
> I just login to the dspace database using psql -U dspace
> Then I used this command directly on the database
> I did this way i.e. move a collection 251 from community whose id=1 to

> a community whose id is 47 
> Which works perfect
> 
> UPDATE community2collection
>   SET community_id=47 WHERE community_id=1 and collection_id=254;
> 
> Do you consult me on how to do using predefined dspace command
> Thanks 
> sisay
> -----Original Message-----
> From: Stuart Lewis [mailto:s.le...@auckland.ac.nz] 
> Sent: Monday, May 23, 2011 11:02 AM
> To: Webshet, Sisay (ILRI)
> Subject: Re: [Dspace-tech] community deletion
> 
> Hi Sisay,
> 
> How did you move the community?  I wonder if when you performed the
move
> some of the internal database links might not have been updated - this
> often happens if you move things using a postgres sql query instead of
a
> pre-defined DSpace command.  If so, you might need to first delete all
> references to items in the community from the communities2item table.
> 
> Of course, with all database interactions like this, ensure you have a
> full database backup first, and know how to restore it in case you
> delete the wrong data.
> 
> Thanks,
> 
> 
> Stuart Lewis
> Digital Development Manager
> Te Tumu Herenga The University of Auckland Library
> Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
> Ph: +64 (0)9 373 7599 x81928
> 
> 
> 
> On 23/05/2011, at 7:24 PM, Webshet, Sisay (ILRI) wrote:
> 
>> Hi ,
>> 
>> Everybody
>> 
>> I just moved a collection form a top level community to another top
> level community
>> In dspace 1..7.1 , when I try to delete the source top level
community
> an internal system error.
>> 
>> The log file says update or delete on table "community" violates
> foreign key constraint "communities2item_community_id_fkey" on table
> "communities2item"
>> Detail: Key (community_id)=(47) is still referenced from table
> "communities2item
>> Occurs .can anyone advise me
>> Thanks
>> sisay
>> 
>> 
>> <ATT00001..txt><ATT00002..txt>
> 
> 

Stuart Lewis
Digital Development Manager
Te Tumu Herenga The University of Auckland Library
Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
Ph: +64 (0)9 373 7599 x81928


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to