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