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