Table d45civi_b72v5.civicrm_activity Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
id int unsigned 10  √ 
civicrm_activity.original_id FK_civicrm_activity_original_id C
civicrm_activity.parent_id FK_civicrm_activity_parent_id C
civicrm_activity_contact.activity_id FK_civicrm_activity_contact_activity_id C
civicrm_case_activity.activity_id FK_civicrm_case_activity_activity_id C
civicrm_value_civivolunteer_4.entity_id FK_civicrm_value_civivolunteer_4_entity_id C
civicrm_value_volunteer_commendation_6.entity_id FK_civicrm_value_volunteer_commenda_89009a1280120ff9 C
Unique Other Activity ID
source_record_id int unsigned 10  √  null 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.
activity_type_id int unsigned 10 1 FK to civicrm_option_value.id, that has to be valid, registered activity type.
subject varchar 255  √  null The subject/purpose/short description of the activity.
activity_date_time datetime 19  √  null Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.
duration int unsigned 10  √  null Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.
location varchar 255  √  null Location of the activity (optional, open text).
phone_id int unsigned 10  √  null
civicrm_phone.id FK_civicrm_activity_phone_id N
Phone ID of the number called (optional - used if an existing phone number is selected).
phone_number varchar 64  √  null Phone number in case the number does not exist in the civicrm_phone table.
details text 65535  √  null Details about the activity (agenda, notes, etc).
status_id int unsigned 10  √  null ID of the status this activity is currently in. Foreign key to civicrm_option_value.
priority_id int unsigned 10  √  null ID of the priority given to this activity. Foreign key to civicrm_option_value.
parent_id int unsigned 10  √  null
civicrm_activity.id FK_civicrm_activity_parent_id C
Parent meeting ID (if this is a follow-up item). This is not currently implemented
is_test tinyint 3  √  0
medium_id int unsigned 10  √  null Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.
is_auto tinyint 3  √  0
relationship_id int unsigned 10  √  null
civicrm_relationship.id FK_civicrm_activity_relationship_id N
FK to Relationship ID
is_current_revision tinyint 3  √  1
original_id int unsigned 10  √  null
civicrm_activity.id FK_civicrm_activity_original_id C
Activity ID of the first activity record in versioning chain.
result varchar 255  √  null Currently being used to store result id for survey activity, FK to option value.
is_deleted tinyint 3  √  0
campaign_id int unsigned 10  √  null
civicrm_campaign.id FK_civicrm_activity_campaign_id N
The campaign for which this activity has been triggered.
engagement_level int unsigned 10  √  null Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.
weight int 10  √  null

Table contained 623 rows at Wed Nov 11 17:12 EST 2015

Indexes:
Column(s) Type Sort Constraint Name
id Primary key Asc PRIMARY
campaign_id Performance Asc FK_civicrm_activity_campaign_id
original_id Performance Asc FK_civicrm_activity_original_id
parent_id Performance Asc FK_civicrm_activity_parent_id
phone_id Performance Asc FK_civicrm_activity_phone_id
relationship_id Performance Asc FK_civicrm_activity_relationship_id
is_current_revision Performance Asc index_is_current_revision
is_deleted Performance Asc index_is_deleted
medium_id Performance Asc index_medium_id
activity_type_id Performance Asc UI_activity_type_id
source_record_id Performance Asc UI_source_record_id

Close relationships  within of separation: