[Archivesspace_Users_Group] Unable to delete resources
Steven Majewski
sdm7g at virginia.edu
Wed May 14 16:46:21 EDT 2014
On May 14, 2014, at 4:08 PM, Bridger Dyson-Smith <bdysonsm at utk.edu> wrote:
> Hi all,
>
> I'm trying to delete a record from a test repository and I'm getting the following error:
>
> 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/5]
>
> Any suggestions for how to proceed? I'm unable to delete the repository because of these records.
>
Have you upgraded to v1.0.9 yet ?
This bug was on the list fixed in the latest release:
FEATURE #67289478: Resources do not delete on cascade in MySQL
— Steve Majewski
Begin forwarded message:
> From: Chris Fitzpatrick <Chris.Fitzpatrick at lyrasis.org>
> Subject: Re: [Archivesspace_Users_Group] Can't delete guide under mysql: foreign key constraint.
> Date: March 11, 2014 at 5:39:34 AM EDT
> To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
> Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
>
> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140514/40f95c4f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4943 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140514/40f95c4f/attachment.bin>
More information about the Archivesspace_Users_Group
mailing list