civicrm_contribution


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id INT UNSIGNED 10 null
civicrm_contribution_product.contribution_id FK_civicrm_contribution_product_contribution_id C
civicrm_contribution_soft.contribution_id FK_civicrm_contribution_soft_contribution_id C
civicrm_line_item.contribution_id FK_civicrm_line_item_contribution_id N
civicrm_membership_payment.contribution_id FK_civicrm_membership_payment_contribution_id C
civicrm_participant_payment.contribution_id FK_civicrm_participant_payment_contribution_id C
civicrm_pledge_payment.contribution_id FK_civicrm_pledge_payment_contribution_id C

Contribution ID

contact_id INT UNSIGNED 10 null
civicrm_contact.id FK_civicrm_contribution_contact_id C

FK to Contact ID

financial_type_id INT UNSIGNED 10 null
civicrm_financial_type.id FK_civicrm_contribution_financial_type_id R

FK to Financial Type for (total_amount - non_deductible_amount).

contribution_page_id INT UNSIGNED 10 null
civicrm_contribution_page.id FK_civicrm_contribution_contribution_page_id N

The Contribution Page which triggered this contribution

payment_instrument_id INT UNSIGNED 10 null

FK to Payment Instrument

receive_date DATETIME 19 null

when was gift received

non_deductible_amount DECIMAL 20,2 0.00

Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.

total_amount DECIMAL 20,2 null

Total amount of this contribution. Use market value for non-monetary gifts.

fee_amount DECIMAL 20,2 null

actual processor fee if known - may be 0.

net_amount DECIMAL 20,2 null

actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.

trxn_id VARCHAR 255 null

unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method

invoice_id VARCHAR 255 null

unique invoice id, system generated or passed in

currency VARCHAR 3 null

3 character string, value from config setting or input via user.

cancel_date DATETIME 19 null

when was gift cancelled

cancel_reason TEXT 65535 null
receipt_date DATETIME 19 null

when (if) receipt was sent. populated automatically for online donations w/ automatic receipting

thankyou_date DATETIME 19 null

when (if) was donor thanked

source VARCHAR 255 null

Origin of this Contribution.

amount_level TEXT 65535 null
contribution_recur_id INT UNSIGNED 10 null
civicrm_contribution_recur.id FK_civicrm_contribution_contribution_recur_id N

Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.

is_test TINYINT 3 0
is_pay_later TINYINT 3 0
contribution_status_id INT UNSIGNED 10 1
address_id INT UNSIGNED 10 null
civicrm_address.id FK_civicrm_contribution_address_id N

Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.

check_number VARCHAR 255 null
campaign_id INT UNSIGNED 10 null
civicrm_campaign.id FK_civicrm_contribution_campaign_id N

The campaign for which this contribution has been triggered.

tax_amount DECIMAL 20,2 null

Total tax amount of this contribution.

creditnote_id VARCHAR 255 null

unique credit note id, system generated or passed in

revenue_recognition_date DATETIME 19 null

Stores the date when revenue should be recognized.

invoice_number VARCHAR 255 null

Human readable invoice number

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
check_number Performance Asc check_number
FK_civicrm_contribution_address_id Performance Asc address_id
FK_civicrm_contribution_campaign_id Performance Asc campaign_id
FK_civicrm_contribution_contact_id Performance Asc contact_id
FK_civicrm_contribution_contribution_page_id Performance Asc contribution_page_id
FK_civicrm_contribution_contribution_recur_id Performance Asc contribution_recur_id
FK_civicrm_contribution_financial_type_id Performance Asc financial_type_id
index_contribution_status Performance Asc contribution_status_id
index_creditnote_id Performance Asc creditnote_id
index_source Performance Asc source
index_total_amount_receive_date Performance Asc/Asc total_amount + receive_date
received_date Performance Asc receive_date
UI_contrib_invoice_id Must be unique Asc invoice_id
UI_contrib_payment_instrument_id Performance Asc payment_instrument_id
UI_contrib_trxn_id Must be unique Asc trxn_id

Relationships