Uploaded image for project: 'Contao CMS Integration'
  1. CTO-89

Foreign key constraint prevent deleting mailing lists

    Details

      Description

      Trying to delete a mailing list that is still subscribed end in a integrity constraint violation.

      Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`db373081_38`.`orm_avisota_subscription`, CONSTRAINT `FK_6B396A3D7B1AC3ED` FOREIGN KEY (`mailingList`) REFERENCES `orm_avisota_mailing_list` (`id`))

      I'm not sure if the right way is just adding a cascade or checking if someone has subscribed the list and disable the delete button.

      Maybe the best way is to ask the user in this case and perform a deep deletion.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tristan.lins Tristan Lins
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: