Merge pull request #22154 from eileenmcnaughton/n3
[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 <html>
18 <type>Number</type>
19 </html>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>mailing_id</name>
27 <title>Mailing ID</title>
28 <type>int unsigned</type>
29 <required>true</required>
30 <html>
31 <label>Mailing</label>
32 </html>
33 <comment>The ID of the mailing this Job will send.</comment>
34 </field>
35 <foreignKey>
36 <name>mailing_id</name>
37 <table>civicrm_mailing</table>
38 <key>id</key>
39 <onDelete>CASCADE</onDelete>
40 </foreignKey>
41 <field>
42 <name>contact_id</name>
43 <title>Recipient ID</title>
44 <type>int unsigned</type>
45 <required>true</required>
46 <comment>FK to Contact</comment>
47 <html>
48 <label>Recipient</label>
49 </html>
50 </field>
51 <foreignKey>
52 <name>contact_id</name>
53 <table>civicrm_contact</table>
54 <key>id</key>
55 <onDelete>CASCADE</onDelete>
56 </foreignKey>
57 <field>
58 <name>email_id</name>
59 <title>Email ID</title>
60 <type>int unsigned</type>
61 <default>NULL</default>
62 <comment>FK to Email</comment>
63 <html>
64 <label>Email</label>
65 </html>
66 </field>
67 <foreignKey>
68 <name>email_id</name>
69 <table>civicrm_email</table>
70 <key>id</key>
71 <onDelete>SET NULL</onDelete>
72 </foreignKey>
73 <field>
74 <name>phone_id</name>
75 <title>Phone ID</title>
76 <type>int unsigned</type>
77 <default>NULL</default>
78 <comment>FK to Phone</comment>
79 <html>
80 <label>Phone</label>
81 </html>
82 </field>
83 <foreignKey>
84 <name>phone_id</name>
85 <table>civicrm_phone</table>
86 <key>id</key>
87 <onDelete>SET NULL</onDelete>
88 </foreignKey>
89 </table>