Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | <table> | |
3 | <base>CRM/Activity</base> | |
4 | <class>Activity</class> | |
5 | <name>civicrm_activity</name> | |
6 | <comment>Other Activity details stored here include contact, location, details.</comment> | |
7 | <add>1.1</add> | |
8 | <log>true</log> | |
9 | <field> | |
10 | <name>id</name> | |
11 | <uniqueName>activity_id</uniqueName> | |
3f3a3ba0 | 12 | <title>Activity ID</title> |
6a488035 TO |
13 | <import>true</import> |
14 | <type>int unsigned</type> | |
15 | <required>true</required> | |
16 | <comment>Unique Other Activity 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>source_contact_id</name> | |
25 | <type>int unsigned</type> | |
3f3a3ba0 | 26 | <title>Source Contact</title> |
6a488035 TO |
27 | <import>true</import> |
28 | <headerPattern>/(activity.)?source(.contact(.id)?)?/i</headerPattern> | |
29 | <comment>Contact ID of the person scheduling or logging this Activity. Usually the authenticated user.</comment> | |
30 | <add>1.1</add> | |
a6e671ae | 31 | <drop>4.4</drop> |
6a488035 TO |
32 | </field> |
33 | <foreignKey> | |
34 | <name>source_contact_id</name> | |
35 | <table>civicrm_contact</table> | |
36 | <key>id</key> | |
37 | <add>1.1</add> | |
a6e671ae | 38 | <drop>4.4</drop> |
6a488035 | 39 | <onDelete>SET NULL</onDelete> |
3f3a3ba0 | 40 | </foreignKey> |
6a488035 TO |
41 | <index> |
42 | <name>UI_source_contact_id</name> | |
3f3a3ba0 | 43 | <fieldName>source_contact_id</fieldName> |
6a488035 TO |
44 | <add>2.0</add> |
45 | <drop>3.2</drop> | |
46 | </index> | |
47 | ||
48 | <field> | |
49 | <name>source_record_id</name> | |
50 | <type>int unsigned</type> | |
51 | <title>Source Record</title> | |
52 | <comment>Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.</comment> | |
53 | <add>2.0</add> | |
54 | </field> | |
55 | <index> | |
56 | <name>UI_source_record_id</name> | |
3f3a3ba0 | 57 | <fieldName>source_record_id</fieldName> |
6a488035 TO |
58 | <add>3.2</add> |
59 | </index> | |
60 | <field> | |
4080e473 AS |
61 | <name>activity_type_id</name> |
62 | <title>Activity Type ID</title> | |
63 | <import>true</import> | |
64 | <type>int unsigned</type> | |
65 | <required>true</required> | |
66 | <export>false</export> | |
67 | <default>1</default> | |
68 | <headerPattern>/(activity.)?type(.id$)/i</headerPattern> | |
69 | <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment> | |
70 | <add>1.1</add> | |
71 | <pseudoconstant> | |
72 | <optionGroupName>activity_type</optionGroupName> | |
73 | </pseudoconstant> | |
6a488035 TO |
74 | </field> |
75 | <index> | |
76 | <name>UI_activity_type_id</name> | |
3f3a3ba0 | 77 | <fieldName>activity_type_id</fieldName> |
6a488035 TO |
78 | <add>1.6</add> |
79 | </index> | |
80 | ||
81 | <field> | |
82 | <name>target_entity_table</name> | |
83 | <type>varchar</type> | |
84 | <length>64</length> | |
85 | <required>true</required> | |
86 | <comment>Name of table where item being referenced is stored.</comment> | |
87 | <add>1.1</add> | |
3f3a3ba0 | 88 | <drop>2.0</drop> |
6a488035 TO |
89 | </field> |
90 | ||
91 | <field> | |
92 | <name>target_entity_id</name> | |
93 | <type>int unsigned</type> | |
94 | <required>true</required> | |
95 | <comment>Foreign key to the referenced item.</comment> | |
96 | <add>1.1</add> | |
3f3a3ba0 | 97 | <drop>2.0</drop> |
6a488035 TO |
98 | </field> |
99 | ||
100 | <field> | |
101 | <name>subject</name> | |
102 | <uniqueName>activity_subject</uniqueName> | |
103 | <type>varchar</type> | |
104 | <title>Subject</title> | |
105 | <length>255</length> | |
106 | <comment>The subject/purpose/short description of the activity.</comment> | |
107 | <import>true</import> | |
108 | <headerPattern>/(activity.)?subject/i</headerPattern> | |
109 | <add>1.1</add> | |
110 | <modify>2.0</modify> | |
111 | </field> | |
112 | ||
113 | <field> | |
114 | <name>scheduled_date</name> | |
115 | <type>datetime</type> | |
116 | <comment>Date and time meeting is scheduled to occur.</comment> | |
117 | <add>1.1</add> | |
118 | <drop>2.0</drop> | |
119 | </field> | |
3f3a3ba0 | 120 | |
6a488035 TO |
121 | <field> |
122 | <name>activity_date_time</name> | |
123 | <import>true</import> | |
124 | <title>Activity Date</title> | |
125 | <type>datetime</type> | |
126 | <headerPattern>/(activity.)?date(.time$)?/i</headerPattern> | |
127 | <comment>Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.</comment> | |
128 | <add>2.0</add> | |
3f3a3ba0 | 129 | </field> |
6a488035 TO |
130 | <field> |
131 | <name>due_date_time</name> | |
132 | <type>datetime</type> | |
133 | <comment>Date and time this activity is due.</comment> | |
134 | <add>2.0</add> | |
3f3a3ba0 CW |
135 | <drop>3.0</drop> |
136 | </field> | |
6a488035 TO |
137 | <field> |
138 | <name>duration_hours</name> | |
139 | <type>int unsigned</type> | |
140 | <comment>Planned or actual duration of meeting - hours.</comment> | |
141 | <add>1.1</add> | |
3f3a3ba0 | 142 | <drop>2.0</drop> |
6a488035 TO |
143 | </field> |
144 | ||
145 | <field> | |
146 | <name>duration_minutes</name> | |
147 | <type>int unsigned</type> | |
148 | <comment>Planned or actual duration of meeting - minutes.</comment> | |
149 | <add>1.1</add> | |
3f3a3ba0 | 150 | <drop>2.0</drop> |
6a488035 TO |
151 | </field> |
152 | ||
153 | <field> | |
154 | <name>duration</name> | |
155 | <uniqueName>activity_duration</uniqueName> | |
3f3a3ba0 | 156 | <title>Duration</title> |
6a488035 TO |
157 | <import>true</import> |
158 | <type>int unsigned</type> | |
159 | <headerPattern>/(activity.)?duration(s)?$/i</headerPattern> | |
160 | <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.</comment> | |
161 | <add>2.0</add> | |
162 | </field> | |
163 | ||
164 | <field> | |
165 | <name>location</name> | |
166 | <uniqueName>activity_location</uniqueName> | |
167 | <title>Location</title> | |
168 | <import>true</import> | |
169 | <type>varchar</type> | |
170 | <length>255</length> | |
171 | <headerPattern>/(activity.)?location$/i</headerPattern> | |
172 | <comment>Location of the activity (optional, open text).</comment> | |
173 | <add>1.1</add> | |
174 | </field> | |
175 | ||
176 | <field> | |
177 | <name>phone_id</name> | |
178 | <type>int unsigned</type> | |
179 | <title>Phone (called) ID</title> | |
180 | <comment>Phone ID of the number called (optional - used if an existing phone number is selected).</comment> | |
181 | <add>2.0</add> | |
182 | </field> | |
183 | <foreignKey> | |
184 | <name>phone_id</name> | |
185 | <table>civicrm_phone</table> | |
186 | <key>id</key> | |
187 | <add>2.0</add> | |
188 | <onDelete>SET NULL</onDelete> | |
189 | </foreignKey> | |
190 | ||
191 | <field> | |
192 | <name>phone_number</name> | |
193 | <title>Phone (called) Number</title> | |
194 | <type>varchar</type> | |
195 | <length>64</length> | |
196 | <comment>Phone number in case the number does not exist in the civicrm_phone table.</comment> | |
197 | <add>2.0</add> | |
198 | </field> | |
199 | ||
200 | <field> | |
201 | <name>details</name> | |
202 | <uniqueName>activity_details</uniqueName> | |
203 | <title>Details</title> | |
3f3a3ba0 | 204 | <import>true</import> |
6a488035 TO |
205 | <type>text</type> |
206 | <rows>8</rows> | |
207 | <cols>60</cols> | |
208 | <headerPattern>/(activity.)?detail(s)?$/i</headerPattern> | |
209 | <comment>Details about the activity (agenda, notes, etc).</comment> | |
210 | <add>1.1</add> | |
211 | </field> | |
212 | ||
213 | <field> | |
214 | <name>status</name> | |
215 | <type>enum</type> | |
216 | <title>Status</title> | |
217 | <values>Scheduled, Completed</values> | |
218 | <comment>What is the status of this meeting? Completed meeting status results in activity history entry.</comment> | |
219 | <add>1.1</add> | |
220 | <drop>2.0</drop> | |
221 | </field> | |
222 | ||
223 | <field> | |
224 | <name>status_id</name> | |
225 | <uniqueName>activity_status_id</uniqueName> | |
226 | <title>Activity Status Id</title> | |
227 | <import>true</import> | |
228 | <export>false</export> | |
229 | <headerPattern>/(activity.)?status(.label$)?/i</headerPattern> | |
230 | <type>int unsigned</type> | |
231 | <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment> | |
232 | <add>2.0</add> | |
4080e473 AS |
233 | <pseudoconstant> |
234 | <optionGroupName>activity_status</optionGroupName> | |
235 | </pseudoconstant> | |
6a488035 TO |
236 | </field> |
237 | <field> | |
238 | <name>priority_id</name> | |
239 | <type>int unsigned</type> | |
240 | <title>Priority</title> | |
241 | <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment> | |
242 | <add>2.0</add> | |
243 | <pseudoconstant> | |
6a488035 TO |
244 | <optionGroupName>priority</optionGroupName> |
245 | </pseudoconstant> | |
246 | </field> | |
247 | <field> | |
248 | <name>parent_id</name> | |
249 | <title>Parent Activity Id</title> | |
250 | <type>int unsigned</type> | |
251 | <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented</comment> | |
252 | <add>1.1</add> | |
253 | </field> | |
254 | <foreignKey> | |
255 | <name>parent_id</name> | |
256 | <table>civicrm_activity</table> | |
257 | <key>id</key> | |
258 | <add>1.1</add> | |
259 | <onDelete>CASCADE</onDelete> | |
260 | </foreignKey> | |
261 | ||
262 | <field> | |
263 | <name>is_test</name> | |
264 | <title>Test</title> | |
3f3a3ba0 | 265 | <uniqueName>activity_is_test</uniqueName> |
6a488035 TO |
266 | <type>boolean</type> |
267 | <default>0</default> | |
268 | <import>true</import> | |
269 | <headerPattern>/(is.)?test(.activity)?/i</headerPattern> | |
270 | <add>2.0</add> | |
271 | </field> | |
272 | <field> | |
3f3a3ba0 CW |
273 | <name>medium_id</name> |
274 | <uniqueName>activity_medium_id</uniqueName> | |
275 | <title>Activity Medium</title> | |
276 | <type>int unsigned</type> | |
277 | <default>NULL</default> | |
278 | <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment> | |
279 | <pseudoconstant> | |
280 | <optionGroupName>encounter_medium</optionGroupName> | |
281 | </pseudoconstant> | |
282 | <add>2.2</add> | |
6a488035 TO |
283 | </field> |
284 | <index> | |
285 | <name>index_medium_id</name> | |
286 | <fieldName>medium_id</fieldName> | |
287 | <add>2.2</add> | |
288 | </index> | |
289 | <field> | |
290 | <name>is_auto</name> | |
291 | <title>Auto</title> | |
292 | <type>boolean</type> | |
293 | <default>0</default> | |
294 | <add>2.2</add> | |
3f3a3ba0 CW |
295 | </field> |
296 | <field> | |
6a488035 TO |
297 | <name>relationship_id</name> |
298 | <title>Relationship Id</title> | |
3f3a3ba0 | 299 | <type>int unsigned</type> |
6a488035 | 300 | <default>NULL</default> |
3f3a3ba0 CW |
301 | <comment>FK to Relationship ID</comment> |
302 | <add>2.2</add> | |
6a488035 | 303 | </field> |
3f3a3ba0 CW |
304 | <foreignKey> |
305 | <name>relationship_id</name> | |
306 | <table>civicrm_relationship</table> | |
307 | <key>id</key> | |
6a488035 | 308 | <onDelete>SET NULL</onDelete> |
3f3a3ba0 | 309 | </foreignKey> |
6a488035 TO |
310 | <field> |
311 | <name>is_current_revision</name> | |
312 | <title>Is this activity a current revision in versioning chain?</title> | |
313 | <type>boolean</type> | |
314 | <default>1</default> | |
315 | <import>true</import> | |
316 | <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i</headerPattern> | |
317 | <add>2.2</add> | |
318 | </field> | |
319 | <index> | |
320 | <name>index_is_current_revision</name> | |
321 | <fieldName>is_current_revision</fieldName> | |
322 | <add>2.2</add> | |
3f3a3ba0 | 323 | </index> |
6a488035 TO |
324 | <field> |
325 | <name>original_id</name> | |
326 | <type>int unsigned</type> | |
327 | <title>Original Activity ID </title> | |
328 | <comment>Activity ID of the first activity record in versioning chain.</comment> | |
329 | <add>2.2</add> | |
330 | </field> | |
331 | <foreignKey> | |
332 | <name>original_id</name> | |
333 | <table>civicrm_activity</table> | |
334 | <key>id</key> | |
335 | <add>2.2</add> | |
336 | <onDelete>CASCADE</onDelete> | |
337 | </foreignKey> | |
338 | <index> | |
339 | <name>UI_original_id</name> | |
340 | <fieldName>original_id</fieldName> | |
341 | <add>2.2</add> | |
342 | <drop>3.2</drop> | |
3f3a3ba0 | 343 | </index> |
6a488035 TO |
344 | <field> |
345 | <name>result</name> | |
346 | <uniqueName>activity_result</uniqueName> | |
347 | <type>varchar</type> | |
348 | <title>Result</title> | |
349 | <length>255</length> | |
350 | <comment>Currently being used to store result id for survey activity, FK to option value.</comment> | |
351 | <add>3.3</add> | |
352 | </field> | |
353 | <field> | |
354 | <name>is_deleted</name> | |
355 | <uniqueName>activity_is_deleted</uniqueName> | |
356 | <title>Activity is in the Trash</title> | |
357 | <type>boolean</type> | |
358 | <default>0</default> | |
359 | <import>true</import> | |
360 | <headerPattern>/(activity.)?(trash|deleted)/i</headerPattern> | |
361 | <add>2.2</add> | |
362 | </field> | |
363 | <index> | |
364 | <name>index_is_deleted</name> | |
365 | <fieldName>is_deleted</fieldName> | |
366 | <add>2.2</add> | |
367 | </index> | |
3f3a3ba0 | 368 | <field> |
6a488035 TO |
369 | <name>campaign_id</name> |
370 | <uniqueName>activity_campaign_id</uniqueName> | |
371 | <type>int unsigned</type> | |
e1ab2e91 | 372 | <title>Campaign</title> |
6a488035 | 373 | <import>true</import> |
3f3a3ba0 | 374 | <comment>The campaign for which this activity has been triggered.</comment> |
3e3eacd0 CW |
375 | <pseudoconstant> |
376 | <table>civicrm_campaign</table> | |
377 | <keyColumn>id</keyColumn> | |
378 | <labelColumn>title</labelColumn> | |
3e3eacd0 | 379 | </pseudoconstant> |
3f3a3ba0 | 380 | <add>3.4</add> |
6a488035 | 381 | </field> |
3f3a3ba0 CW |
382 | <foreignKey> |
383 | <name>campaign_id</name> | |
384 | <table>civicrm_campaign</table> | |
385 | <key>id</key> | |
6a488035 TO |
386 | <onDelete>SET NULL</onDelete> |
387 | </foreignKey> | |
3f3a3ba0 CW |
388 | <field> |
389 | <name>engagement_level</name> | |
390 | <uniqueName>activity_engagement_level</uniqueName> | |
391 | <type>int unsigned</type> | |
392 | <title>Engagement Index</title> | |
393 | <import>true</import> | |
394 | <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment> | |
395 | <pseudoconstant> | |
396 | <optionGroupName>engagement_index</optionGroupName> | |
397 | </pseudoconstant> | |
398 | <add>3.4</add> | |
399 | </field> | |
6a488035 TO |
400 | <field> |
401 | <name>weight</name> | |
402 | <type>int</type> | |
403 | <add>4.1</add> | |
404 | </field> | |
405 | </table> |