Added pseudoconstant for civicrm_tag.parent_id
[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>
10 <field>
8f069c03
EM
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>
6a488035
TO
17 </field>
18 <primaryKey>
8f069c03
EM
19 <name>id</name>
20 <autoincrement>true</autoincrement>
6a488035
TO
21 </primaryKey>
22 <field>
8f069c03
EM
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>
6a488035
TO
30 </field>
31 <field>
8f069c03
EM
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>
6a488035
TO
38 </field>
39 <field>
8f069c03
EM
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>
e9f4f742
PN
45 <pseudoconstant>
46 <table>civicrm_tag</table>
47 <keyColumn>id</keyColumn>
48 <labelColumn>name</labelColumn>
49 </pseudoconstant>
8f069c03 50 <add>1.1</add>
6a488035
TO
51 </field>
52 <field>
8f069c03
EM
53 <name>is_selectable</name>
54 <title>Display Tag?</title>
55 <type>boolean</type>
56 <default>1</default>
57 <comment>Is this tag selectable / displayed</comment>
58 <add>2.1</add>
6a488035
TO
59 </field>
60 <foreignKey>
8f069c03
EM
61 <name>parent_id</name>
62 <table>civicrm_tag</table>
63 <key>id</key>
64 <add>1.1</add>
6a488035
TO
65 </foreignKey>
66 <index>
67 <name>UI_name</name>
68 <fieldName>name</fieldName>
69 <unique>true</unique>
70 <add>2.1</add>
71 </index>
72 <field>
73 <name>is_reserved</name>
4c863787 74 <title>Reserved</title>
6a488035
TO
75 <type>boolean</type>
76 <default>0</default>
77 <add>3.2</add>
78 </field>
79 <field>
80 <name>is_tagset</name>
4c863787 81 <title>Tagset</title>
6a488035
TO
82 <type>boolean</type>
83 <default>0</default>
84 <add>3.2</add>
85 </field>
86 <field>
87 <name>used_for</name>
4c863787 88 <title>Used For</title>
6a488035
TO
89 <type>varchar</type>
90 <length>64</length>
91 <default>NULL</default>
4c863787
CW
92 <html>
93 <type>Select</type>
94 </html>
95 <pseudoconstant>
96 <optionGroupName>tag_used_for</optionGroupName>
97 </pseudoconstant>
bc7b7b4a 98 <serialize>COMMA</serialize>
6a488035
TO
99 <add>3.2</add>
100 </field>
101 <field>
bf76be71
EM
102 <name>created_id</name>
103 <title>Tag Created By</title>
104 <type>int unsigned</type>
105 <comment>FK to civicrm_contact, who created this tag</comment>
106 <add>3.4</add>
6a488035 107 </field>
d73974ac
CW
108 <field>
109 <name>color</name>
110 <title>Color</title>
111 <type>varchar</type>
112 <length>255</length>
113 <comment>Hex color value e.g. #ffffff</comment>
114 <default>NULL</default>
115 <add>4.7</add>
116 </field>
6a488035 117 <foreignKey>
bf76be71
EM
118 <name>created_id</name>
119 <table>civicrm_contact</table>
120 <key>id</key>
121 <add>3.4</add>
122 <onDelete>SET NULL</onDelete>
6a488035
TO
123 </foreignKey>
124 <field>
bf76be71
EM
125 <name>created_date</name>
126 <type>datetime</type>
127 <title>Tag Created Date</title>
128 <comment>Date and time that tag was created.</comment>
129 <add>3.4</add>
6a488035
TO
130 </field>
131</table>