Merge pull request #22724 from braders/feature/group-search-null-columns
[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>
65 <comment>Is this tag selectable / displayed</comment>
66 <add>2.1</add>
6a488035
TO
67 </field>
68 <foreignKey>
8f069c03
EM
69 <name>parent_id</name>
70 <table>civicrm_tag</table>
71 <key>id</key>
72 <add>1.1</add>
6a488035
TO
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>
4c863787 82 <title>Reserved</title>
6a488035
TO
83 <type>boolean</type>
84 <default>0</default>
85 <add>3.2</add>
86 </field>
87 <field>
88 <name>is_tagset</name>
4c863787 89 <title>Tagset</title>
6a488035
TO
90 <type>boolean</type>
91 <default>0</default>
92 <add>3.2</add>
93 </field>
94 <field>
95 <name>used_for</name>
4c863787 96 <title>Used For</title>
6a488035
TO
97 <type>varchar</type>
98 <length>64</length>
99 <default>NULL</default>
4c863787
CW
100 <html>
101 <type>Select</type>
102 </html>
103 <pseudoconstant>
104 <optionGroupName>tag_used_for</optionGroupName>
105 </pseudoconstant>
bc7b7b4a 106 <serialize>COMMA</serialize>
6a488035
TO
107 <add>3.2</add>
108 </field>
109 <field>
bf76be71 110 <name>created_id</name>
1c0d6845 111 <title>Created By Contact ID</title>
bf76be71
EM
112 <type>int unsigned</type>
113 <comment>FK to civicrm_contact, who created this tag</comment>
57e94608 114 <html>
1c0d6845 115 <label>Created By</label>
57e94608 116 </html>
bf76be71 117 <add>3.4</add>
6a488035 118 </field>
d73974ac
CW
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>
6a488035 128 <foreignKey>
bf76be71
EM
129 <name>created_id</name>
130 <table>civicrm_contact</table>
131 <key>id</key>
132 <add>3.4</add>
133 <onDelete>SET NULL</onDelete>
6a488035
TO
134 </foreignKey>
135 <field>
bf76be71
EM
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>
6a488035
TO
141 </field>
142</table>