Merge pull request #17440 from eileenmcnaughton/log_summ
[civicrm-core.git] / xml / schema / Core / Tag.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Core</base>
5 <class>Tag</class>
6 <name>civicrm_tag</name>
7 <comment>Provides support for flat or hierarchical classification of various types of entities (contacts, groups, actions...).</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <icon>fa-tag</icon>
11 <field>
12 <name>id</name>
13 <title>Tag ID</title>
14 <type>int unsigned</type>
15 <required>true</required>
16 <comment>Tag ID</comment>
17 <add>1.1</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>name</name>
25 <title>Tag Name</title>
26 <type>varchar</type>
27 <required>true</required>
28 <length>64</length>
29 <comment>Name of Tag.</comment>
30 <add>1.1</add>
31 </field>
32 <field>
33 <name>description</name>
34 <title>Description</title>
35 <type>varchar</type>
36 <length>255</length>
37 <comment>Optional verbose description of the tag.</comment>
38 <add>1.1</add>
39 </field>
40 <field>
41 <name>parent_id</name>
42 <title>Parent Tag</title>
43 <type>int unsigned</type>
44 <default>NULL</default>
45 <comment>Optional parent id for this tag.</comment>
46 <pseudoconstant>
47 <table>civicrm_tag</table>
48 <keyColumn>id</keyColumn>
49 <labelColumn>name</labelColumn>
50 </pseudoconstant>
51 <add>1.1</add>
52 </field>
53 <field>
54 <name>is_selectable</name>
55 <title>Display Tag?</title>
56 <type>boolean</type>
57 <default>1</default>
58 <comment>Is this tag selectable / displayed</comment>
59 <add>2.1</add>
60 </field>
61 <foreignKey>
62 <name>parent_id</name>
63 <table>civicrm_tag</table>
64 <key>id</key>
65 <add>1.1</add>
66 </foreignKey>
67 <index>
68 <name>UI_name</name>
69 <fieldName>name</fieldName>
70 <unique>true</unique>
71 <add>2.1</add>
72 </index>
73 <field>
74 <name>is_reserved</name>
75 <title>Reserved</title>
76 <type>boolean</type>
77 <default>0</default>
78 <add>3.2</add>
79 </field>
80 <field>
81 <name>is_tagset</name>
82 <title>Tagset</title>
83 <type>boolean</type>
84 <default>0</default>
85 <add>3.2</add>
86 </field>
87 <field>
88 <name>used_for</name>
89 <title>Used For</title>
90 <type>varchar</type>
91 <length>64</length>
92 <default>NULL</default>
93 <html>
94 <type>Select</type>
95 </html>
96 <pseudoconstant>
97 <optionGroupName>tag_used_for</optionGroupName>
98 </pseudoconstant>
99 <serialize>COMMA</serialize>
100 <add>3.2</add>
101 </field>
102 <field>
103 <name>created_id</name>
104 <title>Tag Created By</title>
105 <type>int unsigned</type>
106 <comment>FK to civicrm_contact, who created this tag</comment>
107 <add>3.4</add>
108 </field>
109 <field>
110 <name>color</name>
111 <title>Color</title>
112 <type>varchar</type>
113 <length>255</length>
114 <comment>Hex color value e.g. #ffffff</comment>
115 <default>NULL</default>
116 <add>4.7</add>
117 </field>
118 <foreignKey>
119 <name>created_id</name>
120 <table>civicrm_contact</table>
121 <key>id</key>
122 <add>3.4</add>
123 <onDelete>SET NULL</onDelete>
124 </foreignKey>
125 <field>
126 <name>created_date</name>
127 <type>datetime</type>
128 <title>Tag Created Date</title>
129 <comment>Date and time that tag was created.</comment>
130 <add>3.4</add>
131 </field>
132 </table>