Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | INT UNSIGNED | 10 | √ | null |
|
|
Membership Id |
|||||||
contact_id | INT UNSIGNED | 10 | null |
|
|
FK to Contact ID |
||||||||
membership_type_id | INT UNSIGNED | 10 | null |
|
|
FK to Membership Type |
||||||||
join_date | DATE | 10 | √ | null |
|
|
Beginning of initial membership period (member since…). |
|||||||
start_date | DATE | 10 | √ | null |
|
|
Beginning of current uninterrupted membership period. |
|||||||
end_date | DATE | 10 | √ | null |
|
|
Current membership period expire date. |
|||||||
source | VARCHAR | 128 | √ | null |
|
|
||||||||
status_id | INT UNSIGNED | 10 | null |
|
|
FK to Membership Status |
||||||||
is_override | TINYINT | 3 | √ | null |
|
|
Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record. |
|||||||
owner_membership_id | INT UNSIGNED | 10 | √ | null |
|
|
Optional FK to Parent Membership. |
|||||||
INT | 10 | √ | null |
|
|
Maximum number of related memberships (membership_type override). |
||||||||
is_test | TINYINT | 3 | √ | 0 |
|
|
||||||||
is_pay_later | TINYINT | 3 | √ | 0 |
|
|
||||||||
contribution_recur_id | INT UNSIGNED | 10 | √ | null |
|
|
Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events. |
|||||||
campaign_id | INT UNSIGNED | 10 | √ | null |
|
|
The campaign for which this membership is attached. |
|||||||
status_override_end_date | DATE | 10 | √ | null |
|
|
The end date of membership status override if (Override until selected date) override type is selected. |
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
PRIMARY | Primary key | Asc | id |
FK_civicrm_membership_campaign_id | Performance | Asc | campaign_id |
FK_civicrm_membership_contact_id | Performance | Asc | contact_id |
FK_civicrm_membership_contribution_recur_id | Performance | Asc | contribution_recur_id |
FK_civicrm_membership_membership_type_id | Performance | Asc | membership_type_id |
FK_civicrm_membership_status_id | Performance | Asc | status_id |
index_owner_membership_id | Performance | Asc | owner_membership_id |