Foreign key for civicrm_option_group.option_group_id
authorPradeep Nayak <pradpnayak@gmail.com>
Tue, 21 Aug 2018 15:20:35 +0000 (16:20 +0100)
committerPradeep Nayak <pradpnayak@gmail.com>
Tue, 21 Aug 2018 15:20:35 +0000 (16:20 +0100)
CRM/Core/DAO/CustomField.php
xml/schema/Core/CustomField.xml

index fea2e7e4c7df6d3ed5dd65c7b2d4b45f872e2fc8..cda6a54a25d979e465b208c56da29c19cd27e10b 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Core/CustomField.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7f096c92af68ef9564675e3d708fbbe1)
+ * (GenCodeChecksum:73d7ccebba6055cae4fa0c9d797025c4)
  */
 
 /**
@@ -256,6 +256,7 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO {
     if (!isset(Civi::$statics[__CLASS__]['links'])) {
       Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__);
       Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'custom_group_id', 'civicrm_custom_group', 'id');
+      Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'option_group_id', 'civicrm_option_group', 'id');
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']);
     }
     return Civi::$statics[__CLASS__]['links'];
@@ -598,6 +599,7 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO {
           'entity' => 'CustomField',
           'bao' => 'CRM_Core_BAO_CustomField',
           'localizable' => 0,
+          'FKClassName' => 'CRM_Core_DAO_OptionGroup',
           'pseudoconstant' => [
             'table' => 'civicrm_option_group',
             'keyColumn' => 'id',
index 8d81309544f2910a1852834c8306f29b09143c72..dfbfa5a0213503f518ac5039f699116240fcb63b 100644 (file)
       <labelColumn>title</labelColumn>
     </pseudoconstant>
   </field>
+  <foreignKey>
+    <name>option_group_id</name>
+    <table>civicrm_option_group</table>
+    <key>id</key>
+    <add>5.3</add>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
   <field>
     <name>filter</name>
     <type>varchar</type>