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