Merge pull request #23082 from agileware/CIVICRM-1958
[civicrm-core.git] / xml / schema / Core / Tag.xml
CommitLineData
6a488035
TO
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>
449c4e6b 10 <icon>fa-tag</icon>
8ab43c93 11 <labelField>name</labelField>
6a488035 12 <field>
8f069c03
EM
13 <name>id</name>
14 <title>Tag ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 <comment>Tag ID</comment>
0481e12c
A
18 <html>
19 <type>Number</type>
20 </html>
8f069c03 21 <add>1.1</add>
6a488035
TO
22 </field>
23 <primaryKey>
8f069c03
EM
24 <name>id</name>
25 <autoincrement>true</autoincrement>
6a488035
TO
26 </primaryKey>
27 <field>
8f069c03
EM
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>
6a488035
TO
35 </field>
36 <field>
8f069c03
EM
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>
6a488035
TO
43 </field>
44 <field>
8f069c03 45 <name>parent_id</name>
57e94608 46 <title>Parent Tag ID</title>
8f069c03
EM
47 <type>int unsigned</type>
48 <default>NULL</default>
49 <comment>Optional parent id for this tag.</comment>
e9f4f742
PN
50 <pseudoconstant>
51 <table>civicrm_tag</table>
52 <keyColumn>id</keyColumn>
53 <labelColumn>name</labelColumn>
54 </pseudoconstant>
57e94608
A
55 <html>
56 <label>Parent Tag</label>
57 </html>
8f069c03 58 <add>1.1</add>
6a488035
TO
59 </field>
60 <field>
8f069c03
EM
61 <name>is_selectable</name>
62 <title>Display Tag?</title>
63 <type>boolean</type>
64 <default>1</default>
c1e814c7 65 <required>true</required>
8f069c03
EM
66 <comment>Is this tag selectable / displayed</comment>
67 <add>2.1</add>
6a488035
TO
68 </field>
69 <foreignKey>
8f069c03
EM
70 <name>parent_id</name>
71 <table>civicrm_tag</table>
72 <key>id</key>
73 <add>1.1</add>
6a488035
TO
74 </foreignKey>
75 <index>
76 <name>UI_name</name>
77 <fieldName>name</fieldName>
78 <unique>true</unique>
79 <add>2.1</add>
80 </index>
81 <field>
82 <name>is_reserved</name>
4c863787 83 <title>Reserved</title>
6a488035
TO
84 <type>boolean</type>
85 <default>0</default>
c1e814c7 86 <required>true</required>
6a488035
TO
87 <add>3.2</add>
88 </field>
89 <field>
90 <name>is_tagset</name>
4c863787 91 <title>Tagset</title>
6a488035
TO
92 <type>boolean</type>
93 <default>0</default>
c1e814c7 94 <required>true</required>
6a488035
TO
95 <add>3.2</add>
96 </field>
97 <field>
98 <name>used_for</name>
4c863787 99 <title>Used For</title>
6a488035
TO
100 <type>varchar</type>
101 <length>64</length>
102 <default>NULL</default>
4c863787
CW
103 <html>
104 <type>Select</type>
105 </html>
106 <pseudoconstant>
107 <optionGroupName>tag_used_for</optionGroupName>
108 </pseudoconstant>
bc7b7b4a 109 <serialize>COMMA</serialize>
6a488035
TO
110 <add>3.2</add>
111 </field>
112 <field>
bf76be71 113 <name>created_id</name>
1c0d6845 114 <title>Created By Contact ID</title>
bf76be71
EM
115 <type>int unsigned</type>
116 <comment>FK to civicrm_contact, who created this tag</comment>
57e94608 117 <html>
1c0d6845 118 <label>Created By</label>
57e94608 119 </html>
bf76be71 120 <add>3.4</add>
6a488035 121 </field>
d73974ac
CW
122 <field>
123 <name>color</name>
124 <title>Color</title>
125 <type>varchar</type>
126 <length>255</length>
127 <comment>Hex color value e.g. #ffffff</comment>
128 <default>NULL</default>
129 <add>4.7</add>
130 </field>
6a488035 131 <foreignKey>
bf76be71
EM
132 <name>created_id</name>
133 <table>civicrm_contact</table>
134 <key>id</key>
135 <add>3.4</add>
136 <onDelete>SET NULL</onDelete>
6a488035
TO
137 </foreignKey>
138 <field>
bf76be71
EM
139 <name>created_date</name>
140 <type>datetime</type>
141 <title>Tag Created Date</title>
142 <comment>Date and time that tag was created.</comment>
143 <add>3.4</add>
6a488035
TO
144 </field>
145</table>