Uploaded image for project: 'COmanage'
  1. COmanage
  2. CO-2722

Garbage collection of deleted CO fails because of cm_co_announcements fk

    XMLWordPrintable

Details

    Description

      The garbage collection job for a deleted CO failed with Finish Summary "SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`biocommons_registry_test`.`cm_co_announcements`, CONSTRAINT `cm_co_announcements_co_announcement_channel_id_fk` FOREIGN KEY (`co_an "

      (The rest is cut off).

      I removed the foreign key constraint manually using ALTER TABLE, deleted all rows from the cm_co_announcements table (they were all from the CO that was being deleted), and then added back the foreign key constraint with another ALTER TABLE command.

      I then rescheduled the garbage collection job and this time it ran to completion and the COs that were queued to be deleted were deleted.

      This happened with version 4.3.1.

      Attachments

        Issue Links

          Activity

            People

              shayna.atkinson@at.internet2.edu Shayna Atkinson
              scott.koranda@at.internet2.edu Scott Koranda (uwm.edu/illinois.edu)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: