Merge pull request #12732 from eileenmcnaughton/setting_form1
[civicrm-core.git] / xml / schema / Core / File.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2
3<table>
4 <base>CRM/Core</base>
5 <class>File</class>
6 <name>civicrm_file</name>
e9986910 7 <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>
6a488035
TO
8 <add>1.5</add>
9 <log>true</log>
10 <field>
8f069c03
EM
11 <name>id</name>
12 <type>int unsigned</type>
56b7523d 13 <title>File ID</title>
8f069c03
EM
14 <required>true</required>
15 <comment>Unique ID</comment>
16 <add>1.5</add>
6a488035
TO
17 </field>
18 <primaryKey>
8f069c03
EM
19 <name>id</name>
20 <autoincrement>true</autoincrement>
6a488035
TO
21 </primaryKey>
22 <field>
8f069c03
EM
23 <name>file_type_id</name>
24 <type>int unsigned</type>
56b7523d 25 <title>File Type</title>
8f069c03
EM
26 <comment>Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.</comment>
27 <add>1.5</add>
6a488035
TO
28 </field>
29 <field>
8f069c03
EM
30 <name>mime_type</name>
31 <type>varchar</type>
56b7523d 32 <title>Mime Type</title>
8f069c03
EM
33 <length>255</length>
34 <comment>mime type of the document</comment>
35 <add>1.5</add>
6a488035
TO
36 </field>
37 <field>
8f069c03
EM
38 <name>uri</name>
39 <type>varchar</type>
56b7523d 40 <title>Path</title>
8f069c03
EM
41 <length>255</length>
42 <comment>uri of the file on disk</comment>
43 <add>1.5</add>
6a488035
TO
44 </field>
45 <field>
8f069c03
EM
46 <name>document</name>
47 <type>mediumblob</type>
56b7523d 48 <title>File Contents</title>
8f069c03
EM
49 <comment>contents of the document</comment>
50 <add>1.5</add>
6a488035
TO
51 </field>
52 <field>
8f069c03
EM
53 <name>description</name>
54 <type>varchar</type>
56b7523d 55 <title>File Description</title>
8f069c03
EM
56 <length>255</length>
57 <comment>Additional descriptive text regarding this attachment (optional).</comment>
58 <add>1.5</add>
6a488035
TO
59 </field>
60 <field>
8f069c03
EM
61 <name>upload_date</name>
62 <type>datetime</type>
56b7523d 63 <title>File Upload Date</title>
8f069c03
EM
64 <comment>Date and time that this attachment was uploaded or written to server.</comment>
65 <add>1.5</add>
6a488035 66 </field>
c3438d19
DA
67 <field>
68 <name>created_id</name>
69 <type>int unsigned</type>
70 <title>Created By Contact ID</title>
71 <comment>FK to civicrm_contact, who uploaded this file</comment>
ae2c7e00 72 <add>5.3</add>
c3438d19
DA
73 </field>
74 <foreignKey>
75 <name>created_id</name>
76 <table>civicrm_contact</table>
77 <key>id</key>
ae2c7e00 78 <add>5.3</add>
c3438d19
DA
79 <onDelete>SET NULL</onDelete>
80 </foreignKey>
6a488035 81</table>