Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | INT UNSIGNED | 10 | √ | null |
|
|
Unique Contact ID |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contact_type | VARCHAR | 64 | √ | null |
|
|
Type of Contact. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contact_sub_type | VARCHAR | 255 | √ | null |
|
|
May be used to over-ride contact view and edit templates. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do_not_email | TINYINT | 3 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do_not_phone | TINYINT | 3 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do_not_mail | TINYINT | 3 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do_not_sms | TINYINT | 3 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| do_not_trade | TINYINT | 3 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_opt_out | TINYINT | 3 | 0 |
|
|
Has the contact opted out from receiving all bulk email from the organization or site domain? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| legal_identifier | VARCHAR | 32 | √ | null |
|
|
May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| external_identifier | VARCHAR | 64 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sort_name | VARCHAR | 128 | √ | null |
|
|
Name used for sorting different contact types |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| display_name | VARCHAR | 128 | √ | null |
|
|
Formatted name representing preferred format for display/print/other output. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nick_name | VARCHAR | 128 | √ | null |
|
|
Nickname. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| legal_name | VARCHAR | 128 | √ | null |
|
|
Legal Name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image_URL | TEXT | 65535 | √ | null |
|
|
optional URL for preferred image (photo, logo, etc.) to display for this contact. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| preferred_communication_method | VARCHAR | 255 | √ | null |
|
|
What is the preferred mode of communication. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| preferred_language | VARCHAR | 5 | √ | null |
|
|
Which language is preferred for communication. FK to languages in civicrm_option_value. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| preferred_mail_format | VARCHAR | 8 | √ | Both |
|
|
What is the preferred mode of sending an email. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hash | VARCHAR | 32 | √ | null |
|
|
Key for validating requests related to this contact. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| api_key | VARCHAR | 32 | √ | null |
|
|
API Key for validating requests related to this contact. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| source | VARCHAR | 255 | √ | null |
|
|
where contact come from, e.g. import, donate module insert… |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| first_name | VARCHAR | 64 | √ | null |
|
|
First Name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| middle_name | VARCHAR | 64 | √ | null |
|
|
Middle Name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_name | VARCHAR | 64 | √ | null |
|
|
Last Name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prefix_id | INT UNSIGNED | 10 | √ | null |
|
|
Prefix or Title for name (Ms, Mr…). FK to prefix ID |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| suffix_id | INT UNSIGNED | 10 | √ | null |
|
|
Suffix for name (Jr, Sr…). FK to suffix ID |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| formal_title | VARCHAR | 64 | √ | null |
|
|
Formal (academic or similar) title in front of name. (Prof., Dr. etc.) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| communication_style_id | INT UNSIGNED | 10 | √ | null |
|
|
Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| email_greeting_id | INT UNSIGNED | 10 | √ | null |
|
|
FK to civicrm_option_value.id, that has to be valid registered Email Greeting. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| email_greeting_custom | VARCHAR | 128 | √ | null |
|
|
Custom Email Greeting. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| email_greeting_display | VARCHAR | 255 | √ | null |
|
|
Cache Email Greeting. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postal_greeting_id | INT UNSIGNED | 10 | √ | null |
|
|
FK to civicrm_option_value.id, that has to be valid registered Postal Greeting. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postal_greeting_custom | VARCHAR | 128 | √ | null |
|
|
Custom Postal greeting. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| postal_greeting_display | VARCHAR | 255 | √ | null |
|
|
Cache Postal greeting. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addressee_id | INT UNSIGNED | 10 | √ | null |
|
|
FK to civicrm_option_value.id, that has to be valid registered Addressee. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addressee_custom | VARCHAR | 128 | √ | null |
|
|
Custom Addressee. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| addressee_display | VARCHAR | 255 | √ | null |
|
|
Cache Addressee. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| job_title | VARCHAR | 255 | √ | null |
|
|
Job Title |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gender_id | INT UNSIGNED | 10 | √ | null |
|
|
FK to gender ID |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| birth_date | DATE | 10 | √ | null |
|
|
Date of birth |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_deceased | TINYINT | 3 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| deceased_date | DATE | 10 | √ | null |
|
|
Date of deceased |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| household_name | VARCHAR | 128 | √ | null |
|
|
Household Name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| primary_contact_id | INT UNSIGNED | 10 | √ | null |
|
|
Optional FK to Primary Contact for this household. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| organization_name | VARCHAR | 128 | √ | null |
|
|
Organization Name. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sic_code | VARCHAR | 8 | √ | null |
|
|
Standard Industry Classification Code. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| user_unique_id | VARCHAR | 255 | √ | null |
|
|
the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| employer_id | INT UNSIGNED | 10 | √ | null |
|
|
OPTIONAL FK to civicrm_contact record. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| is_deleted | TINYINT | 3 | 0 |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| created_date | TIMESTAMP | 19 | √ | null |
|
|
When was the contact was created. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| modified_date | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
When was the contact (or closely related entity) was created or modified or deleted. |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| FK_civicrm_contact_employer_id | Performance | Asc | employer_id |
| FK_civicrm_contact_primary_contact_id | Performance | Asc | primary_contact_id |
| index_api_key | Performance | Asc | api_key |
| index_communication_style_id | Performance | Asc | communication_style_id |
| index_contact_sub_type | Performance | Asc | contact_sub_type |
| index_contact_type | Performance | Asc | contact_type |
| index_first_name | Performance | Asc | first_name |
| index_hash | Performance | Asc | hash |
| index_household_name | Performance | Asc | household_name |
| index_image_URL_128 | Performance | Asc | image_URL |
| index_is_deceased | Performance | Asc | is_deceased |
| index_is_deleted_sort_name | Performance | Asc/Asc/Asc | is_deleted + sort_name + id |
| index_last_name | Performance | Asc | last_name |
| index_organization_name | Performance | Asc | organization_name |
| index_preferred_communication_method | Performance | Asc | preferred_communication_method |
| index_sort_name | Performance | Asc | sort_name |
| UI_external_identifier | Must be unique | Asc | external_identifier |
| UI_gender | Performance | Asc | gender_id |
| UI_prefix | Performance | Asc | prefix_id |
| UI_suffix | Performance | Asc | suffix_id |

