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>
55 <table>civicrm_membership_type
</table>
56 <keyColumn>id
</keyColumn>
57 <labelColumn>label
</labelColumn>
62 <name>membership_type_id
</name>
63 <table>civicrm_membership_type
</table>
66 <onDelete>CASCADE
</onDelete>
69 <name>join_date
</name>
70 <title>Member Since
</title>
73 <headerPattern>/^join|(j(oin\s)?date)$/i
</headerPattern>
74 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
75 <comment>Beginning of initial membership period (member since...).
</comment>
79 <name>start_date
</name>
80 <uniqueName>membership_start_date
</uniqueName>
81 <title>Membership Start Date
</title>
84 <headerPattern>/(member(ship)?.)?start(s)?(.date$)?/i
</headerPattern>
85 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
86 <comment>Beginning of current uninterrupted membership period.
</comment>
91 <uniqueName>membership_end_date
</uniqueName>
92 <title>Membership Expiration Date
</title>
95 <headerPattern>/(member(ship)?.)?end(s)?(.date$)?/i
</headerPattern>
96 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
97 <comment>Current membership period expire date.
</comment>
102 <uniqueName>membership_source
</uniqueName>
103 <title>Source
</title>
104 <import>true
</import>
105 <headerPattern>/^(member(ship?))?source$/i
</headerPattern>
111 <name>status_id
</name>
112 <title>Membership Status Id
</title>
113 <import>true
</import>
114 <headerPattern>/(member(ship|).)?(status)$/i
</headerPattern>
115 <type>int unsigned
</type>
116 <export>false
</export>
117 <required>true
</required>
118 <comment>FK to Membership Status
</comment>
120 <table>civicrm_membership_status
</table>
121 <keyColumn>id
</keyColumn>
122 <labelColumn>label
</labelColumn>
127 <name>status_id
</name>
128 <table>civicrm_membership_status
</table>
131 <onDelete>CASCADE
</onDelete>
134 <name>is_override
</name>
135 <title>Status Override
</title>
136 <import>true
</import>
137 <headerPattern>/override$/i
</headerPattern>
139 <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>
143 <name>owner_membership_id
</name>
144 <type>int unsigned
</type>
145 <title>Primary Member ID
</title>
146 <comment>Optional FK to Parent Membership.
</comment>
147 <export>true
</export>
151 <name>owner_membership_id
</name>
152 <table>civicrm_membership
</table>
155 <onDelete>SET NULL
</onDelete>
158 <name>index_owner_membership_id
</name>
159 <fieldName>owner_membership_id
</fieldName>
163 <name>max_related
</name>
165 <comment>Maximum number of related memberships (membership_type override).
</comment>
171 <uniqueName>member_is_test
</uniqueName>
174 <import>true
</import>
175 <headerPattern>/(is.)?test(.member(ship)?)?/i
</headerPattern>
178 <name>is_pay_later
</name>
179 <uniqueName>member_is_pay_later
</uniqueName>
180 <title>Is Pay Later
</title>
183 <import>true
</import>
184 <headerPattern>/(is.)?(pay(.)?later)$/i
</headerPattern>
188 <name>contribution_recur_id
</name>
189 <type>int unsigned
</type>
190 <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>
194 <name>contribution_recur_id
</name>
195 <table>civicrm_contribution_recur
</table>
198 <onDelete>SET NULL
</onDelete>
201 <name>campaign_id
</name>
202 <uniqueName>member_campaign_id
</uniqueName>
203 <type>int unsigned
</type>
204 <title>Campaign ID
</title>
205 <import>true
</import>
206 <comment>The campaign for which this membership is attached.
</comment>
210 <name>campaign_id
</name>
211 <table>civicrm_campaign
</table>
213 <onDelete>SET NULL
</onDelete>