Merge pull request #19086 from agileware/CIVICRM-1617
[civicrm-core.git] / xml / schema / Contact / Group.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>Group</class>
6 <name>civicrm_group</name>
7 <comment>Provide grouping of related contacts</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <icon>fa-users</icon>
11 <paths>
12 <add>civicrm/group/add?reset=1</add>
13 </paths>
14 <field>
15 <name>id</name>
16 <type>int unsigned</type>
17 <title>Group ID</title>
18 <required>true</required>
19 <comment>Group ID</comment>
20 <add>1.1</add>
21 </field>
22 <primaryKey>
23 <name>id</name>
24 <autoincrement>true</autoincrement>
25 </primaryKey>
26 <field>
27 <name>name</name>
28 <type>varchar</type>
29 <title>Group Name</title>
30 <length>64</length>
31 <comment>Internal name of Group.</comment>
32 <add>1.1</add>
33 </field>
34 <field>
35 <name>title</name>
36 <type>varchar</type>
37 <title>Group Title</title>
38 <length>255</length>
39 <localizable>true</localizable>
40 <comment>Name of Group.</comment>
41 <add>1.1</add>
42 <html>
43 <type>Text</type>
44 </html>
45 </field>
46 <field>
47 <name>description</name>
48 <type>text</type>
49 <title>Group Description</title>
50 <html>
51 <type>TextArea</type>
52 <rows>2</rows>
53 <cols>60</cols>
54 </html>
55 <comment>Optional verbose description of the group.</comment>
56 <add>1.1</add>
57 </field>
58 <field>
59 <name>source</name>
60 <type>varchar</type>
61 <title>Group Source</title>
62 <length>64</length>
63 <comment>Module or process which created this group.</comment>
64 <add>1.1</add>
65 </field>
66 <field>
67 <name>saved_search_id</name>
68 <type>int unsigned</type>
69 <title>Saved Search ID</title>
70 <comment>FK to saved search table.</comment>
71 <add>1.1</add>
72 </field>
73 <foreignKey>
74 <name>saved_search_id</name>
75 <table>civicrm_saved_search</table>
76 <key>id</key>
77 <add>1.1</add>
78 <onDelete>SET NULL</onDelete>
79 </foreignKey>
80 <field>
81 <name>is_active</name>
82 <type>boolean</type>
83 <title>Group Enabled</title>
84 <comment>Is this entry active?</comment>
85 <add>1.1</add>
86 </field>
87 <field>
88 <name>visibility</name>
89 <type>varchar</type>
90 <length>24</length>
91 <title>Group Visibility Setting</title>
92 <default>'User and User Admin Only'</default>
93 <comment>In what context(s) is this field visible.</comment>
94 <pseudoconstant>
95 <callback>CRM_Core_SelectValues::groupVisibility</callback>
96 </pseudoconstant>
97 <add>1.2</add>
98 <html>
99 <type>Select</type>
100 </html>
101 </field>
102 <field>
103 <name>where_clause</name>
104 <type>text</type>
105 <title>Group Where Clause</title>
106 <comment>the sql where clause if a saved search acl</comment>
107 <add>1.6</add>
108 </field>
109 <field>
110 <name>select_tables</name>
111 <type>text</type>
112 <title>Tables For Select Clause</title>
113 <comment>the tables to be included in a select data</comment>
114 <serialize>PHP</serialize>
115 <add>1.6</add>
116 </field>
117 <field>
118 <name>where_tables</name>
119 <type>text</type>
120 <title>Tables For Where Clause</title>
121 <comment>the tables to be included in the count statement</comment>
122 <serialize>PHP</serialize>
123 <add>1.6</add>
124 </field>
125 <field>
126 <name>group_type</name>
127 <type>varchar</type>
128 <title>Group Type</title>
129 <length>128</length>
130 <comment>FK to group type</comment>
131 <pseudoconstant>
132 <optionGroupName>group_type</optionGroupName>
133 </pseudoconstant>
134 <serialize>SEPARATOR_BOOKEND</serialize>
135 <add>1.9</add>
136 </field>
137 <field>
138 <name>cache_date</name>
139 <type>timestamp</type>
140 <title>Group Cache Date</title>
141 <required>false</required>
142 <comment>Date when we created the cache for a smart group</comment>
143 <add>2.1</add>
144 </field>
145 <field>
146 <name>refresh_date</name>
147 <type>timestamp</type>
148 <title>Next Group Refresh Time</title>
149 <required>false</required>
150 <comment>Date and time when we need to refresh the cache next.</comment>
151 <add>4.3</add>
152 </field>
153 <field>
154 <name>parents</name>
155 <type>text</type>
156 <title>Group Parents</title>
157 <comment>IDs of the parent(s)</comment>
158 <add>2.1</add>
159 <serialize>COMMA</serialize>
160 <pseudoconstant>
161 <callback>CRM_Core_PseudoConstant::allGroup</callback>
162 </pseudoconstant>
163 </field>
164 <field>
165 <name>children</name>
166 <type>text</type>
167 <title>Group Children</title>
168 <comment>IDs of the child(ren)</comment>
169 <add>2.1</add>
170 </field>
171 <field>
172 <name>is_hidden</name>
173 <type>boolean</type>
174 <title>Group is Hidden</title>
175 <default>0</default>
176 <comment>Is this group hidden?</comment>
177 <add>2.2</add>
178 </field>
179 <field>
180 <name>is_reserved</name>
181 <type>boolean</type>
182 <title>Group is Reserved</title>
183 <default>0</default>
184 <add>4.2</add>
185 </field>
186 <index>
187 <name>index_group_type</name>
188 <fieldName>group_type</fieldName>
189 <add>1.9</add>
190 </index>
191 <index>
192 <name>UI_title</name>
193 <fieldName>title</fieldName>
194 <unique>true</unique>
195 <add>2.1</add>
196 </index>
197 <index>
198 <name>UI_name</name>
199 <fieldName>name</fieldName>
200 <unique>true</unique>
201 <add>2.1</add>
202 </index>
203 <field>
204 <name>created_id</name>
205 <type>int unsigned</type>
206 <title>Group Created By</title>
207 <comment>FK to contact table.</comment>
208 <add>4.3</add>
209 </field>
210 <foreignKey>
211 <name>created_id</name>
212 <table>civicrm_contact</table>
213 <key>id</key>
214 <add>4.3</add>
215 <onDelete>SET NULL</onDelete>
216 </foreignKey>
217 <field>
218 <name>modified_id</name>
219 <type>int unsigned</type>
220 <title>Group Modified By</title>
221 <comment>FK to contact table.</comment>
222 <add>4.5</add>
223 </field>
224 <foreignKey>
225 <name>modified_id</name>
226 <table>civicrm_contact</table>
227 <key>id</key>
228 <add>4.5</add>
229 <onDelete>SET NULL</onDelete>
230 </foreignKey>
231 <field>
232 <name>frontend_title</name>
233 <type>varchar</type>
234 <title>Public Group Title</title>
235 <length>255</length>
236 <localizable>true</localizable>
237 <comment>Alternative public title for this Group.</comment>
238 <default>NULL</default>
239 <add>5.31</add>
240 <html>
241 <type>Text</type>
242 </html>
243 </field>
244 <field>
245 <name>frontend_description</name>
246 <type>text</type>
247 <title>Public Group Description</title>
248 <html>
249 <type>TextArea</type>
250 <rows>2</rows>
251 <cols>60</cols>
252 </html>
253 <comment>Alternative public description of the group.</comment>
254 <localizable>true</localizable>
255 <default>NULL</default>
256 <add>5.31</add>
257 </field>
258 </table>