Merge pull request #17068 from colemanw/currentPath
[civicrm-core.git] / xml / schema / Core / File.xml
index eb18e4bc498d1144fbab17a46c44d5ff59f67579..925e1f64893de551c1d77dddc882890509fbdcd2 100644 (file)
@@ -4,9 +4,7 @@
   <base>CRM/Core</base>
   <class>File</class>
   <name>civicrm_file</name>
-  <comment>Data store for uploaded (attached) files (pointer to file on disk OR blob). Maybe be joined to entities via
-    custom_value.file_id or entity_file table.
-  </comment>
+  <comment>Data store for uploaded (attached) files (pointer to file on disk OR blob). Maybe be joined to entities via custom_value.file_id or entity_file table.</comment>
   <add>1.5</add>
   <log>true</log>
   <field>
     <comment>Date and time that this attachment was uploaded or written to server.</comment>
     <add>1.5</add>
   </field>
+  <field>
+    <name>created_id</name>
+    <type>int unsigned</type>
+    <title>Created By Contact ID</title>
+    <comment>FK to civicrm_contact, who uploaded this file</comment>
+    <add>5.3</add>
+  </field>
+  <foreignKey>
+    <name>created_id</name>
+    <table>civicrm_contact</table>
+    <key>id</key>
+    <add>5.3</add>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
 </table>