Merge pull request #19486 from eileenmcnaughton/pddemail
[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 <labelField>name</labelField>
12 <field>
13 <name>id</name>
14 <title>Tag ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Tag ID</comment>
18 <html>
19 <type>Number</type>
20 </html>
21 <add>1.1</add>
22 </field>
23 <primaryKey>
24 <name>id</name>
25 <autoincrement>true</autoincrement>
26 </primaryKey>
27 <field>
28 <name>name</name>
29 <title>Tag Name</title>
30 <type>varchar</type>
31 <required>true</required>
32 <length>64</length>
33 <comment>Name of Tag.</comment>
34 <add>1.1</add>
35 </field>
36 <field>
37 <name>description</name>
38 <title>Description</title>
39 <type>varchar</type>
40 <length>255</length>
41 <comment>Optional verbose description of the tag.</comment>
42 <add>1.1</add>
43 </field>
44 <field>
45 <name>parent_id</name>
46 <title>Parent Tag ID</title>
47 <type>int unsigned</type>
48 <default>NULL</default>
49 <comment>Optional parent id for this tag.</comment>
50 <pseudoconstant>
51 <table>civicrm_tag</table>
52 <keyColumn>id</keyColumn>
53 <labelColumn>name</labelColumn>
54 </pseudoconstant>
55 <html>
56 <label>Parent Tag</label>
57 </html>
58 <add>1.1</add>
59 </field>
60 <field>
61 <name>is_selectable</name>
62 <title>Display Tag?</title>
63 <type>boolean</type>
64 <default>1</default>
65 <comment>Is this tag selectable / displayed</comment>
66 <add>2.1</add>
67 </field>
68 <foreignKey>
69 <name>parent_id</name>
70 <table>civicrm_tag</table>
71 <key>id</key>
72 <add>1.1</add>
73 </foreignKey>
74 <index>
75 <name>UI_name</name>
76 <fieldName>name</fieldName>
77 <unique>true</unique>
78 <add>2.1</add>
79 </index>
80 <field>
81 <name>is_reserved</name>
82 <title>Reserved</title>
83 <type>boolean</type>
84 <default>0</default>
85 <add>3.2</add>
86 </field>
87 <field>
88 <name>is_tagset</name>
89 <title>Tagset</title>
90 <type>boolean</type>
91 <default>0</default>
92 <add>3.2</add>
93 </field>
94 <field>
95 <name>used_for</name>
96 <title>Used For</title>
97 <type>varchar</type>
98 <length>64</length>
99 <default>NULL</default>
100 <html>
101 <type>Select</type>
102 </html>
103 <pseudoconstant>
104 <optionGroupName>tag_used_for</optionGroupName>
105 </pseudoconstant>
106 <serialize>COMMA</serialize>
107 <add>3.2</add>
108 </field>
109 <field>
110 <name>created_id</name>
111 <title>Created By Contact ID</title>
112 <type>int unsigned</type>
113 <comment>FK to civicrm_contact, who created this tag</comment>
114 <html>
115 <label>Created By</label>
116 </html>
117 <add>3.4</add>
118 </field>
119 <field>
120 <name>color</name>
121 <title>Color</title>
122 <type>varchar</type>
123 <length>255</length>
124 <comment>Hex color value e.g. #ffffff</comment>
125 <default>NULL</default>
126 <add>4.7</add>
127 </field>
128 <foreignKey>
129 <name>created_id</name>
130 <table>civicrm_contact</table>
131 <key>id</key>
132 <add>3.4</add>
133 <onDelete>SET NULL</onDelete>
134 </foreignKey>
135 <field>
136 <name>created_date</name>
137 <type>datetime</type>
138 <title>Tag Created Date</title>
139 <comment>Date and time that tag was created.</comment>
140 <add>3.4</add>
141 </field>
142 </table>