Merge pull request #15184 from eileenmcnaughton/dedupe9
[civicrm-core.git] / xml / schema / Pledge / Pledge.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Pledge</base>
4 <class>Pledge</class>
5 <name>civicrm_pledge</name>
6 <add>2.1</add>
7 <log>true</log>
8 <field>
9 <name>id</name>
10 <uniqueName>pledge_id</uniqueName>
11 <title>Pledge ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Pledge ID</comment>
15 <import>true</import>
16 <add>2.1</add>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>contact_id</name>
24 <uniqueName>pledge_contact_id</uniqueName>
25 <title>Contact ID</title>
26 <import>true</import>
27 <type>int unsigned</type>
28 <required>true</required>
29 <comment>Foreign key to civicrm_contact.id .</comment>
30 <add>2.1</add>
31 <html>
32 <type>EntityRef</type>
33 </html>
34 </field>
35 <foreignKey>
36 <name>contact_id</name>
37 <table>civicrm_contact</table>
38 <key>id</key>
39 <add>2.1</add>
40 <onDelete>CASCADE</onDelete>
41 </foreignKey>
42 <field>
43 <name>contribution_type_id</name>
44 <uniqueName>pledge_contribution_type_id</uniqueName>
45 <export>false</export>
46 <type>int unsigned</type>
47 <comment>FK to Contribution Type. This is propagated to contribution record when pledge payments are made.</comment>
48 <add>2.1</add>
49 <drop>4.3</drop>
50 </field>
51 <foreignKey>
52 <name>contribution_type_id</name>
53 <table>civicrm_contribution_type</table>
54 <key>id</key>
55 <add>2.1</add>
56 <drop>4.3</drop>
57 <onDelete>SET NULL</onDelete>
58 </foreignKey>
59 <field>
60 <name>financial_type_id</name>
61 <title>Type</title>
62 <uniqueName>pledge_financial_type_id</uniqueName>
63 <type>int unsigned</type>
64 <comment>FK to Financial Type</comment>
65 <pseudoconstant>
66 <table>civicrm_financial_type</table>
67 <keyColumn>id</keyColumn>
68 <labelColumn>name</labelColumn>
69 </pseudoconstant>
70 <add>4.3</add>
71 <html>
72 <type>Select</type>
73 </html>
74 </field>
75 <foreignKey>
76 <name>financial_type_id</name>
77 <table>civicrm_financial_type</table>
78 <key>id</key>
79 <add>4.3</add>
80 </foreignKey>
81 <field>
82 <name>contribution_page_id</name>
83 <uniqueName>pledge_contribution_page_id</uniqueName>
84 <title>Pledge Contribution Page</title>
85 <type>int unsigned</type>
86 <comment>The Contribution Page which triggered this contribution</comment>
87 <add>2.1</add>
88 </field>
89 <foreignKey>
90 <name>contribution_page_id</name>
91 <table>civicrm_contribution_page</table>
92 <key>id</key>
93 <onDelete>SET NULL</onDelete>
94 </foreignKey>
95 <field>
96 <name>amount</name>
97 <uniqueName>pledge_amount</uniqueName>
98 <title>Total Pledged</title>
99 <type>decimal</type>
100 <required>true</required>
101 <import>true</import>
102 <comment>Total pledged amount.</comment>
103 <add>2.1</add>
104 <html>
105 <type>Text</type>
106 </html>
107 </field>
108 <field>
109 <name>original_installment_amount</name>
110 <uniqueName>pledge_original_installment_amount</uniqueName>
111 <title>Original Installment Amount</title>
112 <type>decimal</type>
113 <required>true</required>
114 <comment>Original amount for each of the installments.</comment>
115 <add>3.2</add>
116 <html>
117 <type>Text</type>
118 </html>
119 <export>true</export>
120 </field>
121 <field>
122 <name>currency</name>
123 <type>varchar</type>
124 <title>Pledge Currency</title>
125 <length>3</length>
126 <default>NULL</default>
127 <comment>3 character string, value from config setting or input via user.</comment>
128 <add>3.2</add>
129 <pseudoconstant>
130 <table>civicrm_currency</table>
131 <keyColumn>name</keyColumn>
132 <labelColumn>full_name</labelColumn>
133 <nameColumn>name</nameColumn>
134 <abbrColumn>symbol</abbrColumn>
135 </pseudoconstant>
136 <html>
137 <type>Select</type>
138 </html>
139 </field>
140 <field>
141 <name>frequency_unit</name>
142 <uniqueName>pledge_frequency_unit</uniqueName>
143 <title>Pledge Frequency Unit</title>
144 <type>varchar</type>
145 <length>8</length>
146 <default>'month'</default>
147 <comment>Time units for recurrence of pledge payments.</comment>
148 <pseudoconstant>
149 <optionGroupName>recur_frequency_units</optionGroupName>
150 <keyColumn>name</keyColumn>
151 </pseudoconstant>
152 <add>2.1</add>
153 <html>
154 <type>Select</type>
155 </html>
156 </field>
157 <field>
158 <name>frequency_interval</name>
159 <uniqueName>pledge_frequency_interval</uniqueName>
160 <title>Pledge Frequency Interval</title>
161 <type>int unsigned</type>
162 <required>true</required>
163 <default>1</default>
164 <comment>Number of time units for recurrence of pledge payments.</comment>
165 <add>2.1</add>
166 <html>
167 <type>Text</type>
168 </html>
169 </field>
170 <field>
171 <name>frequency_day</name>
172 <type>int unsigned</type>
173 <title>Pledge day</title>
174 <default>3</default>
175 <required>true</required>
176 <comment>Day in the period when the pledge payment is due e.g. 1st of month, 15th etc. Use this to set the scheduled dates for pledge payments.</comment>
177 <add>2.1</add>
178 <html>
179 <type>Select</type>
180 </html>
181 </field>
182 <field>
183 <name>installments</name>
184 <type>int unsigned</type>
185 <title>Pledge Number of Installments</title>
186 <default>1</default>
187 <comment>Total number of payments to be made.</comment>
188 <add>2.1</add>
189 <html>
190 <type>Text</type>
191 </html>
192 <export>true</export>
193 </field>
194 <field>
195 <name>start_date</name>
196 <type>datetime</type>
197 <title>Pledge Start Date</title>
198 <required>true</required>
199 <export>true</export>
200 <comment>The date the first scheduled pledge occurs.</comment>
201 <add>2.1</add>
202 <html>
203 <type>Select Date</type>
204 </html>
205 <uniqueName>pledge_start_date</uniqueName>
206 <uniqueTitle>Payments Start Date</uniqueTitle>
207 </field>
208 <field>
209 <name>create_date</name>
210 <type>datetime</type>
211 <uniqueName>pledge_create_date</uniqueName>
212 <title>Pledge Made</title>
213 <required>true</required>
214 <import>true</import>
215 <export>true</export>
216 <comment>When this pledge record was created.</comment>
217 <add>2.1</add>
218 <html>
219 <type>Select Date</type>
220 </html>
221 </field>
222 <field>
223 <name>acknowledge_date</name>
224 <type>datetime</type>
225 <title>Pledge Acknowledged</title>
226 <comment>When a pledge acknowledgement message was sent to the contributor.</comment>
227 <add>2.1</add>
228 <html>
229 <type>Select Date</type>
230 </html>
231 </field>
232 <field>
233 <name>modified_date</name>
234 <type>datetime</type>
235 <title>Pledge Modified Date</title>
236 <comment>Last updated date for this pledge record.</comment>
237 <add>2.1</add>
238 </field>
239 <field>
240 <name>cancel_date</name>
241 <type>datetime</type>
242 <title>Pledge Cancelled Date</title>
243 <comment>Date this pledge was cancelled by contributor.</comment>
244 <add>2.1</add>
245 <html>
246 <type>Select Date</type>
247 </html>
248 </field>
249 <field>
250 <name>end_date</name>
251 <type>datetime</type>
252 <title>Pledge End Date</title>
253 <export>true</export>
254 <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment>
255 <add>2.1</add>
256 <html>
257 <type>Select Date</type>
258 </html>
259 <uniqueName>pledge_end_date</uniqueName>
260 <uniqueTitle>Payments Ended Date</uniqueTitle>
261 </field>
262 <field>
263 <name>max_reminders</name>
264 <title>Maximum Number of Reminders</title>
265 <type>int unsigned</type>
266 <default>1</default>
267 <comment>The maximum number of payment reminders to send for any given payment.</comment>
268 <html>
269 <type>Text</type>
270 </html>
271 <add>2.1</add>
272 </field>
273 <field>
274 <name>initial_reminder_day</name>
275 <title>Initial Reminder Day</title>
276 <type>int unsigned</type>
277 <default>5</default>
278 <comment>Send initial reminder this many days prior to the payment due date.</comment>
279 <add>2.1</add>
280 <html>
281 <type>Select</type>
282 </html>
283 </field>
284 <field>
285 <name>additional_reminder_day</name>
286 <title>Additional Reminder Days</title>
287 <type>int unsigned</type>
288 <default>5</default>
289 <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment>
290 <add>2.1</add>
291 <html>
292 <type>Text</type>
293 </html>
294 </field>
295 <field>
296 <name>status_id</name>
297 <title>Pledge Status Id</title>
298 <uniqueName>pledge_status_id</uniqueName>
299 <import>true</import>
300 <export>false</export>
301 <type>int unsigned</type>
302 <html>
303 <type>Select</type>
304 </html>
305 <pseudoconstant>
306 <optionGroupName>pledge_status</optionGroupName>
307 </pseudoconstant>
308 <comment>Implicit foreign key to civicrm_option_values in the pledge_status option group.</comment>
309 <add>2.1</add>
310 </field>
311 <index>
312 <name>index_status</name>
313 <fieldName>status_id</fieldName>
314 <add>2.1</add>
315 </index>
316 <field>
317 <name>is_test</name>
318 <uniqueName>pledge_is_test</uniqueName>
319 <import>true</import>
320 <title>Test</title>
321 <type>boolean</type>
322 <default>0</default>
323 <html>
324 <type>CheckBox</type>
325 </html>
326 </field>
327 <field>
328 <name>campaign_id</name>
329 <uniqueName>pledge_campaign_id</uniqueName>
330 <type>int unsigned</type>
331 <title>Campaign</title>
332 <import>true</import>
333 <comment>The campaign for which this pledge has been initiated.</comment>
334 <pseudoconstant>
335 <table>civicrm_campaign</table>
336 <keyColumn>id</keyColumn>
337 <labelColumn>title</labelColumn>
338 </pseudoconstant>
339 <add>3.4</add>
340 <html>
341 <type>Select</type>
342 </html>
343 </field>
344 <foreignKey>
345 <name>campaign_id</name>
346 <table>civicrm_campaign</table>
347 <key>id</key>
348 <onDelete>SET NULL</onDelete>
349 </foreignKey>
350 </table>