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