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

4.5/git DB upgrade has broken FK declaration

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:
      None

      Description

      in sql/4.5.alpha1.mysql.tpl, this fails the upgrade:

      CRM-14435
      ALTER TABLE `civicrm_mail_settings`
      ADD CONSTRAINT `FK_civicrm_mail_settings_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`) ON DELETE NULL;

      The domain_id cannot be set to NULL on DELETE, because is it a "NOT NULL" column. Should be "ON DELETE CASCADE" to delete the setting, if a domain is removed.

        Attachments

          Activity

            People

            • Assignee:
              mlutfy Mathieu Lutfy
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: