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> | |
165a7fc0 | 6 | <comment>Other Activity details stored here include contact, location, details.</comment> |
6a488035 TO |
7 | <add>1.1</add> |
8 | <log>true</log> | |
9 | <field> | |
29e8791c EM |
10 | <name>id</name> |
11 | <uniqueName>activity_id</uniqueName> | |
12 | <title>Activity ID</title> | |
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> | |
6a488035 TO |
18 | </field> |
19 | <primaryKey> | |
29e8791c EM |
20 | <name>id</name> |
21 | <autoincrement>true</autoincrement> | |
6a488035 TO |
22 | </primaryKey> |
23 | <field> | |
29e8791c EM |
24 | <name>source_contact_id</name> |
25 | <type>int unsigned</type> | |
26 | <title>Source Contact</title> | |
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> | |
31 | <drop>4.4</drop> | |
6a488035 TO |
32 | </field> |
33 | <foreignKey> | |
29e8791c EM |
34 | <name>source_contact_id</name> |
35 | <table>civicrm_contact</table> | |
36 | <key>id</key> | |
37 | <add>1.1</add> | |
38 | <drop>4.4</drop> | |
39 | <onDelete>SET NULL</onDelete> | |
3f3a3ba0 | 40 | </foreignKey> |
6a488035 | 41 | <index> |
29e8791c EM |
42 | <name>UI_source_contact_id</name> |
43 | <fieldName>source_contact_id</fieldName> | |
44 | <add>2.0</add> | |
45 | <drop>3.2</drop> | |
6a488035 | 46 | </index> |
6a488035 | 47 | <field> |
29e8791c EM |
48 | <name>source_record_id</name> |
49 | <type>int unsigned</type> | |
50 | <title>Source Record</title> | |
51 | <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> | |
52 | <add>2.0</add> | |
6a488035 TO |
53 | </field> |
54 | <index> | |
29e8791c EM |
55 | <name>UI_source_record_id</name> |
56 | <fieldName>source_record_id</fieldName> | |
57 | <add>3.2</add> | |
6a488035 TO |
58 | </index> |
59 | <field> | |
29e8791c | 60 | <name>activity_type_id</name> |
3542118f | 61 | <title>Activity Type</title> |
29e8791c EM |
62 | <import>true</import> |
63 | <type>int unsigned</type> | |
64 | <required>true</required> | |
9ab34172 | 65 | <export>true</export> |
29e8791c EM |
66 | <default>1</default> |
67 | <headerPattern>/(activity.)?type(.id$)/i</headerPattern> | |
68 | <comment>FK to civicrm_option_value.id, that has to be valid, registered activity type.</comment> | |
69 | <add>1.1</add> | |
70 | <pseudoconstant> | |
71 | <optionGroupName>activity_type</optionGroupName> | |
72 | </pseudoconstant> | |
73 | <html> | |
74 | <type>Select</type> | |
75 | </html> | |
6a488035 TO |
76 | </field> |
77 | <index> | |
29e8791c EM |
78 | <name>UI_activity_type_id</name> |
79 | <fieldName>activity_type_id</fieldName> | |
80 | <add>1.6</add> | |
6a488035 | 81 | </index> |
6a488035 | 82 | <field> |
29e8791c EM |
83 | <name>target_entity_table</name> |
84 | <type>varchar</type> | |
85 | <length>64</length> | |
86 | <required>true</required> | |
87 | <comment>Name of table where item being referenced is stored.</comment> | |
88 | <add>1.1</add> | |
89 | <drop>2.0</drop> | |
6a488035 | 90 | </field> |
6a488035 | 91 | <field> |
29e8791c EM |
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> | |
97 | <drop>2.0</drop> | |
6a488035 | 98 | </field> |
6a488035 | 99 | <field> |
29e8791c EM |
100 | <name>subject</name> |
101 | <uniqueName>activity_subject</uniqueName> | |
102 | <type>varchar</type> | |
103 | <title>Subject</title> | |
104 | <length>255</length> | |
105 | <comment>The subject/purpose/short description of the activity.</comment> | |
106 | <import>true</import> | |
107 | <headerPattern>/(activity.)?subject/i</headerPattern> | |
108 | <html> | |
109 | <type>Text</type> | |
110 | </html> | |
111 | <add>1.1</add> | |
a8162657 | 112 | <change>2.0</change> |
6a488035 | 113 | </field> |
6a488035 | 114 | <field> |
29e8791c EM |
115 | <name>scheduled_date</name> |
116 | <type>datetime</type> | |
117 | <comment>Date and time meeting is scheduled to occur.</comment> | |
118 | <add>1.1</add> | |
119 | <drop>2.0</drop> | |
6a488035 | 120 | </field> |
6a488035 | 121 | <field> |
29e8791c EM |
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 | <html> | |
129 | <type>Select Date</type> | |
24317d89 | 130 | <formatType>activityDateTime</formatType> |
29e8791c EM |
131 | </html> |
132 | <add>2.0</add> | |
3f3a3ba0 | 133 | </field> |
ab49600a SL |
134 | <index> |
135 | <name>index_activity_date_time</name> | |
136 | <fieldName>activity_date_time</fieldName> | |
137 | <add>4.7</add> | |
138 | </index> | |
6a488035 | 139 | <field> |
29e8791c EM |
140 | <name>due_date_time</name> |
141 | <type>datetime</type> | |
142 | <comment>Date and time this activity is due.</comment> | |
143 | <add>2.0</add> | |
144 | <drop>3.0</drop> | |
3f3a3ba0 | 145 | </field> |
6a488035 | 146 | <field> |
29e8791c EM |
147 | <name>duration_hours</name> |
148 | <type>int unsigned</type> | |
149 | <comment>Planned or actual duration of meeting - hours.</comment> | |
150 | <add>1.1</add> | |
151 | <drop>2.0</drop> | |
6a488035 | 152 | </field> |
6a488035 | 153 | <field> |
29e8791c EM |
154 | <name>duration_minutes</name> |
155 | <type>int unsigned</type> | |
156 | <comment>Planned or actual duration of meeting - minutes.</comment> | |
157 | <add>1.1</add> | |
158 | <drop>2.0</drop> | |
6a488035 | 159 | </field> |
6a488035 | 160 | <field> |
29e8791c EM |
161 | <name>duration</name> |
162 | <uniqueName>activity_duration</uniqueName> | |
163 | <title>Duration</title> | |
164 | <import>true</import> | |
165 | <type>int unsigned</type> | |
166 | <headerPattern>/(activity.)?duration(s)?$/i</headerPattern> | |
167 | <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.</comment> | |
168 | <add>2.0</add> | |
169 | <html> | |
3542118f | 170 | <type>Number</type> |
29e8791c | 171 | </html> |
6a488035 | 172 | </field> |
6a488035 | 173 | <field> |
29e8791c EM |
174 | <name>location</name> |
175 | <uniqueName>activity_location</uniqueName> | |
176 | <title>Location</title> | |
177 | <import>true</import> | |
178 | <type>varchar</type> | |
179 | <length>255</length> | |
180 | <headerPattern>/(activity.)?location$/i</headerPattern> | |
181 | <comment>Location of the activity (optional, open text).</comment> | |
182 | <html> | |
183 | <type>Text</type> | |
184 | </html> | |
185 | <add>1.1</add> | |
6a488035 | 186 | </field> |
6a488035 | 187 | <field> |
29e8791c EM |
188 | <name>phone_id</name> |
189 | <type>int unsigned</type> | |
3542118f | 190 | <title>Phone (called)</title> |
29e8791c EM |
191 | <comment>Phone ID of the number called (optional - used if an existing phone number is selected).</comment> |
192 | <add>2.0</add> | |
193 | <html> | |
916b6181 | 194 | <type>EntityRef</type> |
29e8791c | 195 | </html> |
6a488035 TO |
196 | </field> |
197 | <foreignKey> | |
29e8791c EM |
198 | <name>phone_id</name> |
199 | <table>civicrm_phone</table> | |
200 | <key>id</key> | |
201 | <add>2.0</add> | |
202 | <onDelete>SET NULL</onDelete> | |
6a488035 | 203 | </foreignKey> |
6a488035 | 204 | <field> |
29e8791c EM |
205 | <name>phone_number</name> |
206 | <title>Phone (called) Number</title> | |
207 | <type>varchar</type> | |
208 | <length>64</length> | |
209 | <comment>Phone number in case the number does not exist in the civicrm_phone table.</comment> | |
210 | <html> | |
211 | <type>Text</type> | |
212 | </html> | |
213 | <add>2.0</add> | |
6a488035 | 214 | </field> |
6a488035 | 215 | <field> |
29e8791c EM |
216 | <name>details</name> |
217 | <uniqueName>activity_details</uniqueName> | |
218 | <title>Details</title> | |
219 | <import>true</import> | |
07f093c3 | 220 | <type>longtext</type> |
29e8791c EM |
221 | <headerPattern>/(activity.)?detail(s)?$/i</headerPattern> |
222 | <comment>Details about the activity (agenda, notes, etc).</comment> | |
223 | <html> | |
224 | <type>RichTextEditor</type> | |
225 | <rows>8</rows> | |
226 | <cols>60</cols> | |
227 | </html> | |
228 | <add>1.1</add> | |
6a488035 | 229 | </field> |
6a488035 | 230 | <field> |
29e8791c EM |
231 | <name>status</name> |
232 | <type>enum</type> | |
233 | <title>Status</title> | |
234 | <values>Scheduled, Completed</values> | |
235 | <comment>What is the status of this meeting? Completed meeting status results in activity history entry.</comment> | |
236 | <add>1.1</add> | |
237 | <drop>2.0</drop> | |
6a488035 | 238 | </field> |
6a488035 | 239 | <field> |
29e8791c EM |
240 | <name>status_id</name> |
241 | <uniqueName>activity_status_id</uniqueName> | |
242 | <title>Activity Status</title> | |
243 | <import>true</import> | |
a0655ae9 | 244 | <export>true</export> |
29e8791c EM |
245 | <headerPattern>/(activity.)?status(.label$)?/i</headerPattern> |
246 | <type>int unsigned</type> | |
247 | <comment>ID of the status this activity is currently in. Foreign key to civicrm_option_value.</comment> | |
248 | <add>2.0</add> | |
249 | <pseudoconstant> | |
250 | <optionGroupName>activity_status</optionGroupName> | |
251 | </pseudoconstant> | |
252 | <html> | |
253 | <type>Select</type> | |
254 | </html> | |
255 | </field> | |
5b3543ce JM |
256 | <index> |
257 | <name>index_status_id</name> | |
258 | <fieldName>status_id</fieldName> | |
259 | <add>4.7</add> | |
260 | </index> | |
29e8791c EM |
261 | <field> |
262 | <name>priority_id</name> | |
263 | <type>int unsigned</type> | |
264 | <title>Priority</title> | |
6c0c4ac7 | 265 | <export>true</export> |
266 | <import>true</import> | |
29e8791c EM |
267 | <comment>ID of the priority given to this activity. Foreign key to civicrm_option_value.</comment> |
268 | <add>2.0</add> | |
269 | <pseudoconstant> | |
270 | <optionGroupName>priority</optionGroupName> | |
271 | </pseudoconstant> | |
272 | <html> | |
273 | <type>Select</type> | |
274 | </html> | |
275 | </field> | |
276 | <field> | |
277 | <name>parent_id</name> | |
278 | <title>Parent Activity Id</title> | |
279 | <type>int unsigned</type> | |
280 | <comment>Parent meeting ID (if this is a follow-up item). This is not currently implemented</comment> | |
281 | <add>1.1</add> | |
6a488035 TO |
282 | </field> |
283 | <foreignKey> | |
29e8791c EM |
284 | <name>parent_id</name> |
285 | <table>civicrm_activity</table> | |
286 | <key>id</key> | |
287 | <add>1.1</add> | |
288 | <onDelete>CASCADE</onDelete> | |
6a488035 | 289 | </foreignKey> |
6a488035 | 290 | <field> |
29e8791c EM |
291 | <name>is_test</name> |
292 | <title>Test</title> | |
293 | <uniqueName>activity_is_test</uniqueName> | |
294 | <type>boolean</type> | |
295 | <default>0</default> | |
296 | <import>true</import> | |
297 | <headerPattern>/(is.)?test(.activity)?/i</headerPattern> | |
298 | <add>2.0</add> | |
299 | <html> | |
3542118f | 300 | <type>CheckBox</type> |
29e8791c EM |
301 | </html> |
302 | </field> | |
303 | <field> | |
304 | <name>medium_id</name> | |
305 | <uniqueName>activity_medium_id</uniqueName> | |
306 | <title>Activity Medium</title> | |
307 | <type>int unsigned</type> | |
308 | <default>NULL</default> | |
309 | <comment>Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.</comment> | |
310 | <pseudoconstant> | |
311 | <optionGroupName>encounter_medium</optionGroupName> | |
312 | </pseudoconstant> | |
313 | <html> | |
314 | <type>Select</type> | |
315 | </html> | |
316 | <add>2.2</add> | |
6a488035 TO |
317 | </field> |
318 | <index> | |
29e8791c EM |
319 | <name>index_medium_id</name> |
320 | <fieldName>medium_id</fieldName> | |
321 | <add>2.2</add> | |
6a488035 TO |
322 | </index> |
323 | <field> | |
29e8791c EM |
324 | <name>is_auto</name> |
325 | <title>Auto</title> | |
326 | <type>boolean</type> | |
327 | <default>0</default> | |
328 | <add>2.2</add> | |
3f3a3ba0 CW |
329 | </field> |
330 | <field> | |
29e8791c EM |
331 | <name>relationship_id</name> |
332 | <title>Relationship Id</title> | |
333 | <type>int unsigned</type> | |
334 | <default>NULL</default> | |
335 | <comment>FK to Relationship ID</comment> | |
336 | <add>2.2</add> | |
6a488035 | 337 | </field> |
3f3a3ba0 | 338 | <foreignKey> |
29e8791c EM |
339 | <name>relationship_id</name> |
340 | <table>civicrm_relationship</table> | |
341 | <key>id</key> | |
342 | <onDelete>SET NULL</onDelete> | |
3f3a3ba0 | 343 | </foreignKey> |
6a488035 | 344 | <field> |
29e8791c EM |
345 | <name>is_current_revision</name> |
346 | <title>Is this activity a current revision in versioning chain?</title> | |
347 | <type>boolean</type> | |
348 | <default>1</default> | |
349 | <import>true</import> | |
350 | <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i</headerPattern> | |
351 | <add>2.2</add> | |
6a488035 TO |
352 | </field> |
353 | <index> | |
29e8791c EM |
354 | <name>index_is_current_revision</name> |
355 | <fieldName>is_current_revision</fieldName> | |
356 | <add>2.2</add> | |
3f3a3ba0 | 357 | </index> |
6a488035 | 358 | <field> |
29e8791c EM |
359 | <name>original_id</name> |
360 | <type>int unsigned</type> | |
361 | <title>Original Activity ID </title> | |
362 | <comment>Activity ID of the first activity record in versioning chain.</comment> | |
363 | <add>2.2</add> | |
6a488035 TO |
364 | </field> |
365 | <foreignKey> | |
29e8791c EM |
366 | <name>original_id</name> |
367 | <table>civicrm_activity</table> | |
368 | <key>id</key> | |
369 | <add>2.2</add> | |
370 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
371 | </foreignKey> |
372 | <index> | |
29e8791c EM |
373 | <name>UI_original_id</name> |
374 | <fieldName>original_id</fieldName> | |
375 | <add>2.2</add> | |
376 | <drop>3.2</drop> | |
3f3a3ba0 | 377 | </index> |
6a488035 | 378 | <field> |
29e8791c EM |
379 | <name>result</name> |
380 | <uniqueName>activity_result</uniqueName> | |
381 | <type>varchar</type> | |
382 | <title>Result</title> | |
383 | <length>255</length> | |
384 | <comment>Currently being used to store result id for survey activity, FK to option value.</comment> | |
29e8791c EM |
385 | <add>3.3</add> |
386 | </field> | |
387 | <field> | |
388 | <name>is_deleted</name> | |
389 | <uniqueName>activity_is_deleted</uniqueName> | |
390 | <title>Activity is in the Trash</title> | |
391 | <type>boolean</type> | |
392 | <default>0</default> | |
393 | <import>true</import> | |
394 | <headerPattern>/(activity.)?(trash|deleted)/i</headerPattern> | |
395 | <add>2.2</add> | |
396 | <html> | |
3542118f | 397 | <type>CheckBox</type> |
29e8791c | 398 | </html> |
6a488035 TO |
399 | </field> |
400 | <index> | |
29e8791c EM |
401 | <name>index_is_deleted</name> |
402 | <fieldName>is_deleted</fieldName> | |
403 | <add>2.2</add> | |
6a488035 | 404 | </index> |
3f3a3ba0 | 405 | <field> |
29e8791c EM |
406 | <name>campaign_id</name> |
407 | <uniqueName>activity_campaign_id</uniqueName> | |
408 | <type>int unsigned</type> | |
409 | <title>Campaign</title> | |
410 | <import>true</import> | |
411 | <comment>The campaign for which this activity has been triggered.</comment> | |
412 | <pseudoconstant> | |
413 | <table>civicrm_campaign</table> | |
414 | <keyColumn>id</keyColumn> | |
415 | <labelColumn>title</labelColumn> | |
416 | </pseudoconstant> | |
417 | <add>3.4</add> | |
418 | <html> | |
3542118f | 419 | <type>Select</type> |
29e8791c | 420 | </html> |
6a488035 | 421 | </field> |
3f3a3ba0 | 422 | <foreignKey> |
29e8791c EM |
423 | <name>campaign_id</name> |
424 | <table>civicrm_campaign</table> | |
425 | <key>id</key> | |
426 | <onDelete>SET NULL</onDelete> | |
6a488035 | 427 | </foreignKey> |
3f3a3ba0 | 428 | <field> |
29e8791c EM |
429 | <name>engagement_level</name> |
430 | <uniqueName>activity_engagement_level</uniqueName> | |
431 | <type>int unsigned</type> | |
432 | <title>Engagement Index</title> | |
433 | <import>true</import> | |
434 | <comment>Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.</comment> | |
435 | <pseudoconstant> | |
436 | <optionGroupName>engagement_index</optionGroupName> | |
437 | </pseudoconstant> | |
438 | <html> | |
439 | <type>Select</type> | |
440 | </html> | |
441 | <add>3.4</add> | |
442 | </field> | |
443 | <field> | |
444 | <name>weight</name> | |
7ecddde4 | 445 | <title>Order</title> |
29e8791c EM |
446 | <type>int</type> |
447 | <add>4.1</add> | |
6a488035 | 448 | </field> |
cd063b10 CW |
449 | <field> |
450 | <name>is_star</name> | |
451 | <title>Is Starred</title> | |
452 | <type>boolean</type> | |
453 | <default>0</default> | |
454 | <import>true</import> | |
455 | <comment>Activity marked as favorite.</comment> | |
456 | <headerPattern>/(activity.)?(star|favorite)/i</headerPattern> | |
457 | <add>4.7</add> | |
3542118f CW |
458 | <html> |
459 | <type>Checkbox</type> | |
460 | </html> | |
cd063b10 | 461 | </field> |
3ed77291 TO |
462 | <field> |
463 | <name>created_date</name> | |
464 | <uniqueName>activity_created_date</uniqueName> | |
465 | <type>timestamp</type> | |
466 | <comment>When was the activity was created.</comment> | |
467 | <required>false</required> | |
468 | <export>true</export> | |
469 | <default>NULL</default> | |
470 | <add>4.7</add> | |
471 | </field> | |
472 | <field> | |
473 | <name>modified_date</name> | |
474 | <uniqueName>activity_modified_date</uniqueName> | |
475 | <type>timestamp</type> | |
476 | <comment>When was the activity (or closely related entity) was created or modified or deleted.</comment> | |
477 | <required>false</required> | |
478 | <export>true</export> | |
479 | <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default> | |
480 | <add>4.7</add> | |
481 | </field> | |
6a488035 | 482 | </table> |