Commit | Line | Data |
---|---|---|
6a488035 TO |
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 | </field> | |
32 | <foreignKey> | |
33 | <name>contact_id</name> | |
34 | <table>civicrm_contact</table> | |
35 | <key>id</key> | |
36 | <add>2.1</add> | |
37 | <onDelete>CASCADE</onDelete> | |
38 | </foreignKey> | |
3c7d2158 | 39 | <field> |
40 | <name>contribution_type_id</name> | |
6a488035 TO |
41 | <uniqueName>pledge_contribution_type_id</uniqueName> |
42 | <export>false</export> | |
3c7d2158 | 43 | <type>int unsigned</type> |
6a488035 TO |
44 | <comment>FK to Contribution Type. This is propagated to contribution record when pledge payments are made.</comment> |
45 | <add>2.1</add> | |
3c7d2158 | 46 | <drop>4.3</drop> |
47 | </field> | |
48 | <foreignKey> | |
49 | <name>contribution_type_id</name> | |
50 | <table>civicrm_contribution_type</table> | |
51 | <key>id</key> | |
6a488035 | 52 | <add>2.1</add> |
3c7d2158 | 53 | <drop>4.3</drop> |
6a488035 TO |
54 | <onDelete>SET NULL</onDelete> |
55 | </foreignKey> | |
3c7d2158 | 56 | <field> |
57 | <name>financial_type_id</name> | |
6a488035 TO |
58 | <title>Type</title> |
59 | <uniqueName>pledge_financial_type_id</uniqueName> | |
3c7d2158 | 60 | <type>int unsigned</type> |
6a488035 | 61 | <comment>FK to Financial Type</comment> |
3c7d2158 | 62 | <add>4.3</add> |
63 | </field> | |
64 | <foreignKey> | |
65 | <name>financial_type_id</name> | |
66 | <table>civicrm_financial_type</table> | |
67 | <key>id</key> | |
68 | <add>4.3</add> | |
69 | </foreignKey> | |
70 | <field> | |
6a488035 TO |
71 | <name>contribution_page_id</name> |
72 | <uniqueName>pledge_contribution_page_id</uniqueName> | |
73 | <title>Pledge Contribution Page</title> | |
3c7d2158 | 74 | <type>int unsigned</type> |
75 | <comment>The Contribution Page which triggered this contribution</comment> | |
76 | <add>2.1</add> | |
77 | </field> | |
78 | <foreignKey> | |
79 | <name>contribution_page_id</name> | |
80 | <table>civicrm_contribution_page</table> | |
81 | <key>id</key> | |
6a488035 TO |
82 | <onDelete>SET NULL</onDelete> |
83 | </foreignKey> | |
84 | <field> | |
85 | <name>amount</name> | |
3c7d2158 | 86 | <uniqueName>pledge_amount</uniqueName> |
6a488035 TO |
87 | <title>Total Pledged</title> |
88 | <type>decimal</type> | |
89 | <required>true</required> | |
90 | <import>true</import> | |
91 | <comment>Total pledged amount.</comment> | |
92 | <add>2.1</add> | |
93 | </field> | |
94 | <field> | |
95 | <name>original_installment_amount</name> | |
3c7d2158 | 96 | <uniqueName>pledge_original_installment_amount</uniqueName> |
6a488035 TO |
97 | <title>Original Installment Amount</title> |
98 | <type>decimal</type> | |
99 | <required>true</required> | |
100 | <comment>Original amount for each of the installments.</comment> | |
101 | <add>3.2</add> | |
102 | </field> | |
103 | <field> | |
104 | <name>currency</name> | |
105 | <type>varchar</type> | |
106 | <title>Pledge Currency</title> | |
107 | <length>3</length> | |
108 | <default>NULL</default> | |
109 | <comment>3 character string, value from config setting or input via user.</comment> | |
110 | <add>3.2</add> | |
bd44e0df AS |
111 | <pseudoconstant> |
112 | <table>civicrm_currency</table> | |
113 | <keyColumn>name</keyColumn> | |
a38a89fc CW |
114 | <labelColumn>full_name</labelColumn> |
115 | <nameColumn>numeric_code</nameColumn> | |
bd44e0df | 116 | </pseudoconstant> |
6a488035 TO |
117 | </field> |
118 | <field> | |
119 | <name>frequency_unit</name> | |
120 | <uniqueName>pledge_frequency_unit</uniqueName> | |
121 | <title>Pledge Frequency Unit</title> | |
3c7d2158 | 122 | <type>enum</type> |
6a488035 TO |
123 | <values>day,week,month,year</values> |
124 | <default>'month'</default> | |
125 | <comment>Time units for recurrence of pledge payments.</comment> | |
126 | <add>2.1</add> | |
127 | </field> | |
128 | <field> | |
129 | <name>frequency_interval</name> | |
130 | <uniqueName>pledge_frequency_interval</uniqueName> | |
131 | <title>Pledge Frequency Interval</title> | |
132 | <type>int unsigned</type> | |
133 | <required>true</required> | |
134 | <default>1</default> | |
135 | <comment>Number of time units for recurrence of pledge payments.</comment> | |
136 | <add>2.1</add> | |
137 | </field> | |
138 | <field> | |
139 | <name>frequency_day</name> | |
140 | <type>int unsigned</type> | |
141 | <title>Pledge day</title> | |
142 | <default>3</default> | |
143 | <required>true</required> | |
144 | <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> | |
145 | <add>2.1</add> | |
146 | </field> | |
147 | <field> | |
148 | <name>installments</name> | |
149 | <type>int unsigned</type> | |
150 | <title>Pledge Number of Installments</title> | |
151 | <default>1</default> | |
152 | <comment>Total number of payments to be made.</comment> | |
153 | <add>2.1</add> | |
154 | </field> | |
155 | <field> | |
156 | <name>start_date</name> | |
157 | <type>datetime</type> | |
158 | <title>Pledge Start Date</title> | |
159 | <required>true</required> | |
160 | <comment>The date the first scheduled pledge occurs.</comment> | |
161 | <add>2.1</add> | |
162 | </field> | |
163 | <field> | |
164 | <name>create_date</name> | |
165 | <type>datetime</type> | |
166 | <uniqueName>pledge_create_date</uniqueName> | |
167 | <title>Pledge Made</title> | |
168 | <required>true</required> | |
169 | <import>true</import> | |
170 | <comment>When this pledge record was created.</comment> | |
171 | <add>2.1</add> | |
172 | </field> | |
173 | <field> | |
174 | <name>acknowledge_date</name> | |
175 | <type>datetime</type> | |
176 | <title>Pledge Acknowledged</title> | |
177 | <comment>When a pledge acknowledgement message was sent to the contributor.</comment> | |
178 | <add>2.1</add> | |
179 | </field> | |
180 | <field> | |
181 | <name>modified_date</name> | |
182 | <type>datetime</type> | |
183 | <title>Pledge Modified Date</title> | |
184 | <comment>Last updated date for this pledge record.</comment> | |
185 | <add>2.1</add> | |
186 | </field> | |
187 | <field> | |
188 | <name>cancel_date</name> | |
189 | <type>datetime</type> | |
190 | <title>Pledge Cancelled Date</title> | |
191 | <comment>Date this pledge was cancelled by contributor.</comment> | |
192 | <add>2.1</add> | |
193 | </field> | |
194 | <field> | |
195 | <name>end_date</name> | |
196 | <type>datetime</type> | |
197 | <title>Pledge End Date</title> | |
198 | <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment> | |
199 | <add>2.1</add> | |
200 | </field> | |
3c7d2158 | 201 | <field> |
6a488035 TO |
202 | <name>honor_contact_id</name> |
203 | <type>int unsigned</type> | |
204 | <title>Pledge Honor Contact</title> | |
3c7d2158 | 205 | <comment>FK to contact ID. Used when pledge is made in honor of another contact. This is propagated to contribution records when pledge payments are made.</comment> |
206 | <add>2.1</add> | |
207 | </field> | |
208 | <foreignKey> | |
209 | <name>honor_contact_id</name> | |
210 | <table>civicrm_contact</table> | |
211 | <key>id</key> | |
212 | <add>2.1</add> | |
6a488035 | 213 | <onDelete>SET NULL</onDelete> |
3c7d2158 | 214 | </foreignKey> |
6a488035 TO |
215 | <field> |
216 | <name>honor_type_id</name> | |
217 | <title>Honor Type</title> | |
218 | <type>int unsigned</type> | |
219 | <comment>Implicit FK to civicrm_option_value.</comment> | |
220 | <add>2.1</add> | |
221 | <onDelete>SET NULL</onDelete> | |
cbf48754 AS |
222 | <pseudoconstant> |
223 | <optionGroupName>honor_type</optionGroupName> | |
224 | </pseudoconstant> | |
6a488035 TO |
225 | </field> |
226 | <field> | |
227 | <name>max_reminders</name> | |
228 | <title>Maximum Number of Reminders</title> | |
229 | <type>int unsigned</type> | |
230 | <default>1</default> | |
231 | <comment>The maximum number of payment reminders to send for any given payment.</comment> | |
232 | <add>2.1</add> | |
233 | </field> | |
234 | <field> | |
235 | <name>initial_reminder_day</name> | |
236 | <title>Initial Reminder Day</title> | |
237 | <type>int unsigned</type> | |
238 | <default>5</default> | |
239 | <comment>Send initial reminder this many days prior to the payment due date.</comment> | |
240 | <add>2.1</add> | |
241 | </field> | |
242 | <field> | |
243 | <name>additional_reminder_day</name> | |
244 | <title>Additional Reminder Days</title> | |
245 | <type>int unsigned</type> | |
246 | <default>5</default> | |
247 | <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment> | |
248 | <add>2.1</add> | |
249 | </field> | |
250 | <field> | |
251 | <name>status_id</name> | |
252 | <title>Pledge Status Id</title> | |
253 | <uniqueName>pledge_status_id</uniqueName> | |
254 | <import>true</import> | |
255 | <export>false</export> | |
256 | <type>int unsigned</type> | |
257 | <comment>Implicit foreign key to civicrm_option_values in the contribution_status option group.</comment> | |
258 | <add>2.1</add> | |
259 | </field> | |
260 | <index> | |
261 | <name>index_status</name> | |
262 | <fieldName>status_id</fieldName> | |
263 | <add>2.1</add> | |
264 | </index> | |
3c7d2158 | 265 | <field> |
266 | <name>is_test</name> | |
267 | <uniqueName>pledge_is_test</uniqueName> | |
6a488035 TO |
268 | <import>true</import> |
269 | <title>Test</title> | |
270 | <type>boolean</type> | |
271 | <default>0</default> | |
272 | </field> | |
3c7d2158 | 273 | <field> |
274 | <name>campaign_id</name> | |
6a488035 | 275 | <uniqueName>pledge_campaign_id</uniqueName> |
3c7d2158 | 276 | <type>int unsigned</type> |
6a488035 | 277 | <title>Campaign ID</title> |
3c7d2158 | 278 | <import>true</import> |
279 | <comment>The campaign for which this pledge has been initiated.</comment> | |
280 | <add>3.4</add> | |
281 | </field> | |
282 | <foreignKey> | |
283 | <name>campaign_id</name> | |
284 | <table>civicrm_campaign</table> | |
285 | <key>id</key> | |
6a488035 TO |
286 | <onDelete>SET NULL</onDelete> |
287 | </foreignKey> | |
288 | </table> |