CRM-14264 : start using xml for gender / suffix / prefix
[civicrm-core.git] / xml / schema / Pledge / Pledge.xml
CommitLineData
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>
39 <field>
40 <name>contribution_type_id</name>
41 <uniqueName>pledge_contribution_type_id</uniqueName>
42 <export>false</export>
43 <type>int unsigned</type>
44 <comment>FK to Contribution Type. This is propagated to contribution record when pledge payments are made.</comment>
45 <add>2.1</add>
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>
52 <add>2.1</add>
53 <drop>4.3</drop>
54 <onDelete>SET NULL</onDelete>
55 </foreignKey>
56 <field>
57 <name>financial_type_id</name>
58 <title>Type</title>
59 <uniqueName>pledge_financial_type_id</uniqueName>
60 <type>int unsigned</type>
61 <comment>FK to Financial Type</comment>
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>
71 <name>contribution_page_id</name>
72 <uniqueName>pledge_contribution_page_id</uniqueName>
73 <title>Pledge Contribution Page</title>
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>
82 <onDelete>SET NULL</onDelete>
83 </foreignKey>
84 <field>
85 <name>amount</name>
86 <uniqueName>pledge_amount</uniqueName>
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>
96 <uniqueName>pledge_original_installment_amount</uniqueName>
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>
111 </field>
112 <field>
113 <name>frequency_unit</name>
114 <uniqueName>pledge_frequency_unit</uniqueName>
115 <title>Pledge Frequency Unit</title>
116 <type>enum</type>
117 <values>day,week,month,year</values>
118 <default>'month'</default>
119 <comment>Time units for recurrence of pledge payments.</comment>
120 <add>2.1</add>
121 </field>
122 <field>
123 <name>frequency_interval</name>
124 <uniqueName>pledge_frequency_interval</uniqueName>
125 <title>Pledge Frequency Interval</title>
126 <type>int unsigned</type>
127 <required>true</required>
128 <default>1</default>
129 <comment>Number of time units for recurrence of pledge payments.</comment>
130 <add>2.1</add>
131 </field>
132 <field>
133 <name>frequency_day</name>
134 <type>int unsigned</type>
135 <title>Pledge day</title>
136 <default>3</default>
137 <required>true</required>
138 <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>
139 <add>2.1</add>
140 </field>
141 <field>
142 <name>installments</name>
143 <type>int unsigned</type>
144 <title>Pledge Number of Installments</title>
145 <default>1</default>
146 <comment>Total number of payments to be made.</comment>
147 <add>2.1</add>
148 </field>
149 <field>
150 <name>start_date</name>
151 <type>datetime</type>
152 <title>Pledge Start Date</title>
153 <required>true</required>
154 <comment>The date the first scheduled pledge occurs.</comment>
155 <add>2.1</add>
156 </field>
157 <field>
158 <name>create_date</name>
159 <type>datetime</type>
160 <uniqueName>pledge_create_date</uniqueName>
161 <title>Pledge Made</title>
162 <required>true</required>
163 <import>true</import>
164 <comment>When this pledge record was created.</comment>
165 <add>2.1</add>
166 </field>
167 <field>
168 <name>acknowledge_date</name>
169 <type>datetime</type>
170 <title>Pledge Acknowledged</title>
171 <comment>When a pledge acknowledgement message was sent to the contributor.</comment>
172 <add>2.1</add>
173 </field>
174 <field>
175 <name>modified_date</name>
176 <type>datetime</type>
177 <title>Pledge Modified Date</title>
178 <comment>Last updated date for this pledge record.</comment>
179 <add>2.1</add>
180 </field>
181 <field>
182 <name>cancel_date</name>
183 <type>datetime</type>
184 <title>Pledge Cancelled Date</title>
185 <comment>Date this pledge was cancelled by contributor.</comment>
186 <add>2.1</add>
187 </field>
188 <field>
189 <name>end_date</name>
190 <type>datetime</type>
191 <title>Pledge End Date</title>
192 <comment>Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).</comment>
193 <add>2.1</add>
194 </field>
195 <field>
196 <name>honor_contact_id</name>
197 <type>int unsigned</type>
198 <title>Pledge Honor Contact</title>
199 <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>
200 <add>2.1</add>
201 </field>
202 <foreignKey>
203 <name>honor_contact_id</name>
204 <table>civicrm_contact</table>
205 <key>id</key>
206 <add>2.1</add>
207 <onDelete>SET NULL</onDelete>
208 </foreignKey>
209 <field>
210 <name>honor_type_id</name>
211 <title>Honor Type</title>
212 <type>int unsigned</type>
213 <comment>Implicit FK to civicrm_option_value.</comment>
214 <add>2.1</add>
215 <onDelete>SET NULL</onDelete>
216 </field>
217 <field>
218 <name>max_reminders</name>
219 <title>Maximum Number of Reminders</title>
220 <type>int unsigned</type>
221 <default>1</default>
222 <comment>The maximum number of payment reminders to send for any given payment.</comment>
223 <add>2.1</add>
224 </field>
225 <field>
226 <name>initial_reminder_day</name>
227 <title>Initial Reminder Day</title>
228 <type>int unsigned</type>
229 <default>5</default>
230 <comment>Send initial reminder this many days prior to the payment due date.</comment>
231 <add>2.1</add>
232 </field>
233 <field>
234 <name>additional_reminder_day</name>
235 <title>Additional Reminder Days</title>
236 <type>int unsigned</type>
237 <default>5</default>
238 <comment>Send additional reminder this many days after last one sent, up to maximum number of reminders.</comment>
239 <add>2.1</add>
240 </field>
241 <field>
242 <name>status_id</name>
243 <title>Pledge Status Id</title>
244 <uniqueName>pledge_status_id</uniqueName>
245 <import>true</import>
246 <export>false</export>
247 <type>int unsigned</type>
248 <comment>Implicit foreign key to civicrm_option_values in the contribution_status option group.</comment>
249 <add>2.1</add>
250 </field>
251 <index>
252 <name>index_status</name>
253 <fieldName>status_id</fieldName>
254 <add>2.1</add>
255 </index>
256 <field>
257 <name>is_test</name>
258 <uniqueName>pledge_is_test</uniqueName>
259 <import>true</import>
260 <title>Test</title>
261 <type>boolean</type>
262 <default>0</default>
263 </field>
264 <field>
265 <name>campaign_id</name>
266 <uniqueName>pledge_campaign_id</uniqueName>
267 <type>int unsigned</type>
268 <title>Campaign ID</title>
269 <import>true</import>
270 <comment>The campaign for which this pledge has been initiated.</comment>
271 <add>3.4</add>
272 </field>
273 <foreignKey>
274 <name>campaign_id</name>
275 <table>civicrm_campaign</table>
276 <key>id</key>
277 <onDelete>SET NULL</onDelete>
278 </foreignKey>
279</table>