[Archivesspace_Users_Group] Can't delete guide under mysql: foreign key constraint.

Chris Fitzpatrick Chris.Fitzpatrick at lyrasis.org
Tue Mar 11 05:39:34 EDT 2014


Hi Steven,


Thanks for this. This is indeed a bug, I've replicated this,  and I have made a ticket? here =>

https://www.pivotaltracker.com/story/show/67289478


MySQL needs to be explicitly told to perform a cascade delete, so that all the children are deleted with the parent. This slipped through because the test suite runs on derby. Will get a fix in for this for an upcoming release...


The work around now is to delete the children first then the parent.

?Apologize about the inconvenience.


Thanks again! very much appreciated.


best, chris fitzpatrick



Chris Fitzpatrick | chris.fitzpatrick at lyrasis.org
Developer, ArchivesSpace
http://archivesspace.org/
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Steven Majewski <sdm7g at virginia.edu>
Sent: Monday, March 10, 2014 9:55 PM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] Can't delete guide under mysql: foreign key constraint.


With ArchivesSpace 1.0.7.1 using mysql, I Imported an EAD guide and then tried to delete it.

If I try to delete the collection from the View of Edit page, I get:

We're sorry, but something went wrong.


If I try to delete my checking it in the browse page and clicking delete, I get:

Unable to delete records:
["{\"error\":\"Record deletion failed: Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`archivesspace/archival_object`, CONSTRAINT `archival_object_ibfk_5` FOREIGN KEY (`parent_id`) REFERENCES `archival_object` (`id`))\"}\n"] [/repositories/2/resources/3719]

I was finally able to delete the collection only after individually deleting all of it's components.

I tried with another install of 1.0.7.1 on my laptop, using the development db instead of mysql.
I imported EAD and then deleted the top level collection with no problem.
Then I reconfigured it to use mysql, and I get the same errors as above.

- Steve Majewski



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140311/f104d620/attachment.html>


More information about the Archivesspace_Users_Group mailing list