civicrm_activity


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id INT UNSIGNED 10 null
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

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 LONGTEXT 2147483647 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
is_star TINYINT 3 0

Activity marked as favorite.

created_date TIMESTAMP 19 null

When was the activity was created.

modified_date TIMESTAMP 19 CURRENT_TIMESTAMP

When was the activity (or closely related entity) was created or modified or deleted.

Table contained 0 rows

Indexes

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

Relationships