Table d47civi_0z3xa.civicrm_contribution_recur 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_contribution.contribution_recur_id FK_civicrm_contribution_contribution_recur_id N
civicrm_membership.contribution_recur_id FK_civicrm_membership_contribution_recur_id N
Contribution Recur ID
contact_id int unsigned 10
civicrm_contact.id FK_civicrm_contribution_recur_contact_id C
Foreign key to civicrm_contact.id .
amount decimal 20,2 Amount to be contributed or charged each recurrence.
currency varchar 3  √  null 3 character string, value from config setting or input via user.
frequency_unit varchar 8  √  month Time units for recurrence of payment.
frequency_interval int unsigned 10 Number of time units for recurrence of payment.
installments int unsigned 10  √  null Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.
start_date datetime 19 The date the first scheduled recurring contribution occurs.
create_date datetime 19 When this recurring contribution record was created.
modified_date datetime 19  √  null Last updated date for this record. mostly the last time a payment was received
cancel_date datetime 19  √  null Date this recurring contribution was cancelled by contributor- if we can get access to it
end_date datetime 19  √  null Date this recurring contribution finished successfully
processor_id varchar 255  √  null Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??
payment_token_id int unsigned 10  √  null
civicrm_payment_token.id FK_civicrm_contribution_recur_payment_token_id N
Optionally used to store a link to a payment token used for this recurring contribution.
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
contribution_status_id int unsigned 10  √  1
is_test tinyint 3  √  0
cycle_day int unsigned 10 1 Day in the period when the payment should be charged e.g. 1st of month, 15th etc.
next_sched_contribution_date datetime 19  √  null Next scheduled date
failure_count int unsigned 10  √  0 Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.
failure_retry_date datetime 19  √  null Date to retry failed attempt
auto_renew tinyint 3 0 Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.
payment_processor_id int unsigned 10  √  null
civicrm_payment_processor.id FK_civicrm_contribution_recur_payment_processor_id N
Foreign key to civicrm_payment_processor.id
financial_type_id int unsigned 10  √  null
civicrm_financial_type.id FK_civicrm_contribution_recur_financial_type_id N
FK to Financial Type
payment_instrument_id int unsigned 10  √  null FK to Payment Instrument
campaign_id int unsigned 10  √  null
civicrm_campaign.id FK_civicrm_contribution_recur_campaign_id N
The campaign for which this contribution has been triggered.
is_email_receipt tinyint 3  √  1 if true, receipt is automatically emailed to contact on each successful payment

Table contained 0 rows at mer. avr. 13 16:52 EDT 2016

Indexes:
Column(s) Type Sort Constraint Name Anomalies
id Primary key Asc PRIMARY  
campaign_id Performance Asc FK_civicrm_contribution_recur_campaign_id  
contact_id Performance Asc FK_civicrm_contribution_recur_contact_id  
financial_type_id Performance Asc FK_civicrm_contribution_recur_financial_type_id  
payment_processor_id Performance Asc FK_civicrm_contribution_recur_payment_processor_id  
payment_token_id Performance Asc FK_civicrm_contribution_recur_payment_token_id  
contribution_status_id Performance Asc index_contribution_status  
invoice_id Must be unique Asc UI_contrib_invoice_id This unique column is also nullable
trxn_id Must be unique Asc UI_contrib_trxn_id This unique column is also nullable
payment_instrument_id Performance Asc UI_contribution_recur_payment_instrument_id  

Close relationships  within of separation: