Commit | Line | Data |
---|---|---|
6a488035 TO |
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> | |
797b807e | 10 | <title>Recurring Contribution ID</title> |
6a488035 TO |
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> | |
797b807e | 22 | <title>Contact ID</title> |
6a488035 TO |
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> | |
797b807e | 37 | <title>Amount</title> |
6a488035 TO |
38 | <type>decimal</type> |
39 | <required>true</required> | |
40 | <comment>Amount to be contributed or charged each recurrence.</comment> | |
41 | <add>1.6</add> | |
0c6c47a5 | 42 | <html> |
43 | <type>Text</type> | |
44 | </html> | |
6a488035 TO |
45 | </field> |
46 | <field> | |
47 | <name>currency</name> | |
797b807e | 48 | <title>Currency</title> |
6a488035 TO |
49 | <type>varchar</type> |
50 | <length>3</length> | |
51 | <default>NULL</default> | |
52 | <comment>3 character string, value from config setting or input via user.</comment> | |
53 | <add>3.2</add> | |
bd44e0df AS |
54 | <pseudoconstant> |
55 | <table>civicrm_currency</table> | |
56 | <keyColumn>name</keyColumn> | |
a38a89fc | 57 | <labelColumn>full_name</labelColumn> |
c3de5c5a | 58 | <nameColumn>name</nameColumn> |
bd44e0df | 59 | </pseudoconstant> |
614d72ec | 60 | <html> |
e0991796 | 61 | <type>Select</type> |
614d72ec | 62 | </html> |
6a488035 TO |
63 | </field> |
64 | <field> | |
65 | <name>frequency_unit</name> | |
797b807e | 66 | <title>Frequency Unit</title> |
dc73c80d | 67 | <type>varchar</type> |
68 | <length>8</length> | |
6a488035 TO |
69 | <default>'month'</default> |
70 | <comment>Time units for recurrence of payment.</comment> | |
f80ce889 | 71 | <pseudoconstant> |
72 | <optionGroupName>recur_frequency_units</optionGroupName> | |
73 | <keyColumn>name</keyColumn> | |
74 | </pseudoconstant> | |
6a488035 | 75 | <add>1.6</add> |
614d72ec | 76 | <html> |
77 | <type>Select</type> | |
78 | </html> | |
6a488035 TO |
79 | </field> |
80 | <field> | |
81 | <name>frequency_interval</name> | |
797b807e | 82 | <title>Interval (number of units)</title> |
6a488035 TO |
83 | <type>int unsigned</type> |
84 | <required>true</required> | |
85 | <comment>Number of time units for recurrence of payment.</comment> | |
86 | <add>1.6</add> | |
0c6c47a5 | 87 | <html> |
88 | <type>Text</type> | |
89 | </html> | |
6a488035 TO |
90 | </field> |
91 | <field> | |
92 | <name>installments</name> | |
797b807e | 93 | <title>Number of Installments</title> |
6a488035 TO |
94 | <type>int unsigned</type> |
95 | <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> | |
96 | <add>1.6</add> | |
0c6c47a5 | 97 | <html> |
98 | <type>Text</type> | |
99 | </html> | |
6a488035 TO |
100 | </field> |
101 | <field> | |
102 | <name>start_date</name> | |
797b807e | 103 | <title>Recurring Contribution Started Date</title> |
6a488035 TO |
104 | <type>datetime</type> |
105 | <required>true</required> | |
106 | <comment>The date the first scheduled recurring contribution occurs.</comment> | |
107 | <add>1.6</add> | |
0c6c47a5 | 108 | <html> |
109 | <type>Select Date</type> | |
110 | </html> | |
6a488035 TO |
111 | </field> |
112 | <field> | |
113 | <name>create_date</name> | |
797b807e | 114 | <title>Recurring Contribution Created Date</title> |
6a488035 TO |
115 | <type>datetime</type> |
116 | <required>true</required> | |
117 | <comment>When this recurring contribution record was created.</comment> | |
118 | <add>1.6</add> | |
0c6c47a5 | 119 | <html> |
120 | <type>Select Date</type> | |
121 | </html> | |
6a488035 TO |
122 | </field> |
123 | <field> | |
124 | <name>modified_date</name> | |
797b807e | 125 | <title>Recurring Contribution Modified Date</title> |
6a488035 TO |
126 | <type>datetime</type> |
127 | <comment>Last updated date for this record. mostly the last time a payment was received</comment> | |
128 | <add>1.6</add> | |
0c6c47a5 | 129 | <html> |
130 | <type>Select Date</type> | |
131 | </html> | |
6a488035 TO |
132 | </field> |
133 | <field> | |
134 | <name>cancel_date</name> | |
797b807e | 135 | <title>Recurring Contribution Cancel Date</title> |
6a488035 TO |
136 | <type>datetime</type> |
137 | <comment>Date this recurring contribution was cancelled by contributor- if we can get access to it</comment> | |
138 | <add>1.6</add> | |
0c6c47a5 | 139 | <html> |
140 | <type>Select Date</type> | |
141 | </html> | |
6a488035 TO |
142 | </field> |
143 | <field> | |
144 | <name>end_date</name> | |
797b807e | 145 | <title>Recurring Contribution End Date</title> |
6a488035 TO |
146 | <type>datetime</type> |
147 | <comment>Date this recurring contribution finished successfully</comment> | |
148 | <add>1.6</add> | |
0c6c47a5 | 149 | <html> |
150 | <type>Select Date</type> | |
151 | </html> | |
6a488035 | 152 | </field> |
6d68a4cb | 153 | <field> |
6a488035 | 154 | <name>processor_id</name> |
799e1e59 | 155 | <title>Processor ID</title> |
6d68a4cb | 156 | <type>varchar</type> |
6a488035 | 157 | <length>255</length> |
6d68a4cb CW |
158 | <comment>Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??</comment> |
159 | <add>1.6</add> | |
160 | </field> | |
011293bb RT |
161 | <field> |
162 | <name>payment_token_id</name> | |
163 | <title>Payment Token ID</title> | |
164 | <type>int unsigned</type> | |
165 | <comment>Optionally used to store a link to a payment token used for this recurring contribution.</comment> | |
166 | <add>4.6</add> | |
167 | </field> | |
168 | <foreignKey> | |
169 | <name>payment_token_id</name> | |
170 | <table>civicrm_payment_token</table> | |
171 | <key>id</key> | |
172 | <add>4.6</add> | |
173 | <onDelete>SET NULL</onDelete> | |
174 | </foreignKey> | |
6d68a4cb CW |
175 | <field> |
176 | <name>trxn_id</name> | |
6a488035 | 177 | <title>Transaction ID</title> |
6d68a4cb CW |
178 | <type>varchar</type> |
179 | <length>255</length> | |
6a488035 | 180 | <comment>unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method</comment> |
6d68a4cb CW |
181 | <add>1.6</add> |
182 | </field> | |
183 | <field> | |
184 | <name>invoice_id</name> | |
6a488035 | 185 | <title>Invoice ID</title> |
6d68a4cb CW |
186 | <type>varchar</type> |
187 | <length>255</length> | |
6a488035 | 188 | <comment>unique invoice id, system generated or passed in</comment> |
6d68a4cb CW |
189 | <add>1.6</add> |
190 | </field> | |
6a488035 TO |
191 | <index> |
192 | <name>UI_contrib_trxn_id</name> | |
193 | <fieldName>trxn_id</fieldName> | |
194 | <unique>true</unique> | |
195 | <add>2.1</add> | |
196 | </index> | |
197 | <index> | |
198 | <name>UI_contrib_invoice_id</name> | |
199 | <fieldName>invoice_id</fieldName> | |
200 | <unique>true</unique> | |
201 | <add>2.1</add> | |
202 | </index> | |
203 | <field> | |
204 | <name>contribution_status_id</name> | |
205 | <title>Recurring Contribution Status</title> | |
206 | <type>int unsigned</type> | |
207 | <default>1</default> | |
208 | <import>true</import> | |
209 | <add>1.6</add> | |
f389e500 E |
210 | <pseudoconstant> |
211 | <optionGroupName>contribution_status</optionGroupName> | |
212 | </pseudoconstant> | |
6a488035 TO |
213 | </field> |
214 | <index> | |
215 | <name>index_contribution_status</name> | |
216 | <fieldName>contribution_status_id</fieldName> | |
217 | <add>1.6</add> | |
218 | </index> | |
6d68a4cb CW |
219 | <field> |
220 | <name>is_test</name> | |
6a488035 TO |
221 | <title>Test</title> |
222 | <type>boolean</type> | |
223 | <default>0</default> | |
224 | <import>true</import> | |
e15be85b | 225 | <html> |
226 | <type>CheckBox</type> | |
227 | </html> | |
6a488035 TO |
228 | </field> |
229 | <field> | |
230 | <name>cycle_day</name> | |
797b807e | 231 | <title>Number of Cycle Day</title> |
6a488035 TO |
232 | <type>int unsigned</type> |
233 | <default>1</default> | |
234 | <required>true</required> | |
235 | <comment>Day in the period when the payment should be charged e.g. 1st of month, 15th etc.</comment> | |
236 | <add>1.6</add> | |
e15be85b | 237 | <html> |
238 | <type>Text</type> | |
239 | </html> | |
6a488035 TO |
240 | </field> |
241 | <field> | |
242 | <name>next_sched_contribution</name> | |
243 | <type>datetime</type> | |
5beb1de0 | 244 | <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> |
6a488035 | 245 | <add>1.6</add> |
797b807e | 246 | <drop>4.4</drop> |
247 | </field> | |
248 | <field> | |
249 | <name>next_sched_contribution_date</name> | |
250 | <title>Next Scheduled Contribution Date</title> | |
251 | <type>datetime</type> | |
252 | <comment>Next scheduled date</comment> | |
253 | <add>4.4</add> | |
0c6c47a5 | 254 | <html> |
255 | <type>Select Date</type> | |
256 | </html> | |
6a488035 TO |
257 | </field> |
258 | <field> | |
259 | <name>failure_count</name> | |
797b807e | 260 | <title>Number of Failures</title> |
6a488035 TO |
261 | <type>int unsigned</type> |
262 | <default>0</default> | |
263 | <comment>Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.</comment> | |
264 | <add>1.6</add> | |
e15be85b | 265 | <html> |
266 | <type>Text</type> | |
267 | </html> | |
6a488035 TO |
268 | </field> |
269 | <field> | |
270 | <name>failure_retry_date</name> | |
271 | <type>datetime</type> | |
797b807e | 272 | <title>Retry Failed Attempt Date</title> |
273 | <comment>Date to retry failed attempt</comment> | |
6a488035 | 274 | <add>1.6</add> |
0c6c47a5 | 275 | <html> |
276 | <type>Select Date</type> | |
277 | </html> | |
6a488035 | 278 | </field> |
6d68a4cb | 279 | <field> |
6a488035 | 280 | <name>auto_renew</name> |
797b807e | 281 | <title>Auto Renew</title> |
6d68a4cb CW |
282 | <type>boolean</type> |
283 | <required>true</required> | |
6a488035 | 284 | <default>0</default> |
6d68a4cb CW |
285 | <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> |
286 | <add>1.6</add> | |
e15be85b | 287 | <html> |
288 | <type>CheckBox</type> | |
289 | </html> | |
6a488035 TO |
290 | </field> |
291 | <field> | |
292 | <name>payment_processor_id</name> | |
797b807e | 293 | <title>Payment Processor</title> |
6a488035 TO |
294 | <type>int unsigned</type> |
295 | <comment>Foreign key to civicrm_payment_processor.id</comment> | |
296 | <add>3.3</add> | |
297 | </field> | |
6d68a4cb CW |
298 | <foreignKey> |
299 | <name>payment_processor_id</name> | |
300 | <table>civicrm_payment_processor</table> | |
301 | <key>id</key> | |
302 | <add>3.3</add> | |
6a488035 TO |
303 | <onDelete>SET NULL</onDelete> |
304 | </foreignKey> | |
305 | <field> | |
306 | <name>contribution_type_id</name> | |
307 | <title>Contribution Type</title> | |
308 | <export>false</export> | |
309 | <type>int unsigned</type> | |
310 | <comment>FK to Contribution Type</comment> | |
311 | <add>4.1</add> | |
312 | <drop>4.3</drop> | |
313 | </field> | |
314 | <foreignKey> | |
315 | <name>contribution_type_id</name> | |
316 | <table>civicrm_contribution_type</table> | |
317 | <key>id</key> | |
318 | <add>4.1</add> | |
319 | <drop>4.3</drop> | |
320 | <onDelete>SET NULL</onDelete> | |
321 | </foreignKey> | |
322 | <field> | |
323 | <name>financial_type_id</name> | |
324 | <title>Financial Type</title> | |
325 | <export>false</export> | |
326 | <type>int unsigned</type> | |
327 | <comment>FK to Financial Type</comment> | |
328 | <add>4.3</add> | |
f389e500 E |
329 | <pseudoconstant> |
330 | <table>civicrm_financial_type</table> | |
331 | <keyColumn>id</keyColumn> | |
332 | <labelColumn>name</labelColumn> | |
333 | </pseudoconstant> | |
6a488035 TO |
334 | </field> |
335 | <foreignKey> | |
336 | <name>financial_type_id</name> | |
337 | <table>civicrm_financial_type</table> | |
338 | <key>id</key> | |
339 | <add>4.3</add> | |
340 | <onDelete>SET NULL</onDelete> | |
341 | </foreignKey> | |
342 | <field> | |
343 | <name>payment_instrument_id</name> | |
536f0e02 | 344 | <title>Payment Method</title> |
6a488035 TO |
345 | <type>int unsigned</type> |
346 | <comment>FK to Payment Instrument</comment> | |
6d68a4cb CW |
347 | <pseudoconstant> |
348 | <optionGroupName>payment_instrument</optionGroupName> | |
349 | </pseudoconstant> | |
614d72ec | 350 | <html> |
e0991796 | 351 | <type>Select</type> |
614d72ec | 352 | </html> |
6a488035 TO |
353 | <add>4.1</add> |
354 | </field> | |
355 | <index> | |
5beb1de0 | 356 | <name>UI_contribution_recur_payment_instrument_id</name> |
6a488035 TO |
357 | <fieldName>payment_instrument_id</fieldName> |
358 | <add>4.1</add> | |
359 | </index> | |
360 | <field> | |
361 | <name>campaign_id</name> | |
362 | <uniqueName>contribution_campaign_id</uniqueName> | |
363 | <type>int unsigned</type> | |
e1ab2e91 | 364 | <title>Campaign</title> |
6a488035 TO |
365 | <import>true</import> |
366 | <comment>The campaign for which this contribution has been triggered.</comment> | |
3e3eacd0 CW |
367 | <pseudoconstant> |
368 | <table>civicrm_campaign</table> | |
369 | <keyColumn>id</keyColumn> | |
370 | <labelColumn>title</labelColumn> | |
3e3eacd0 | 371 | </pseudoconstant> |
6a488035 TO |
372 | <add>4.1</add> |
373 | </field> | |
374 | <foreignKey> | |
375 | <name>campaign_id</name> | |
376 | <table>civicrm_campaign</table> | |
377 | <key>id</key> | |
378 | <onDelete>SET NULL</onDelete> | |
379 | </foreignKey> | |
6d68a4cb CW |
380 | <field> |
381 | <name>is_email_receipt</name> | |
797b807e | 382 | <title>Send email Receipt?</title> |
6d68a4cb CW |
383 | <type>boolean</type> |
384 | <comment>if true, receipt is automatically emailed to contact on each successful payment</comment> | |
6a488035 | 385 | <default>1</default> |
6d68a4cb | 386 | <add>4.1</add> |
e15be85b | 387 | <html> |
388 | <type>CheckBox</type> | |
389 | </html> | |
6d68a4cb | 390 | </field> |
6a488035 | 391 | </table> |