Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-02-21-30-06
[civicrm-core.git] / xml / schema / Mailing / Mailing.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Mailing</base>
5 <class>Mailing</class>
6 <name>civicrm_mailing</name>
7 <comment>Stores information about a mailing.</comment>
8 <archive>true</archive>
9 <field>
10 <name>id</name>
11 <title>Mailing ID</title>
12 <type>int unsigned</type>
13 <required>true</required>
14 </field>
15 <primaryKey>
16 <name>id</name>
17 <autoincrement>true</autoincrement>
18 </primaryKey>
19 <field>
20 <name>domain_id</name>
21 <title>Mailing Domain</title>
22 <type>int unsigned</type>
23 <pseudoconstant>
24 <table>civicrm_domain</table>
25 <keyColumn>id</keyColumn>
26 <labelColumn>name</labelColumn>
27 </pseudoconstant>
28 <comment>Which site is this mailing for</comment>
29 <add>3.4</add>
30 </field>
31 <foreignKey>
32 <name>domain_id</name>
33 <table>civicrm_domain</table>
34 <key>id</key>
35 <onDelete>SET NULL</onDelete>
36 <add>3.4</add>
37 </foreignKey>
38 <field>
39 <name>header_id</name>
40 <title>Mailing Header</title>
41 <type>int unsigned</type>
42 <comment>FK to the header component.</comment>
43 </field>
44 <foreignKey>
45 <name>header_id</name>
46 <table>civicrm_mailing_component</table>
47 <key>id</key>
48 <onDelete>SET NULL</onDelete>
49 </foreignKey>
50 <field>
51 <name>footer_id</name>
52 <title>Mailing Footer</title>
53 <type>int unsigned</type>
54 <comment>FK to the footer component.</comment>
55 </field>
56 <foreignKey>
57 <name>footer_id</name>
58 <table>civicrm_mailing_component</table>
59 <key>id</key>
60 <onDelete>SET NULL</onDelete>
61 </foreignKey>
62 <field>
63 <name>reply_id</name>
64 <title>Mailing Reply</title>
65 <type>int unsigned</type>
66 <comment>FK to the auto-responder component.</comment>
67 </field>
68 <foreignKey>
69 <name>reply_id</name>
70 <table>civicrm_mailing_component</table>
71 <key>id</key>
72 <onDelete>SET NULL</onDelete>
73 </foreignKey>
74 <field>
75 <name>unsubscribe_id</name>
76 <title>Mailing Unsubscribe</title>
77 <type>int unsigned</type>
78 <comment>FK to the unsubscribe component.</comment>
79 </field>
80 <foreignKey>
81 <name>unsubscribe_id</name>
82 <table>civicrm_mailing_component</table>
83 <key>id</key>
84 <onDelete>SET NULL</onDelete>
85 </foreignKey>
86 <field>
87 <name>resubscribe_id</name>
88 <title>Mailing Resubscribe</title>
89 <type>int unsigned</type>
90 </field>
91 <foreignKey>
92 <name>optout_id</name>
93 <table>civicrm_mailing_component</table>
94 <key>id</key>
95 <onDelete>SET NULL</onDelete>
96 </foreignKey>
97 <field>
98 <name>optout_id</name>
99 <title>Mailing Opt Out</title>
100 <type>int unsigned</type>
101 <comment>FK to the opt-out component.</comment>
102 </field>
103 <foreignKey>
104 <name>optout_id</name>
105 <table>civicrm_mailing_component</table>
106 <key>id</key>
107 <onDelete>SET NULL</onDelete>
108 </foreignKey>
109 <field>
110 <name>name</name>
111 <title>Mailing Name</title>
112 <type>varchar</type>
113 <length>128</length>
114 <comment>Mailing Name.</comment>
115 <html>
116 <type>Text</type>
117 </html>
118 </field>
119 <field>
120 <name>from_name</name>
121 <title>Mailing From Name</title>
122 <type>varchar</type>
123 <length>128</length>
124 <comment>From Header of mailing</comment>
125 <html>
126 <type>Text</type>
127 </html>
128 </field>
129 <field>
130 <name>from_email</name>
131 <title>Mailing From Email</title>
132 <type>varchar</type>
133 <length>128</length>
134 <comment>From Email of mailing</comment>
135 <html>
136 <type>Text</type>
137 </html>
138 </field>
139 <field>
140 <name>replyto_email</name>
141 <type>varchar</type>
142 <length>128</length>
143 <comment>Reply-To Email of mailing</comment>
144 <html>
145 <type>Text</type>
146 </html>
147 </field>
148 <field>
149 <name>subject</name>
150 <type>varchar</type>
151 <length>128</length>
152 <comment>Subject of mailing</comment>
153 <html>
154 <type>Text</type>
155 </html>
156 </field>
157 <field>
158 <name>body_text</name>
159 <type>longtext</type>
160 <comment>Body of the mailing in text format.</comment>
161 </field>
162 <field>
163 <name>body_html</name>
164 <type>longtext</type>
165 <comment>Body of the mailing in html format.</comment>
166 </field>
167 <field>
168 <name>url_tracking</name>
169 <type>boolean</type>
170 <comment>Should we track URL click-throughs for this mailing?</comment>
171 <html>
172 <type>CheckBox</type>
173 </html>
174 </field>
175 <field>
176 <name>forward_replies</name>
177 <type>boolean</type>
178 <comment>Should we forward replies back to the author?</comment>
179 <html>
180 <type>CheckBox</type>
181 </html>
182 </field>
183 <field>
184 <name>auto_responder</name>
185 <type>boolean</type>
186 <comment>Should we enable the auto-responder?</comment>
187 <html>
188 <type>CheckBox</type>
189 </html>
190 </field>
191 <field>
192 <name>open_tracking</name>
193 <title>Track Mailing?</title>
194 <type>boolean</type>
195 <comment>Should we track when recipients open/read this mailing?</comment>
196 </field>
197 <field>
198 <name>is_completed</name>
199 <title>Mailing Completed</title>
200 <type>boolean</type>
201 <comment>Has at least one job associated with this mailing finished?</comment>
202 <html>
203 <type>CheckBox</type>
204 </html>
205 </field>
206 <field>
207 <name>msg_template_id</name>
208 <title>Mailing Message Template</title>
209 <type>int unsigned</type>
210 <comment>FK to the message template.</comment>
211 </field>
212 <foreignKey>
213 <name>msg_template_id</name>
214 <table>civicrm_msg_template</table>
215 <key>id</key>
216 <onDelete>SET NULL</onDelete>
217 </foreignKey>
218 <field>
219 <name>override_verp</name>
220 <type>boolean</type>
221 <default>0</default>
222 <add>2.2</add>
223 <comment>Should we overrite VERP address in Reply-To</comment>
224 <html>
225 <type>CheckBox</type>
226 </html>
227 </field>
228 <field>
229 <name>created_id</name>
230 <title>Mailing Creator</title>
231 <type>int unsigned</type>
232 <comment>FK to Contact ID who first created this mailing</comment>
233 </field>
234 <foreignKey>
235 <name>created_id</name>
236 <table>civicrm_contact</table>
237 <key>id</key>
238 <onDelete>SET NULL</onDelete>
239 </foreignKey>
240 <field>
241 <name>created_date</name>
242 <type>datetime</type>
243 <title>Mailing Created Date</title>
244 <comment>Date and time this mailing was created.</comment>
245 <add>3.0</add>
246 <html>
247 <type>Select Date</type>
248 </html>
249 </field>
250 <field>
251 <name>scheduled_id</name>
252 <title>Scheduled By</title>
253 <type>int unsigned</type>
254 <comment>FK to Contact ID who scheduled this mailing</comment>
255 </field>
256 <foreignKey>
257 <name>scheduled_id</name>
258 <table>civicrm_contact</table>
259 <key>id</key>
260 <onDelete>SET NULL</onDelete>
261 </foreignKey>
262 <field>
263 <name>scheduled_date</name>
264 <type>datetime</type>
265 <title>Mailing Scheduled Date</title>
266 <comment>Date and time this mailing was scheduled.</comment>
267 <add>3.3</add>
268 </field>
269 <field>
270 <name>approver_id</name>
271 <title>Approved By</title>
272 <type>int unsigned</type>
273 <comment>FK to Contact ID who approved this mailing</comment>
274 </field>
275 <foreignKey>
276 <name>approver_id</name>
277 <table>civicrm_contact</table>
278 <key>id</key>
279 <onDelete>SET NULL</onDelete>
280 </foreignKey>
281 <field>
282 <name>approval_date</name>
283 <type>datetime</type>
284 <title>Mailing Approved Date</title>
285 <comment>Date and time this mailing was approved.</comment>
286 <add>3.3</add>
287 </field>
288 <field>
289 <name>approval_status_id</name>
290 <type>int unsigned</type>
291 <title>Approval Status</title>
292 <comment>The status of this mailing. Values: none, approved, rejected</comment>
293 <pseudoconstant>
294 <optionGroupName>mail_approval_status</optionGroupName>
295 </pseudoconstant>
296 <html>
297 <type>Select</type>
298 </html>
299 <add>3.3</add>
300 </field>
301 <field>
302 <name>approval_note</name>
303 <type>longtext</type>
304 <title>Approval Note</title>
305 <comment>Note behind the decision.</comment>
306 <add>3.3</add>
307 <html>
308 <type>TextArea</type>
309 </html>
310 </field>
311 <field>
312 <name>is_archived</name>
313 <type>boolean</type>
314 <title>Is Mailing Archived?</title>
315 <default>0</default>
316 <comment>Is this mailing archived?</comment>
317 <html>
318 <type>CheckBox</type>
319 </html>
320 <add>2.2</add>
321 </field>
322 <field>
323 <name>visibility</name>
324 <type>varchar</type>
325 <title>Mailing Visibility</title>
326 <length>40</length>
327 <default>'Public Pages'</default>
328 <comment>In what context(s) is the mailing contents visible (online viewing)</comment>
329 <pseudoconstant>
330 <callback>CRM_Core_SelectValues::groupVisibility</callback>
331 </pseudoconstant>
332 <add>3.3</add>
333 <html>
334 <type>Select</type>
335 </html>
336 </field>
337 <field>
338 <name>campaign_id</name>
339 <type>int unsigned</type>
340 <title>Mailing Campaign</title>
341 <comment>The campaign for which this mailing has been initiated.</comment>
342 <pseudoconstant>
343 <table>civicrm_campaign</table>
344 <keyColumn>id</keyColumn>
345 <labelColumn>title</labelColumn>
346 </pseudoconstant>
347 <add>3.4</add>
348 <html>
349 <type>Select</type>
350 </html>
351 </field>
352 <foreignKey>
353 <name>campaign_id</name>
354 <table>civicrm_campaign</table>
355 <key>id</key>
356 <onDelete>SET NULL</onDelete>
357 </foreignKey>
358 <field>
359 <name>dedupe_email</name>
360 <type>boolean</type>
361 <title>No Duplicate emails?</title>
362 <default>0</default>
363 <add>4.1</add>
364 <comment>Remove duplicate emails?</comment>
365 <html>
366 <type>CheckBox</type>
367 </html>
368 </field>
369 <field>
370 <name>sms_provider_id</name>
371 <title>Mailing SMS Provider</title>
372 <type>int unsigned</type>
373 <add>4.2</add>
374 <html>
375 <type>Select</type>
376 </html>
377 </field>
378 <foreignKey>
379 <name>sms_provider_id</name>
380 <table>civicrm_sms_provider</table>
381 <key>id</key>
382 <onDelete>SET NULL</onDelete>
383 <add>4.2</add>
384 </foreignKey>
385 <field>
386 <name>hash</name>
387 <title>Mailing Hash</title>
388 <type>varchar</type>
389 <length>16</length>
390 <comment>Key for validating requests related to this mailing.</comment>
391 <add>4.5</add>
392 </field>
393 <index>
394 <name>index_hash</name>
395 <fieldName>hash</fieldName>
396 <add>4.5</add>
397 </index>
398 <field>
399 <name>location_type_id</name>
400 <title>Location Type</title>
401 <type>int unsigned</type>
402 <comment>With email_selection_method, determines which email address to use</comment>
403 <pseudoconstant>
404 <table>civicrm_location_type</table>
405 <keyColumn>id</keyColumn>
406 <labelColumn>display_name</labelColumn>
407 </pseudoconstant>
408 <add>4.6</add>
409 </field>
410 <foreignKey>
411 <name>location_type_id</name>
412 <table>civicrm_location_type</table>
413 <key>id</key>
414 <onDelete>SET NULL</onDelete>
415 <add>4.6</add>
416 </foreignKey>
417 <field>
418 <name>email_selection_method</name>
419 <type>varchar</type>
420 <length>20</length>
421 <default>'automatic'</default>
422 <comment>With location_type_id, determine how to choose the email address to use.</comment>
423 <pseudoconstant>
424 <callback>CRM_Core_SelectValues::emailSelectMethods</callback>
425 </pseudoconstant>
426 <add>4.6</add>
427 </field>
428 </table>