Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19366

Change civicrm_entity_financial_trxn fk to itself to CASCADE

    Details

    • Type: Task
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      When deleting contributions to clean out the db some records are left behind in ceft because of https://github.com/civicrm/civicrm-core/blob/master/xml/schema/Financial/EntityFinancialTrxn.xml#L53 - let's change this so instead of generating

      CONSTRAINT `FK_civicrm_entity_financial_trxn_financial_trxn_id` FOREIGN KEY (`financial_trxn_id`) REFERENCES `civicrm_financial_trxn` (`id`) ON DELETE SET NULL

      we get

      CONSTRAINT `FK_civicrm_entity_financial_trxn_financial_trxn_id` FOREIGN KEY (`financial_trxn_id`) REFERENCES `civicrm_financial_trxn` (`id`) ON DELETE CASCADE

        Attachments

          Activity

            People

            • Assignee:
              edsel Edsel Lopez
              Reporter:
              joemurray Joe Murray
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: