Merge pull request #2225 from lcdservices/CRM-13994
[civicrm-core.git] / xml / schema / Core / File.xml
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>
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>
8 <add>1.5</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Unique ID</comment>
15 <add>1.5</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>file_type_id</name>
23 <type>int unsigned</type>
24 <comment>Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.</comment>
25 <add>1.5</add>
26 </field>
27 <field>
28 <name>mime_type</name>
29 <type>varchar</type>
30 <length>255</length>
31 <comment>mime type of the document</comment>
32 <add>1.5</add>
33 </field>
34 <field>
35 <name>uri</name>
36 <type>varchar</type>
37 <length>255</length>
38 <comment>uri of the file on disk</comment>
39 <add>1.5</add>
40 </field>
41 <field>
42 <name>document</name>
43 <type>mediumblob</type>
44 <comment>contents of the document</comment>
45 <add>1.5</add>
46 </field>
47 <field>
48 <name>description</name>
49 <type>varchar</type>
50 <length>255</length>
51 <comment>Additional descriptive text regarding this attachment (optional).</comment>
52 <add>1.5</add>
53 </field>
54 <field>
55 <name>upload_date</name>
56 <type>datetime</type>
57 <comment>Date and time that this attachment was uploaded or written to server.</comment>
58 <add>1.5</add>
59 </field>
60 </table>