CRM-16367 (Payment): added FK for created_id field.
authorRob Thorne <rob@torenware.com>
Wed, 29 Apr 2015 16:11:37 +0000 (16:11 +0000)
committerRob Thorne <rob@torenware.com>
Thu, 30 Apr 2015 02:58:35 +0000 (02:58 +0000)
xml/schema/Financial/PaymentToken.xml

index 58168dc2a4f606f6ed946943c4e151ba68c115f0..221d7edaa2b788595eb741d0afc4ebe547899ea9 100644 (file)
   </field> 
   <field> 
     <name>created_id</name> 
-    <type>int unsigned</type> 
-    <length>255</length> 
+    <type>int unsigned</type>  
     <comment>Contact ID of token creator</comment> 
     <add>4.7</add> 
   </field> 
+  <foreignKey>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>4.7</add>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
   <field> 
     <name>expiry_date</name> 
     <type>datetime</type>