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