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