commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / xml / schema / Contribute / ContributionRecur.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Contribute</base>
4 <class>ContributionRecur</class>
5 <name>civicrm_contribution_recur</name>
6 <add>1.6</add>
7 <log>true</log>
8 <field>
9 <name>id</name>
10 <title>Recurring Contribution ID</title>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Contribution Recur ID</comment>
14 <add>1.6</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20 <field>
21 <name>contact_id</name>
22 <title>Contact ID</title>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>Foreign key to civicrm_contact.id .</comment>
26 <add>1.6</add>
27 </field>
28 <foreignKey>
29 <name>contact_id</name>
30 <table>civicrm_contact</table>
31 <key>id</key>
32 <add>1.6</add>
33 <onDelete>CASCADE</onDelete>
34 </foreignKey>
35 <field>
36 <name>amount</name>
37 <title>Amount</title>
38 <type>decimal</type>
39 <required>true</required>
40 <comment>Amount to be contributed or charged each recurrence.</comment>
41 <add>1.6</add>
42 </field>
43 <field>
44 <name>currency</name>
45 <title>Currency</title>
46 <type>varchar</type>
47 <length>3</length>
48 <default>NULL</default>
49 <comment>3 character string, value from config setting or input via user.</comment>
50 <add>3.2</add>
51 <pseudoconstant>
52 <table>civicrm_currency</table>
53 <keyColumn>name</keyColumn>
54 <labelColumn>full_name</labelColumn>
55 <nameColumn>numeric_code</nameColumn>
56 </pseudoconstant>
57 <html>
58 <type>Select</type>
59 </html>
60 </field>
61 <field>
62 <name>frequency_unit</name>
63 <title>Frequency Unit</title>
64 <type>varchar</type>
65 <length>8</length>
66 <default>'month'</default>
67 <comment>Time units for recurrence of payment.</comment>
68 <pseudoconstant>
69 <optionGroupName>recur_frequency_units</optionGroupName>
70 <keyColumn>name</keyColumn>
71 </pseudoconstant>
72 <add>1.6</add>
73 <html>
74 <type>Select</type>
75 </html>
76 </field>
77 <field>
78 <name>frequency_interval</name>
79 <title>Interval (number of units)</title>
80 <type>int unsigned</type>
81 <required>true</required>
82 <comment>Number of time units for recurrence of payment.</comment>
83 <add>1.6</add>
84 </field>
85 <field>
86 <name>installments</name>
87 <title>Number of Installments</title>
88 <type>int unsigned</type>
89 <comment>Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.</comment>
90 <add>1.6</add>
91 </field>
92 <field>
93 <name>start_date</name>
94 <title>Recurring Contribution Started Date</title>
95 <type>datetime</type>
96 <required>true</required>
97 <comment>The date the first scheduled recurring contribution occurs.</comment>
98 <add>1.6</add>
99 </field>
100 <field>
101 <name>create_date</name>
102 <title>Recurring Contribution Created Date</title>
103 <type>datetime</type>
104 <required>true</required>
105 <comment>When this recurring contribution record was created.</comment>
106 <add>1.6</add>
107 </field>
108 <field>
109 <name>modified_date</name>
110 <title>Recurring Contribution Modified Date</title>
111 <type>datetime</type>
112 <comment>Last updated date for this record. mostly the last time a payment was received</comment>
113 <add>1.6</add>
114 </field>
115 <field>
116 <name>cancel_date</name>
117 <title>Recurring Contribution Cancel Date</title>
118 <type>datetime</type>
119 <comment>Date this recurring contribution was cancelled by contributor- if we can get access to it</comment>
120 <add>1.6</add>
121 </field>
122 <field>
123 <name>end_date</name>
124 <title>Recurring Contribution End Date</title>
125 <type>datetime</type>
126 <comment>Date this recurring contribution finished successfully</comment>
127 <add>1.6</add>
128 </field>
129 <field>
130 <name>processor_id</name>
131 <title>Processor ID</title>
132 <type>varchar</type>
133 <length>255</length>
134 <comment>Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??</comment>
135 <add>1.6</add>
136 </field>
137 <field>
138 <name>payment_token_id</name>
139 <title>Payment Token ID</title>
140 <type>int unsigned</type>
141 <comment>Optionally used to store a link to a payment token used for this recurring contribution.</comment>
142 <add>4.6</add>
143 </field>
144 <foreignKey>
145 <name>payment_token_id</name>
146 <table>civicrm_payment_token</table>
147 <key>id</key>
148 <add>4.6</add>
149 <onDelete>SET NULL</onDelete>
150 </foreignKey>
151 <field>
152 <name>trxn_id</name>
153 <title>Transaction ID</title>
154 <type>varchar</type>
155 <length>255</length>
156 <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method</comment>
157 <add>1.6</add>
158 </field>
159 <field>
160 <name>invoice_id</name>
161 <title>Invoice ID</title>
162 <type>varchar</type>
163 <length>255</length>
164 <comment>unique invoice id, system generated or passed in</comment>
165 <add>1.6</add>
166 </field>
167 <index>
168 <name>UI_contrib_trxn_id</name>
169 <fieldName>trxn_id</fieldName>
170 <unique>true</unique>
171 <add>2.1</add>
172 </index>
173 <index>
174 <name>UI_contrib_invoice_id</name>
175 <fieldName>invoice_id</fieldName>
176 <unique>true</unique>
177 <add>2.1</add>
178 </index>
179 <field>
180 <name>contribution_status_id</name>
181 <title>Recurring Contribution Status</title>
182 <type>int unsigned</type>
183 <default>1</default>
184 <import>true</import>
185 <add>1.6</add>
186 <pseudoconstant>
187 <optionGroupName>contribution_status</optionGroupName>
188 </pseudoconstant>
189 </field>
190 <index>
191 <name>index_contribution_status</name>
192 <fieldName>contribution_status_id</fieldName>
193 <add>1.6</add>
194 </index>
195 <field>
196 <name>is_test</name>
197 <title>Test</title>
198 <type>boolean</type>
199 <default>0</default>
200 <import>true</import>
201 </field>
202 <field>
203 <name>cycle_day</name>
204 <title>Number of Cycle Day</title>
205 <type>int unsigned</type>
206 <default>1</default>
207 <required>true</required>
208 <comment>Day in the period when the payment should be charged e.g. 1st of month, 15th etc.</comment>
209 <add>1.6</add>
210 </field>
211 <field>
212 <name>next_sched_contribution</name>
213 <type>datetime</type>
214 <comment>At Groundspring this was used by the cron job which triggered payments. If we''re not doing that but we know about payments, it might still be useful to store for display to org andor contributors.</comment>
215 <add>1.6</add>
216 <drop>4.4</drop>
217 </field>
218 <field>
219 <name>next_sched_contribution_date</name>
220 <title>Next Scheduled Contribution Date</title>
221 <type>datetime</type>
222 <comment>Next scheduled date</comment>
223 <add>4.4</add>
224 </field>
225 <field>
226 <name>failure_count</name>
227 <title>Number of Failures</title>
228 <type>int unsigned</type>
229 <default>0</default>
230 <comment>Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.</comment>
231 <add>1.6</add>
232 </field>
233 <field>
234 <name>failure_retry_date</name>
235 <type>datetime</type>
236 <title>Retry Failed Attempt Date</title>
237 <comment>Date to retry failed attempt</comment>
238 <add>1.6</add>
239 </field>
240 <field>
241 <name>auto_renew</name>
242 <title>Auto Renew</title>
243 <type>boolean</type>
244 <required>true</required>
245 <default>0</default>
246 <comment>Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.</comment>
247 <add>1.6</add>
248 </field>
249 <field>
250 <name>payment_processor_id</name>
251 <title>Payment Processor</title>
252 <type>int unsigned</type>
253 <comment>Foreign key to civicrm_payment_processor.id</comment>
254 <add>3.3</add>
255 </field>
256 <foreignKey>
257 <name>payment_processor_id</name>
258 <table>civicrm_payment_processor</table>
259 <key>id</key>
260 <add>3.3</add>
261 <onDelete>SET NULL</onDelete>
262 </foreignKey>
263 <field>
264 <name>contribution_type_id</name>
265 <title>Contribution Type</title>
266 <export>false</export>
267 <type>int unsigned</type>
268 <comment>FK to Contribution Type</comment>
269 <add>4.1</add>
270 <drop>4.3</drop>
271 </field>
272 <foreignKey>
273 <name>contribution_type_id</name>
274 <table>civicrm_contribution_type</table>
275 <key>id</key>
276 <add>4.1</add>
277 <drop>4.3</drop>
278 <onDelete>SET NULL</onDelete>
279 </foreignKey>
280 <field>
281 <name>financial_type_id</name>
282 <title>Financial Type</title>
283 <export>false</export>
284 <type>int unsigned</type>
285 <comment>FK to Financial Type</comment>
286 <add>4.3</add>
287 <pseudoconstant>
288 <table>civicrm_financial_type</table>
289 <keyColumn>id</keyColumn>
290 <labelColumn>name</labelColumn>
291 </pseudoconstant>
292 </field>
293 <foreignKey>
294 <name>financial_type_id</name>
295 <table>civicrm_financial_type</table>
296 <key>id</key>
297 <add>4.3</add>
298 <onDelete>SET NULL</onDelete>
299 </foreignKey>
300 <field>
301 <name>payment_instrument_id</name>
302 <title>Payment Instrument</title>
303 <type>int unsigned</type>
304 <comment>FK to Payment Instrument</comment>
305 <pseudoconstant>
306 <optionGroupName>payment_instrument</optionGroupName>
307 </pseudoconstant>
308 <html>
309 <type>Select</type>
310 </html>
311 <add>4.1</add>
312 </field>
313 <index>
314 <name>UI_contribution_recur_payment_instrument_id</name>
315 <fieldName>payment_instrument_id</fieldName>
316 <add>4.1</add>
317 </index>
318 <field>
319 <name>campaign_id</name>
320 <uniqueName>contribution_campaign_id</uniqueName>
321 <type>int unsigned</type>
322 <title>Campaign</title>
323 <import>true</import>
324 <comment>The campaign for which this contribution has been triggered.</comment>
325 <pseudoconstant>
326 <table>civicrm_campaign</table>
327 <keyColumn>id</keyColumn>
328 <labelColumn>title</labelColumn>
329 </pseudoconstant>
330 <add>4.1</add>
331 </field>
332 <foreignKey>
333 <name>campaign_id</name>
334 <table>civicrm_campaign</table>
335 <key>id</key>
336 <onDelete>SET NULL</onDelete>
337 </foreignKey>
338 <field>
339 <name>is_email_receipt</name>
340 <title>Send email Receipt?</title>
341 <type>boolean</type>
342 <comment>if true, receipt is automatically emailed to contact on each successful payment</comment>
343 <default>1</default>
344 <add>4.1</add>
345 </field>
346 </table>