Not sure how this one happened:  after upgrading to dspace 1.6, we're having 
trouble deleting items from dspace.  We get an error message explaining that 
'update or delete on "item" violates foreign key constraint "$2" on 
"collection2item"'.  Describing collection2item yields:

   Table "public.collection2item"
    Column     |  Type   | Modifiers 
---------------+---------+-----------
 id            | integer | not null
 collection_id | integer | 
 item_id       | integer | 
Indexes:
    "collection2item_pkey" PRIMARY KEY, btree (id)
    "collection2item_collection_idx" btree (collection_id)
    "collection2item_item_id_idx" btree (item_id)
Foreign-key constraints:
    "$1" FOREIGN KEY (collection_id) REFERENCES collection(collection_id)
    "$2" FOREIGN KEY (item_id) REFERENCES item(item_id)
    "coll2item_item_fk" FOREIGN KEY (item_id) REFERENCES item(item_id) 
DEFERRABLE

I ran the database scheme update script, and it seems to have added the final, 
deferrable foreign key constraint; but I can't find any reference at all to the 
first two FKCs ($1 and $2).  As far as I can tell, they aren't supposed to 
exist at all; I assume they're left over from some previous version of dspace, 
didn't get removed at some point in the past, and just never caused problems 
until now.  Can anybody confirm that I can go ahead and drop these constraints 
(and similar constraints in Community2Collection?

Bill Anderson
Software Developer
Digital Library Development
Georgia Tech Library

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to