Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Core</base> | |
5 | <class>EntityTag</class> | |
6 | <name>civicrm_entity_tag</name> | |
7 | <comment>Tag entities (Contacts, Groups, Actions) to categories.</comment> | |
929a1c14 | 8 | <add>1.1</add> |
6a488035 TO |
9 | <log>true</log> |
10 | <field> | |
8f069c03 EM |
11 | <name>id</name> |
12 | <type>int unsigned</type> | |
13 | <title>Entity Tag ID</title> | |
14 | <required>true</required> | |
15 | <comment>primary key</comment> | |
16 | <add>1.1</add> | |
6a488035 TO |
17 | </field> |
18 | <primaryKey> | |
8f069c03 EM |
19 | <name>id</name> |
20 | <autoincrement>true</autoincrement> | |
6a488035 | 21 | </primaryKey> |
6a488035 | 22 | <field> |
8f069c03 EM |
23 | <name>entity_table</name> |
24 | <type>varchar</type> | |
25 | <title>Entity Table</title> | |
26 | <length>64</length> | |
27 | <comment>physical tablename for entity being joined to file, e.g. civicrm_contact</comment> | |
583bd2a5 SL |
28 | <pseudoconstant> |
29 | <optionGroupName>tag_used_for</optionGroupName> | |
30 | </pseudoconstant> | |
8f069c03 | 31 | <add>3.2</add> |
6a488035 TO |
32 | </field> |
33 | <field> | |
8f069c03 EM |
34 | <name>entity_id</name> |
35 | <type>int unsigned</type> | |
36 | <title>Entity ID</title> | |
37 | <required>true</required> | |
38 | <comment>FK to entity table specified in entity_table column.</comment> | |
39 | <add>3.2</add> | |
6a488035 | 40 | </field> |
71e5aa5c | 41 | <dynamicForeignKey> |
8f069c03 EM |
42 | <idColumn>entity_id</idColumn> |
43 | <typeColumn>entity_table</typeColumn> | |
44 | <add>3.2</add> | |
71e5aa5c | 45 | </dynamicForeignKey> |
6a488035 | 46 | <field> |
8f069c03 EM |
47 | <name>tag_id</name> |
48 | <type>int unsigned</type> | |
2ee21eaa | 49 | <title>Tag</title> |
8f069c03 EM |
50 | <required>true</required> |
51 | <comment>FK to civicrm_tag</comment> | |
52 | <add>1.1</add> | |
53 | <pseudoconstant> | |
54 | <table>civicrm_tag</table> | |
55 | <keyColumn>id</keyColumn> | |
56 | <labelColumn>name</labelColumn> | |
57 | </pseudoconstant> | |
58 | <html> | |
59 | <type>Select</type> | |
60 | </html> | |
6a488035 TO |
61 | </field> |
62 | <foreignKey> | |
8f069c03 EM |
63 | <name>tag_id</name> |
64 | <table>civicrm_tag</table> | |
65 | <key>id</key> | |
66 | <add>1.1</add> | |
67 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
68 | </foreignKey> |
69 | <index> | |
70 | <name>UI_entity_id_entity_table_tag_id</name> | |
71 | <fieldName>entity_id</fieldName> | |
72 | <fieldName>entity_table</fieldName> | |
73 | <fieldName>tag_id</fieldName> | |
74 | <unique>true</unique> | |
75 | <add>3.4</add> | |
76 | </index> | |
77 | </table> |