Merge pull request #19284 from eileenmcnaughton/mem_r
[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 <index>
146 <name>UI_cache_date</name>
147 <fieldName>cache_date</fieldName>
148 <add>5.34</add>
149 </index>
150 <field>
151 <name>refresh_date</name>
152 <type>timestamp</type>
153 <title>Next Group Refresh Time</title>
154 <required>false</required>
155 <comment>Date and time when we need to refresh the cache next.</comment>
156 <add>4.3</add>
157 </field>
158 <field>
159 <name>parents</name>
160 <type>text</type>
161 <title>Group Parents</title>
162 <comment>IDs of the parent(s)</comment>
163 <add>2.1</add>
164 <serialize>COMMA</serialize>
165 <pseudoconstant>
166 <callback>CRM_Core_PseudoConstant::allGroup</callback>
167 </pseudoconstant>
168 </field>
169 <field>
170 <name>children</name>
171 <type>text</type>
172 <title>Group Children</title>
173 <comment>IDs of the child(ren)</comment>
174 <add>2.1</add>
175 </field>
176 <field>
177 <name>is_hidden</name>
178 <type>boolean</type>
179 <title>Group is Hidden</title>
180 <default>0</default>
181 <comment>Is this group hidden?</comment>
182 <add>2.2</add>
183 </field>
184 <field>
185 <name>is_reserved</name>
186 <type>boolean</type>
187 <title>Group is Reserved</title>
188 <default>0</default>
189 <add>4.2</add>
190 </field>
191 <index>
192 <name>index_group_type</name>
193 <fieldName>group_type</fieldName>
194 <add>1.9</add>
195 </index>
196 <index>
197 <name>UI_title</name>
198 <fieldName>title</fieldName>
199 <unique>true</unique>
200 <add>2.1</add>
201 </index>
202 <index>
203 <name>UI_name</name>
204 <fieldName>name</fieldName>
205 <unique>true</unique>
206 <add>2.1</add>
207 </index>
208 <field>
209 <name>created_id</name>
210 <type>int unsigned</type>
211 <title>Group Created By</title>
212 <comment>FK to contact table.</comment>
213 <add>4.3</add>
214 </field>
215 <foreignKey>
216 <name>created_id</name>
217 <table>civicrm_contact</table>
218 <key>id</key>
219 <add>4.3</add>
220 <onDelete>SET NULL</onDelete>
221 </foreignKey>
222 <field>
223 <name>modified_id</name>
224 <type>int unsigned</type>
225 <title>Group Modified By</title>
226 <comment>FK to contact table.</comment>
227 <add>4.5</add>
228 </field>
229 <foreignKey>
230 <name>modified_id</name>
231 <table>civicrm_contact</table>
232 <key>id</key>
233 <add>4.5</add>
234 <onDelete>SET NULL</onDelete>
235 </foreignKey>
236 <field>
237 <name>frontend_title</name>
238 <type>varchar</type>
239 <title>Public Group Title</title>
240 <length>255</length>
241 <localizable>true</localizable>
242 <comment>Alternative public title for this Group.</comment>
243 <default>NULL</default>
244 <add>5.31</add>
245 <html>
246 <type>Text</type>
247 </html>
248 </field>
249 <field>
250 <name>frontend_description</name>
251 <type>text</type>
252 <title>Public Group Description</title>
253 <html>
254 <type>TextArea</type>
255 <rows>2</rows>
256 <cols>60</cols>
257 </html>
258 <comment>Alternative public description of the group.</comment>
259 <localizable>true</localizable>
260 <default>NULL</default>
261 <add>5.31</add>
262 </field>
263 </table>