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