Bug #10300

Fix information object deletion

Added by José Raddaoui Marín almost 4 years ago. Updated over 3 years ago.

Status:VerifiedStart date:09/13/2016
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Information object
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

Unable to execute DELETE statement. [wrapped: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`atom`.`premis_object`, CONSTRAINT `premis_object_FK_2` FOREIGN KEY (`information_object_id`) REFERENCES `information_object` (`id`))]

I'm not sure why we don't have a cascade method in the SQL schema for the digital and premis objects, but the same could happen for both kind of objects if we forgot to manually delete them where we delete the information object, I think we should move those deletions inside the information object delete method.

History

#1 Updated by José Raddaoui Marín almost 4 years ago

  • Description updated (diff)

#2 Updated by José Raddaoui Marín almost 4 years ago

  • Status changed from New to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

Merged in qa/2.4.x

#3 Updated by Dan Gillean over 3 years ago

Same here - any testing tips? How was the old issue caused?

#4 Updated by José Raddaoui Marín over 3 years ago

I think you can verify this if the delete description or delete drafts tasks work with IOs that have digital objects associated and if it keeps working deleting through the GUI.

#5 Updated by Dan Gillean over 3 years ago

  • Status changed from QA/Review to Verified
  • Assignee deleted (Dan Gillean)

Also available in: Atom PDF