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