Merge pull request #19423 from colemanw/tabTweak
[civicrm-core.git] / xml / schema / Mailing / Recipients.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Mailing</base>
5 <class>Recipients</class>
6 <name>civicrm_mailing_recipients</name>
7 <comment>Stores information about the recipients of a mailing.</comment>
8 <archive>true</archive>
9 <component>CiviMail</component>
10 <title>Recipient</title>
11 <titlePlural>Recipients</titlePlural>
12 <field>
13 <name>id</name>
14 <title>Mailing Recipients ID</title>
15 <type>int unsigned</type>
16 <required>true</required>
17 </field>
18 <primaryKey>
19 <name>id</name>
20 <autoincrement>true</autoincrement>
21 </primaryKey>
22 <field>
23 <name>mailing_id</name>
24 <title>Mailing</title>
25 <type>int unsigned</type>
26 <required>true</required>
27 <comment>The ID of the mailing this Job will send.</comment>
28 </field>
29 <foreignKey>
30 <name>mailing_id</name>
31 <table>civicrm_mailing</table>
32 <key>id</key>
33 <onDelete>CASCADE</onDelete>
34 </foreignKey>
35 <field>
36 <name>contact_id</name>
37 <title>Mailing Recipient</title>
38 <type>int unsigned</type>
39 <required>true</required>
40 <comment>FK to Contact</comment>
41 </field>
42 <foreignKey>
43 <name>contact_id</name>
44 <table>civicrm_contact</table>
45 <key>id</key>
46 <onDelete>CASCADE</onDelete>
47 </foreignKey>
48 <field>
49 <name>email_id</name>
50 <title>Recipient Email</title>
51 <type>int unsigned</type>
52 <default>NULL</default>
53 <comment>FK to Email</comment>
54 </field>
55 <foreignKey>
56 <name>email_id</name>
57 <table>civicrm_email</table>
58 <key>id</key>
59 <onDelete>SET NULL</onDelete>
60 </foreignKey>
61 <field>
62 <name>phone_id</name>
63 <title>Recipient Phone</title>
64 <type>int unsigned</type>
65 <default>NULL</default>
66 <comment>FK to Phone</comment>
67 </field>
68 <foreignKey>
69 <name>phone_id</name>
70 <table>civicrm_phone</table>
71 <key>id</key>
72 <onDelete>SET NULL</onDelete>
73 </foreignKey>
74 </table>