[Archivesspace_Users_Group] Unable to delete resources

Bridger Dyson-Smith bdysonsm at utk.edu
Wed May 14 16:55:36 EDT 2014


Hi Steve,

On 05/14/2014 16:46, Steven Majewski wrote:
>
> On May 14, 2014, at 4:08 PM, Bridger Dyson-Smith <bdysonsm at utk.edu
> <mailto: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
>     <http://www.pivotaltracker.com/story/show/67289478>: Resources do
>     not delete on cascade in MySQL
>
>
> — Steve Majewski
>
>
> Begin forwarded message:
>
>> *From: *Chris Fitzpatrick <Chris.Fitzpatrick at lyrasis.org
>> <mailto: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
>> <mailto:archivesspace_users_group at lyralists.lyrasis.org>>
>> *Reply-To: *Archivesspace Users Group
>> <archivesspace_users_group at lyralists.lyrasis.org
>> <mailto: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
>> <mailto:chris.fitzpatrick at lyrasis.org>
>> Developer, ArchivesSpace
>> http://archivesspace.org/

Thank you for that. We'll upgrade and start afresh.
Best,

Bridger




More information about the Archivesspace_Users_Group mailing list