Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Core</base> | |
5 | <class>EntityFile</class> | |
6 | <name>civicrm_entity_file</name> | |
8f069c03 | 7 | <comment>Attaches (joins) uploaded files (images, documents, etc.) to entities (Contacts, Groups, Actions).</comment> |
6a488035 TO |
8 | <log>true</log> |
9 | <field> | |
8f069c03 EM |
10 | <name>id</name> |
11 | <type>int unsigned</type> | |
12 | <required>true</required> | |
13 | <comment>primary key</comment> | |
14 | <add>1.5</add> | |
6a488035 TO |
15 | </field> |
16 | <primaryKey> | |
8f069c03 EM |
17 | <name>id</name> |
18 | <autoincrement>true</autoincrement> | |
6a488035 TO |
19 | </primaryKey> |
20 | <field> | |
8f069c03 EM |
21 | <name>entity_table</name> |
22 | <type>varchar</type> | |
23 | <length>64</length> | |
24 | <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment> | |
25 | <add>1.5</add> | |
6a488035 TO |
26 | </field> |
27 | <field> | |
8f069c03 EM |
28 | <name>entity_id</name> |
29 | <type>int unsigned</type> | |
30 | <required>true</required> | |
31 | <comment>FK to entity table specified in entity_table column.</comment> | |
32 | <add>1.5</add> | |
6a488035 | 33 | </field> |
71e5aa5c | 34 | <dynamicForeignKey> |
8f069c03 EM |
35 | <idColumn>entity_id</idColumn> |
36 | <typeColumn>entity_table</typeColumn> | |
37 | <add>1.5</add> | |
71e5aa5c | 38 | </dynamicForeignKey> |
6a488035 | 39 | <index> |
8f069c03 EM |
40 | <name>index_entity</name> |
41 | <fieldName>entity_table</fieldName> | |
42 | <fieldName>entity_id</fieldName> | |
43 | <add>1.5</add> | |
6a488035 TO |
44 | </index> |
45 | <field> | |
8f069c03 EM |
46 | <name>file_id</name> |
47 | <type>int unsigned</type> | |
48 | <required>true</required> | |
49 | <comment>FK to civicrm_file</comment> | |
50 | <add>1.5</add> | |
6a488035 TO |
51 | </field> |
52 | <foreignKey> | |
8f069c03 EM |
53 | <name>file_id</name> |
54 | <table>civicrm_file</table> | |
55 | <key>id</key> | |
56 | <add>1.5</add> | |
6a488035 TO |
57 | </foreignKey> |
58 | <index> | |
8f069c03 EM |
59 | <name>index_entity_file_id</name> |
60 | <fieldName>entity_table</fieldName> | |
61 | <fieldName>entity_id</fieldName> | |
62 | <fieldName>file_id</fieldName> | |
63 | <add>1.1</add> | |
6a488035 TO |
64 | </index> |
65 | </table> |