1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Member
</base>
5 <class>Membership
</class>
6 <name>civicrm_membership
</name>
7 <comment>Contact Membership records.
</comment>
12 <uniqueName>membership_id
</uniqueName>
13 <type>int unsigned
</type>
14 <required>true
</required>
16 <title>Membership ID
</title>
17 <headerPattern>/^(m(embership\s)?id)$/i
</headerPattern>
18 <comment>Membership Id
</comment>
23 <autoincrement>true
</autoincrement>
27 <name>contact_id
</name>
28 <uniqueName>membership_contact_id
</uniqueName>
29 <type>int unsigned
</type>
30 <required>true
</required>
31 <title>Contact ID
</title>
32 <headerPattern>/contact(.?id)?/i
</headerPattern>
33 <dataPattern>/^\d+$/
</dataPattern>
35 <comment>FK to Contact ID
</comment>
39 <name>contact_id
</name>
40 <table>civicrm_contact
</table>
43 <onDelete>CASCADE
</onDelete>
46 <name>membership_type_id
</name>
47 <type>int unsigned
</type>
48 <title>Membership Type Id
</title>
50 <headerPattern>/^(m(embership\s)?type)$/i
</headerPattern>
51 <export>false
</export>
52 <required>true
</required>
53 <comment>FK to Membership Type
</comment>
57 <name>membership_type_id
</name>
58 <table>civicrm_membership_type
</table>
61 <onDelete>CASCADE
</onDelete>
64 <name>join_date
</name>
65 <title>Member Since
</title>
68 <headerPattern>/^join|(j(oin\s)?date)$/i
</headerPattern>
69 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
70 <comment>Beginning of initial membership period (member since...).
</comment>
74 <name>start_date
</name>
75 <uniqueName>membership_start_date
</uniqueName>
76 <title>Membership Start Date
</title>
79 <headerPattern>/(member(ship)?.)?start(s)?(.date$)?/i
</headerPattern>
80 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
81 <comment>Beginning of current uninterrupted membership period.
</comment>
86 <uniqueName>membership_end_date
</uniqueName>
87 <title>Membership Expiration Date
</title>
90 <headerPattern>/(member(ship)?.)?end(s)?(.date$)?/i
</headerPattern>
91 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
92 <comment>Current membership period expire date.
</comment>
97 <uniqueName>membership_source
</uniqueName>
100 <headerPattern>/^(member(ship?))?source$/i
</headerPattern>
106 <name>status_id
</name>
107 <title>Membership Status Id
</title>
108 <import>true
</import>
109 <headerPattern>/(member(ship|).)?(status)$/i
</headerPattern>
110 <type>int unsigned
</type>
111 <export>false
</export>
112 <required>true
</required>
113 <comment>FK to Membership Status
</comment>
117 <name>status_id
</name>
118 <table>civicrm_membership_status
</table>
121 <onDelete>CASCADE
</onDelete>
124 <name>is_override
</name>
125 <title>Status Override
</title>
126 <import>true
</import>
127 <headerPattern>/override$/i
</headerPattern>
129 <comment>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.
</comment>
133 <name>owner_membership_id
</name>
134 <type>int unsigned
</type>
135 <title>Primary Member ID
</title>
136 <comment>Optional FK to Parent Membership.
</comment>
137 <export>true
</export>
141 <name>owner_membership_id
</name>
142 <table>civicrm_membership
</table>
145 <onDelete>SET NULL
</onDelete>
148 <name>index_owner_membership_id
</name>
149 <fieldName>owner_membership_id
</fieldName>
153 <name>max_related
</name>
155 <comment>Maximum number of related memberships (membership_type override).
</comment>
161 <uniqueName>member_is_test
</uniqueName>
164 <import>true
</import>
165 <headerPattern>/(is.)?test(.member(ship)?)?/i
</headerPattern>
168 <name>is_pay_later
</name>
169 <uniqueName>member_is_pay_later
</uniqueName>
170 <title>Is Pay Later
</title>
173 <import>true
</import>
174 <headerPattern>/(is.)?(pay(.)?later)$/i
</headerPattern>
178 <name>contribution_recur_id
</name>
179 <type>int unsigned
</type>
180 <comment>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.
</comment>
184 <name>contribution_recur_id
</name>
185 <table>civicrm_contribution_recur
</table>
188 <onDelete>SET NULL
</onDelete>
191 <name>campaign_id
</name>
192 <uniqueName>member_campaign_id
</uniqueName>
193 <type>int unsigned
</type>
194 <title>Campaign ID
</title>
195 <import>true
</import>
196 <comment>The campaign for which this membership is attached.
</comment>
200 <name>campaign_id
</name>
201 <table>civicrm_campaign
</table>
203 <onDelete>SET NULL
</onDelete>