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