| 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>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> |
| 133 | <field> |
| 134 | <name>from_name</name> |
| 135 | <title>Mailing From Name</title> |
| 136 | <type>varchar</type> |
| 137 | <length>128</length> |
| 138 | <comment>From Header of mailing</comment> |
| 139 | <html> |
| 140 | <type>Text</type> |
| 141 | </html> |
| 142 | </field> |
| 143 | <field> |
| 144 | <name>from_email</name> |
| 145 | <title>Mailing From Email</title> |
| 146 | <type>varchar</type> |
| 147 | <length>128</length> |
| 148 | <comment>From Email of mailing</comment> |
| 149 | <html> |
| 150 | <type>Text</type> |
| 151 | </html> |
| 152 | </field> |
| 153 | <field> |
| 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> |
| 161 | </field> |
| 162 | <field> |
| 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> |
| 170 | </field> |
| 171 | <field> |
| 172 | <name>body_text</name> |
| 173 | <type>longtext</type> |
| 174 | <comment>Body of the mailing in text format.</comment> |
| 175 | </field> |
| 176 | <field> |
| 177 | <name>body_html</name> |
| 178 | <type>longtext</type> |
| 179 | <comment>Body of the mailing in html format.</comment> |
| 180 | </field> |
| 181 | <field> |
| 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> |
| 188 | </field> |
| 189 | <field> |
| 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> |
| 196 | </field> |
| 197 | <field> |
| 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> |
| 204 | </field> |
| 205 | <field> |
| 206 | <name>open_tracking</name> |
| 207 | <title>Track Mailing?</title> |
| 208 | <type>boolean</type> |
| 209 | <comment>Should we track when recipients open/read this mailing?</comment> |
| 210 | </field> |
| 211 | <field> |
| 212 | <name>is_completed</name> |
| 213 | <title>Mailing Completed</title> |
| 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> |
| 219 | </field> |
| 220 | <field> |
| 221 | <name>msg_template_id</name> |
| 222 | <title>Mailing Message Template</title> |
| 223 | <type>int unsigned</type> |
| 224 | <comment>FK to the message template.</comment> |
| 225 | </field> |
| 226 | <foreignKey> |
| 227 | <name>msg_template_id</name> |
| 228 | <table>civicrm_msg_template</table> |
| 229 | <key>id</key> |
| 230 | <onDelete>SET NULL</onDelete> |
| 231 | </foreignKey> |
| 232 | <field> |
| 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> |
| 241 | </field> |
| 242 | <field> |
| 243 | <name>created_id</name> |
| 244 | <title>Mailing Creator</title> |
| 245 | <type>int unsigned</type> |
| 246 | <comment>FK to Contact ID who first created this mailing</comment> |
| 247 | </field> |
| 248 | <foreignKey> |
| 249 | <name>created_id</name> |
| 250 | <table>civicrm_contact</table> |
| 251 | <key>id</key> |
| 252 | <onDelete>SET NULL</onDelete> |
| 253 | </foreignKey> |
| 254 | <field> |
| 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> |
| 263 | </field> |
| 264 | <field> |
| 265 | <name>scheduled_id</name> |
| 266 | <title>Scheduled By</title> |
| 267 | <type>int unsigned</type> |
| 268 | <comment>FK to Contact ID who scheduled this mailing</comment> |
| 269 | </field> |
| 270 | <foreignKey> |
| 271 | <name>scheduled_id</name> |
| 272 | <table>civicrm_contact</table> |
| 273 | <key>id</key> |
| 274 | <onDelete>SET NULL</onDelete> |
| 275 | </foreignKey> |
| 276 | <field> |
| 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> |
| 282 | </field> |
| 283 | <field> |
| 284 | <name>approver_id</name> |
| 285 | <title>Approved By</title> |
| 286 | <type>int unsigned</type> |
| 287 | <comment>FK to Contact ID who approved this mailing</comment> |
| 288 | </field> |
| 289 | <foreignKey> |
| 290 | <name>approver_id</name> |
| 291 | <table>civicrm_contact</table> |
| 292 | <key>id</key> |
| 293 | <onDelete>SET NULL</onDelete> |
| 294 | </foreignKey> |
| 295 | <field> |
| 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> |
| 328 | <title>Is Mailing Archived?</title> |
| 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> |
| 339 | <title>Mailing Visibility</title> |
| 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> |
| 354 | <title>Mailing Campaign</title> |
| 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> |
| 365 | </field> |
| 366 | <foreignKey> |
| 367 | <name>campaign_id</name> |
| 368 | <table>civicrm_campaign</table> |
| 369 | <key>id</key> |
| 370 | <onDelete>SET NULL</onDelete> |
| 371 | </foreignKey> |
| 372 | <field> |
| 373 | <name>dedupe_email</name> |
| 374 | <type>boolean</type> |
| 375 | <title>No Duplicate emails?</title> |
| 376 | <default>0</default> |
| 377 | <add>4.1</add> |
| 378 | <comment>Remove duplicate emails?</comment> |
| 379 | <html> |
| 380 | <type>CheckBox</type> |
| 381 | </html> |
| 382 | </field> |
| 383 | <field> |
| 384 | <name>sms_provider_id</name> |
| 385 | <title>Mailing SMS Provider</title> |
| 386 | <type>int unsigned</type> |
| 387 | <add>4.2</add> |
| 388 | <html> |
| 389 | <type>Select</type> |
| 390 | </html> |
| 391 | </field> |
| 392 | <foreignKey> |
| 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> |
| 398 | </foreignKey> |
| 399 | <field> |
| 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> |
| 406 | </field> |
| 407 | <index> |
| 408 | <name>index_hash</name> |
| 409 | <fieldName>hash</fieldName> |
| 410 | <add>4.5</add> |
| 411 | </index> |
| 412 | <field> |
| 413 | <name>location_type_id</name> |
| 414 | <title>Location Type</title> |
| 415 | <type>int unsigned</type> |
| 416 | <comment>With email_selection_method, determines which email address to use</comment> |
| 417 | <pseudoconstant> |
| 418 | <table>civicrm_location_type</table> |
| 419 | <keyColumn>id</keyColumn> |
| 420 | <labelColumn>display_name</labelColumn> |
| 421 | </pseudoconstant> |
| 422 | <add>4.6</add> |
| 423 | </field> |
| 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> |
| 431 | <field> |
| 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> |
| 437 | <pseudoconstant> |
| 438 | <callback>CRM_Core_SelectValues::emailSelectMethods</callback> |
| 439 | </pseudoconstant> |
| 440 | <add>4.6</add> |
| 441 | </field> |
| 442 | </table> |